instruction
stringlengths
32
27.2k
I am using a cryptography system in which the Feistel structure and permutation cipher are combined. I am amazed by the result; decryption is so much faster than encryption. My system is working properly. Anyone can explain why this is happening. Why is decryption faster than encryption?
When I learned about the inner workings of the TLS protocol and what exactly it protects a connection against, I was surprised to learn that even asymmetric encryption can be defeated by a MITM attack - as all the attacker has to do is replace the certificate with their own. This is why CAs exist, as a form of authenti...
For context, I want to see how far I can go using YouTube as a (bad) cloud storage solution just because of sheer curiosity and kicks and giggles. In said journey, I came across the problem of properly encrypting the files I upload to YouTube. In a perfect world, I would like to allow for file sharing as close as I can...
In Pass's lecture notes 2.13 section, a universal OWF is constructed. But I have some confusion about: Let $M_g$ be the smallest machine which computes function $g$. Since $M_g$ is a uniform algorithm it has some constant description size $|M_g|$. Thus, on a random n-bit input $y = <M, x>$, the probability that machin...
In AES Key Wrap, we apply 6n AES encryptions for an input of n 64-bit blocks. Informally speaking, we wrap the key 6 times. What is the motivation behind 6? Why not 4 or 10? Is there something like a treshold or trade-off coming from security vs efficiency concerns?
Generally, in cryptography, the security of a scheme/protocol $\Pi$ relying on a hard problem $P$ is demonstrated by constructing a reduction $\mathcal{B}$ that takes as input an instance of the problem $P$ and then interacts in a black-box manner with an adversary $\mathcal{A}$ that can "break" the security of $\Pi$ t...
Let $f(x)\in\mathbb{Z}[x]$, let $N$ be an integer with known factorization into prime elements. I want to know why it is easy to solve efficiently the equation $f(x)=0\ mod\ N$.???
I want to encrypt numeric identifiers into ciphertexts that are deterministic and not too long. I am considering AES-128 in ECB mode to encrypt 64-bit integers. How should I pad the 64-bit integers, and specifically, how should I verify the padding? When encrypting, I could encrypt a block where the first 64 bits are s...
RSA signatures are implemented by encrypting the padded hash with the private key. Why not take the approach RSA-KEM is using by removing the padding entirely and replacing the hash with a XOF that would produce the m value in range [1, n-1]. XOF is just a hash with arbitrary output length. Why hasn't it been done this...
Let's suppose that $(G,D,E)$ is a secure encryption scheme, that is, for any polynomial $p(n)$ and any sequence of messages $\{a_{n}\},\;\{b_{n}\}$ of length $p(n)$ $E(k,a_{n})$ and $E(k,b_{n})$ are computationally indistinguishable. Is $E'(k,m) = E(k,m)\oplus m$ also a secure "encryption algorithm"? Sure, in some case...
Since Linux 5.18, the internal state of the ChaCha-based CSPRNG is a 256 bits (32 bytes) BLAKE2s hash. There is also a fast key erasure mechanism which reseeds the CSPRNG every minute (source). I know we can read as much random data from /dev/urandom but I didn't understand how "conceptually" we can get, for example, a...
Consider the problem of finding two keys K1 and K2, such that for two distinct plaintexts P1 and P2, AES-CMAC(K1, P1) = AES-CMAC(K2, P2). Is this problem any easier than brute-forcing? If so, how much easier? Edit: plaintexts P1 and P2 are inputs to the problem and therefore they are fixed. We need to find the keys giv...
This question covers how to convert a projective point $(X_E, Y_E, Z_E)$ on a twisted Edwards curve to a projective point $(X_M, Y_M, Z_M)$ on a Montgomery Curve. Using XZ coordinates, there is no inversion needed as $X_M, Z_M$ can be directly obtained. Is it also possible to convert inversion-free the other way around...
I am learning zero knowledge protocols, and studied the GMW protocol for 3-Coloring (https://www.wisdom.weizmann.ac.il/~oded/X/gmw1j.pdf). A similar proof is also presented in Oded Goldreich's Foundations of Cryptography textbook. In this proof, the zero-knowledgeness property uses the hiding property of commitments. A...
I'm working on a scenario where a safe has a lock code '42', and this code needs to be shared securely among four individuals. The goal is to set up a system where at least two out of these four individuals must combine their individual pieces of information to recover the original code and open the safe. However, no s...
I accidentally overwrote a whole LUKS1 header without any backup. Since I still have the password with which the header was created - is there any way that this information helps me to reduce the range of potential master keys? I realize that the mapping from password to key still involves some randomization, so this r...
I have three binary arrays each one representing the pixels of an image. For example, if the picture size is 100 pixels X 100 pixels. Then the binary array would be 100×100×8×3 bits. These files are encrypted using the same cypher generated using LFSR. What do we know about the LFSR? The polynomial is [1,0,0,1,0,0,0,0...
Older hash functions like SHA-256 and SHA-512 are vulnerable to the length extension attack, which is problematic in the context of a MAC. There are several ways to prevent this: Use a newer hash function/XOF. Use HMAC or suffix MAC or envelope MAC. Truncate the output. Length prepending. Zero prepending. Double hashi...
Many companies argue their gathering of private data with 'digitization' but I guess their real intention is most likely just gathering data. However I didn't came up with a simple idea without it. Use case: Digital ticket for an event or for transportation or similar. We have: a ticket Seller $S$, a ticket owner $O$ ...
A slight modification of El Gamal signature scheme would be to compute: $r = g^k$ for some random k (as usual) but $s$ as: $s = (hash(m) - x)k^{-1} \mod (p-1) $ (instead of $(hash(m)-xr)k^{-1} \mod p - 1$). The verification procedure would be to check: $g^{hash(m)} = g^x r^s \mod p$ I don't see what we are losing by do...
Ok sort of long post incoming. Will go slow to make it as clear as possible I'm trying to build a C library for Elliptic Curve Arithmetic. Since the idea is to learn from the process, I decided to support many different coordinate systems. So far, I've implemented the group arithmetic for Affine and Projective coordina...
Given AES-128 with a 128 bit key, but the key is chosen such that its only last 16/32/48 bit are random rest are 0, how can i exploit this to know the key being used, given i have access to oracle that gives cipher for any chosen plaintext. Brute force can be using all the key and checking cipher, can someone suggest a...
The Argon2 variable-length hash function uses BLAKE2b directly if the user requests an output less than or equal to 64 bytes in length. However, if the user requests an output longer than this, each BLAKE2b-512 hash is truncated to become BLAKE2b-512-256. From Wikipedia: // If the requested digestSize is 64-bytes or...
I first posted this question on StackOverflow but they told me it belongs here instead: https://stackoverflow.com/questions/77856486/in-symmetric-encryption-where-alice-and-bob-message-each-other-how-can-both-dec I am building a messaging app where one client can message another. There will be 2 clients - Alice and Bob...
Consider ed25519 signing (RFC 8032). There, the private key is a 32-byte random value, and for signature generation, the 32-byte private key is first hashed and then the secret scalar and nonce are derived from the hash. Now, in threshold ed25519 (RFC draft), the thresholdized private key is the scalar (and the nonce i...
ed25519 is defined over curve edwards25519 which has a large prime order subgroup and a small subgroup of order 8. During key generation, bit clamping is used to derive the private key scalar. In https://eprint.iacr.org/2020/823.pdf, Section 4.2.3, the authors describe the effect of clamping the lower order bits as fol...
Consider I have a secret $a \in Z_P^*$ and n public messages where $m_i=x_i -a \mod p-1$ and $x_i \in Z_p$ for i=1,2, ..., n. Given that $a$ and $x_i$ for $i=1,2, ..., n$ are secrets, can a PPT adversary get the value of $a$ or $x_i$? I have an impression that it is difficult because this problem would be similar to s...
Ronald Rivest designed MD2, MD4, MD5, and MD6, but what about MD3? Was it skipped? Or perhaps kept private and never publicly released? (edit: found a related question)
I'm learning about encryption $(E)$ and decryption $(D)$ algorithms and am wondering what the following notation means, specifically the cartesian product for $E$ and $D$. $k$ represents key, $P$ represents plaintext, $*$ represents some length $$k ∈ \{0,1\}^l$$ $$P ∈ \{0,1\}^m$$ $$E: \{0,1\}^l × \{0,1\}^m → \{0,1\}^...
ECDSA can be instantiated with a variety of different elliptic curve groups. Two example curves are secp256k1 and edwards25519. Question: Assume we have a secret key scalar generated for secp256k1. Is it OK to use this scalar for ECDSA over edwards25519?
In the MPC protocol based on the common reference string (CRS) model, the CRS can be generated by the simulator, and the simulator can obtain the backdoor information in the CRS (such as the private key $sk$ corresponding to the public key $pk$), thus simulating correctly. One measure I can take if I want to build a p...
Say there are 5 parties. 1 is the sender, and 4 are the receivers. The sender has a unique shared key with each receiver. k1 - between sender and receiver1 k2 - between sender and receiver2 k3 - between sender and receiver3 k4 - between sender and receiver4 Sender wants to send a encrypted message Em to all 4 of these ...
I'm having trouble with solving the following question: Given two distinct prime numbers $p, q$ where $(p-1)$ and $(q-1)$ are not divisible by $3$, define $n=pq$. For how many elements in $\mathbb Z^*_n$ $\exists b$ for which: $b^3\equiv a\ (mod\ n)$ Given the fact that $|\mathbb Z^*_n| = \phi(n)=(p-1)(q-1)$, I could...
I was wondering if someone could explain the Digit Extraction from HElib in simple words: Apply a homomorphic (non-linear) digit-extraction procedure, computing $r$ ciphertexts that contain the digits $e − e′ + r − 1$ through $e − e′$ of the integers in the slots, respectively, relative to plaintext space mod-$p^r$. T...
To achieve approximately 128 bits of security, curve BLS12-381 uses 381 bits to encode the X coordinate. This means the size of a group element needs at least 48B to store/transmit. I am in a situation of trying to transmit a $G_1$ element in the IP packet level, where size is very critical, and 48B is somehow too larg...
Exploring LWE Lattice crypto. Generate system matrix and secret key from cryptographic PRNG (Fortuna). Derive public key as |p> = A|s>, then add NBits of zero mean uniform noise to the public key elements, producing |p'>. Publish (|p'>, A). System matrix, A, has been defined with NRows = 128, matching a 128-bit element...
I am really curious about this one problem 10.12 from Katz/Lindell's book. It goes as follows: I am quite sure we can assume that $\textsf{Enc}_k(m) \in \mathbb{G}$, as the authors devoted the whole subsection to this issue (p.367). Now, my best shot was to use this $\textsf{Enc}_k(m)$ kind of like an exponent $r$, so...
I'm wondering if the following scheme (or something similar) can exist: I want to encrypt a randomly generate a public key and secret key pair, $(pk, sk)$. I would like that $sk$ is encrypted some form of timelock encryption. My goals are: Nobody should be able to compute $sk$ before the timelock expires Anyone should...
I am working on a project where I need to authenticate data in parallel with computations on that data. The idea is to stream data from memory onto the chip only once; while the data is on-chip, we do a computation on it and authenticate. My current workstation uses ARMv8 instruction set (although I could change to an ...
Context To learn about fully homomorphic encryption (FHE) and a new language I implemented the Paillier cryptosystem in Go, and I thought it would be fun to apply it to the following interaction: A customer wants to find the closest shop near its zipcode (2345), and submits it to a website, that computes what the clos...
The instruction wants them the ciphertext to be the same size as the original message. The original message is "alicexoxox:bobko0oo0l:popo" I am supposed to use openSSL cli to generate a key in hexadecimal which i did by running: "openssl rand -hex 32" i then applied the aes ecb command on this message by running: <ech...
Decrypting an AES-Encrypted Message Without the Key: A Cryptographic Challenge Summary: I am investigating the possibility of decrypting an AES-encrypted message when the encryption key is unknown and unguessable. My query is aimed at understanding the limitations and potential of current cryptographic methods in such...
I was reading "serious Cryptography" by Jean-Philippe Aumasson,and when coming to Feedback Shift Registers,I didn't understand what role Polynomials play in the feedback function, does it have to do with polynomial addition,which is simuar to XOR? Also i made a simple FSR,just to understand it better,so I wanted to ask...
I read that in elliptical curve cryptography, the order of the Montgomery Curve is a multiple of 8, this mean that we can't have cofactor one curves which can be problematic in some corner cases because always has a cofactor bigger than 1. When the cofactor is not 1, it means that the subgroup of prime order is only a ...
I have an arbitrary array $X = (x_1, x_2, \dots, x_n)$ of disjoint integers. I want to determine whether there exists a prime number, $p$, and a value $y < p$ such that the sequence $$Y = \left(y_1, y_2, \dots, y_n\right), \quad y_i \equiv x_i y \pmod p$$ forms a superincreasing sequence. Furthermore, how can I find th...
I'm asking if this encryption scheme would increase the security of the user's data. Here's how it would work: The user would create an account (username + password). An encryption key (symmetric) is created for the user, which is then encrypted with the user's password and stored into the site's database. The encrypt...
Assume we have two uniform distributions $X=U(\mathbb{Z}_m)$ and $Y=U(\mathbb{Z}_n) \bmod m$, for $m,n \in \mathbb{N}$. The statistical distance is defined as: $$ \Delta(X, Y) = \frac{1}{2} \sum_{a \in \mathbb{Z}_m} | \Pr[X = a] - \Pr[Y = a] | \enspace. $$ Question: What is the statistical distance between $X$ and $Y$ ...
Trying to upsolve "notsosmart - hxp CTF 2017" https://2017.ctf.link/internal/challenge/5c8119ca-bfed-444a-968d-1cc9bff27bfb.html This server code was given during the CTF, letting you get multiple values of n: #!/usr/bin/env python3 from random import randrange from gmpy2 import * from fast import random_prime p, q =...
Given plaintext $m$ of length $l_m = |m| > 0$ After encryption $E$ $$E(m) = c$$ we receive a cipher $c$ with an elongated length $l_c = |c| > |m|$ With decryption $D$ $$D(c) = D(E(m)) = m$$ we receive $m$ again. The opposite does not to be always true: $$E(D(m)) = m' \text{ } \text{ with } \text{ } m' \in \\{m,m'',m'...
Here is an attempt at a Python implementation of what is described in the paper I attached as an image. The algorithm is too slow or there is something wrong with the code. Any ideas! import random def left_rotate(x: int, n: int) -> int: """ Circularly shift an integer 'x' left by 'n' positions. :return: A...
I'm learning various cryptography protocols and use cases and since I'm developing a USB device and PC application, it would be nice to use encrypted communication. I studied TLS 1.2 key exchange but mostly focuses on the one-way authentication only (client authenticates server), althought mTLS exists too. Aim is to: ...
In my understanding, the main difference in the proof between UC and standalone model is the ability to "rewind", which appears to related to malicious security only. So if we are only interested in semi-honest security models, do we have to distinguish UC and standalone models?
For SHAKE128 NIST has provided test vectors for Monte Carlo: [Minimum Output Length (bits) = 128] [Maximum Output Length (bits) = 1120] Msg = c8b310cb97efa3855434998fa81c7674 COUNT = 0 Outputlen = 264 Output = fe8c476993b47b10c98303a04c6212dfb341426d748d3926140aee0a151fc80fa1 How they are they calculating outputlen fo...
I have a question regarding the scheme below. PSI using homomorphic encryption appears to subtract the plaintext into the ciphertext. I understand that homomorphism is maintained in operations between ciphertexts. Is homomorphism maintained even if calculated as below? If 3. (b) operation is correct, c=[c0,c1] and x i...
I am working on a tool that uses password derived keys for AES and a selectable modes of operation to encrypt (and later decrypt) text for storage on an insecure media. The tool is constrained to using only the functions provided by the browser SubtleCrypto API, which are described as "low-level cryptographic primitive...
Is there some source of standard, vetted, efficient Montgomery elliptic curves over prime field? I'm looking for curves $B\,y^2\equiv x^3+A\,x^2+x\pmod p$ engineered for efficient computation of scalar multiplication with $X/Z$ coordinates and Montgomery ladder, which if I'm not mistaken is faster with small* $A_{24}=(...
I try to create a valid decryption function for a modified the Goldwasser-Micali scheme $pk = (N,p,q)$ where N is a Blum-Number $(p = q = 3 \bmod 4)$ $Enc_{pk}(m) = (-1)^{m} \cdot r^{2} \bmod N \text{ where } r \in_{R} \mathbb{Z}^{*}_{N}$ Now when I want to decrypt a ciphertext I can check if $m = 0$ by checking if ...
I've read the series of blog posts explaining TFHE scheme on zama.ai's website (four parts), and some things are not clear to me. I would appreciate if someone can shed some light on those topics. I am not sure I understand how multiplication by a "big" constant works in practice: what are the typical values for beta ...
I'm sorry if the answer to this is actually simpler than it seems to me. I'm running AES-GCM to encrypt some data keys, but I don't actually know how to go about calculating the probability of collisions for my setup, or how to derive the maximum number of plaintexts I can encrypt without violating NIST standards on ke...
In exploring post-quantum cryptography algorithms like Kyber and Falcon, I've come across their utilization of Discrete Fourier Transform (DFT) and Number Theoretic Transform (NTT), but I'm seeking clarity on why the choice of transform matters. While Falcon employs DFT in its algorithm and NTT in the verification phas...
As a hobby I built a radioactive decay based RNG, that I am still perfecting. I would like to know how to use its output to contribute to VC entropy pool for key generation. I know that before considering my device secure, there are many steps to accomplish. For now it is just a hobby project. I found the command --ran...
I have been going through some old lecture notes of mine and found this interesting question. Assuming we reduce the challenge space for the verifier from $\mathbb ℤ_q$ to $\mathbb ℤ_{\log()}$, does security still hold for Schnorr's verifier? My thought process so far is that it does. While the probability of guessing ...
In the case of an Elliptic curve over a GF(p) which has order n and multiplicative group of n-1 elements, does multiplication of an element of a subgroup of order q where q is a divisor of n-1 with a scalar s obey the cyclic property, or plainly put does an element e member of subgroup q when multiplied with s stay in ...
I am designing a one time password system, in which I will send the password to the user over some transport (concretely SMS). Once they receive it they will type it into the mobile app. In this way we can verify that the user has access the phone number they gave us. I want to use a stateless time based one time passw...
The way I understand this question is that we have a secure PRG G: $\{0,1\}^\lambda \rightarrow \{0,1\}^{\lambda + l}$, and we want to use it to make a secure PRG G' : $\{0,1\}^\lambda \rightarrow \{0,1\}^{\lambda + l'}$ which is essentially $\{0,1\}^\lambda \rightarrow \{0,1\}^{\lambda + l + k}$ where $k$ is $l' - l$....
I have an interesting cipher based on matrix products that I've not seen before. Given plaintext bytes $p\in[0,255]$, pad to a perfect square length and write into the entries of an $n\times n$ matrix $\mathbf{P}$. Given a key $k$, apply some key derivation function $f$ to it to produce another $n\times n$ matrix $\mat...
looking at the linux kernel provided cipher and block cipher modes cat /proc/crypto my prefered mode CTR (counter/integer) is not provided. However the "crazy unsafe" ECB mode - in which "all equal plaintext blocks result in equal ciphertext" - exists almost everywhere. My question is: Can I emultate CTR mode by ECB-mo...
The following problem of my is from final exam for my online course last year; I couldn't have the time to do it, so I want to check whether my answer is correct; Q5) Given an (entirely) random hash function $h : S \times \mathbb{N} \to [p]$, where $p$ is the number of blocks in the hash table of size $p = 2q$, we requ...
My friend in the software industry came to me with one of his "dumb boss" war stories. This particular time, his (non-technical but eager to learn) manager came to him and told him to, in the new app he was developing, not store SHA2(password + salt), but SHA2(password) + SHA3(password) (both 256-bit). The boss claims ...
I am looking from 3 functions $f,g,h$ from $\mathbb N \to \mathbb N$ (they can be bijections, they need to be injective at least), such that: $$f \circ h \circ g = h $$ and $f$ is hard to reverse programmatically, and $h$ is hard to reverse programmatically. $g$ and $h$ cannot be keyed functions as they will be public...
According to the SDH assumption, it is hard for an adversary to output a pair $(c,g_1^{\frac{1}{c+\alpha}})$ given a $q+2$ tuple ($g_1$,$g_2$,$g_2^{\alpha}$, ...,$g_2^{{\alpha}^q}$) Now, consider $g_1$,$g_2$,$g_2^{\alpha}$, $c_1$, and $c_2$ is given to an adversary: 1- How is it hard to calculate $g_1^{\frac{1}{c_1+\al...
When creating a SealedBox, one of the parameters which needs to be passed is an authentication tag: https://developer.apple.com/documentation/cryptokit/aes/gcm/sealedbox/init(nonce:ciphertext:tag:) I have 2 questions about this: What should this authentication tag be? I have seen quite a few examples online where they...
We suppose that we have N consecutive numbers generated by JavaScript using: math.floor(math.random()*multiple), knowing that math.random() generates consecutive xorshift128+ values. I found that there exist a script capable of reversing this using Z3 (https://github.com/d0nutptr/v8_rand_buster) and it works perfectly ...
Have security assumptions based on quantum computers de facto constrained the emergence and application of many new cryptographic schemes (e.g., fully homomorphic encryption)? It seems to me that, in addition, too many resources are spent on so-called quantum-resistant cryptography schemes. Even though there is curren...
I'm creating a PKCE Code Verifier (a random string). Solution 1 from a StackOverflow answer. (You can copy/paste these code examples into a browser's inspector.) (function generateCodeVerifier() { function dec2hex(dec) { return ("0" + dec.toString(16)).substr(-2); } const len = 128; var arr...
I recently read the post Distinguishing x25519 public keys from random? and found myself wondering why, for a randomly chosen x, the result of the function $$x^3+ax^2+x$$ is a square in 50% of cases and not in the other 50%. I understand that in a finite field with an odd prime order, a randomly chosen x is a square in...
Imagine an encryption scheme defined as follows for a fixed $|k|$ and $|m| > |k|$: $K = \{0, 1\}^{|k|}$ $K' = M = C = \{0, 1\}^{|m|}$ $G: K \rightarrow K'$ is a truly random injective function $E(k, m) = m \oplus G(k)$ $D(k, c) = c \oplus G(k)$ Is this construction semantically secure without the epsilon bound? In ot...
When RSA is used in a fashion where both the private key and the public key are both secret (for example, when the public key in a KEM is never leaked) could RSA be then evaluated as a symmetric cipher? And how would its security compare vs. standard symmetric ciphers such as AES? Would a quantum computer for instance,...
What are your thoughts on this? Are there any complications a designer of such a cryptosystem might face? Or, a better way to put it.. are there obvious drawbacks with chaotic functions when using them for cryptographic purposes?
Is there a threshold signature scheme (TSS) that a quorum in a group can sign, where members can dynamically join and leave, without changing the shared group public key? ECDSA, BLS, and Schnorr based TSS are preferred, since the desired use case is in blockchain.
I have solved a problem in Project Euler. My solution was based on the finding the all numbers whose Euler Totient value equals to $13!$ However, while I was working on the problem, I thought that: "Can I find an algorithm that tests whether the Euler Totient of a number equals to $13!$ ?" I know that finding $\phi(n)$...
We possess a database containing entries, where each entry consists of a person's ID and the corresponding fractional number $w$ (e.g., 2.34, 3.4, 12.3 etc) falling within the range of 1.00 to 100.00. We are considering sending a "SELECT" query to this database, aiming to add some noise to the corresponding row (let's ...
Assume $H$ is a collision resistant and preimage resistant (unkeyed) hash function and $E(k,y)$ is a block cipher where $k$ is the key. I am interested into the collision resistance of the composed function $F(k,x)=E(k,H(x))$. A collision for $F$ is defined as $(,)≠(′,′)$ such that $(,)=(′,′)$. This post seems to say t...
Any hash function has fixed output size but it does not mean that all values of output values are ever used. What's the term for the size of output set? As an aside: Can it be calculated? How do most widely used hashes compare by that metric? For example, does SHA-256 use 100% of output values?
In the CTR mode of operation, the plaintext block is treated as a stream cipher, where each byte of the plaintext gets XOR-ed with each byte of the key (which is generated using a nonce and a counter) to form the ciphertext. This was a part of a challenge that I came across recently. Suppose I have a nonce of 8 bytes t...
Suppose Bob encrypts a plaintext($p$) with an FHE scheme and a key($k$), then sends the $c$ to Alice. Alice wants to know the plaintext but can't trust that Bob won't send a different string. Can Bob prove that the $p$ he sends to Alice is a valid decryption of $c$ using zkSNARKs or another zk proof without revealing t...
Imagine we have a cipher defined as $(K, M, C, E, D)$ which is not perfectly secret, namely: $\exists m_0, m_1 \in M, c \in C \text{ s.t. } P[k \leftarrow K; E(k, m_0) = c] \neq P[k \leftarrow K; E(k, m_1) = c]$ Is it the case that this fact alone is enough to deduce that there exists an unbounded adversary who can bre...
What methods do we know to construct a function $f:D\to D$ with domain $D=[0,n)\cap\mathbb N$ (thus $n\in\mathbb N$ elements); demonstrably surjective (thus bijective since $D$ is finite); with definition requiring no trusted party for setup (e.g. an RSA modulus); computable by a deterministic algorithm running in tim...
I am trying to implement the RSA algorithm using the C language, for learning purpose. I was wondering how much time should we expect it to take for encrypting a message of size 1024/2048/4096bits on an average consumer computer, assuming a reasonably efficient implementation ? For now, I am trying to generate pseudo-r...
With optimal diffusion the change of a single input bit should change every single output bit equally likely with a chance of 50% each (in mean). But this does not necessarily mean it makes it unpredictable. For example it could underlie a mathematical formula similar to the S-Box in AES. Given this a formula could b...
For a good (unkeyed) hash function, if a part of the input is random, is it fair to assume that the output will also be randomised? More specifically, suppose $H$ has an $n$-bit output, and we write its input as $x||y$ where $y$ has $n$-bits and $x$ is of arbitrary length. If $y$ is sampled uniformly at random from $\{...
I've seen a lot written about how, in the context of public key cryptosystems, these definitions are equivalent. Is the same true of symmetric key cryptosystems? If so, what are the precise statements of the definitions? My current understanding Definitions Probability distributions $D_0$ and $D_1$ are said to be indis...
I'm reading Katz and Koo's paper that constructs UOWHFs from OWFs. I'm trying to rigorously understand every proof, and I'm having a hard time understanding an equality. This lemma is trying to prove that it suffices for adversary B to invert the output of a OWF when the output is in $image_{\frac{l}{2}}$. I specifical...
In this answer by fkraiem he proves a property that: $a^{(p-1)/2} = 1$ if and only if $x$ is even But this doesn't seem to work in my test with the secp256k1 Elliptic Curve. Here is my Python 2 code: ECLib.py: P = 2**256 - 2**32 - 2**9 - 2**8 - 2**7 - 2**6 - 2**4 - 1 N = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF4...
Are deterministic keygen algorithms unsafe? Why?
This is the equation Public key = Private key * G Here, Private key = 0000000000000000000000000000000000000000000000000000000000000001 G = (0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798, 0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8) As Private key =1, there is no iterat...
While studying Carter-Wegman message authentication codes MAC, I got two different notations for the broader concept and have problems with understanding the difference, if any exist. Let $K, K_1, K_2$ be randomly sampled keys, $k_i$ be a unique randomly sampled key (random nonce) for message $M_i$, and $h$ be a keyed ...
I'm looking at hash function constructions that use ciphers. There are many which are analyzed in this paper: https://www.cs.ucdavis.edu/~rogaway/papers/hash.pdf but all of them assume that only a single input of the message is "absorbed" when using an encryption algorithm. What if you have an input of length 2 ([x, y]...
I saw a paper LLW21 in EUROCRYPT 2021 that used this lemma, but there was no proof or references. How should this lemma be proved ?
I'm exploring the security implications of utilizing a deterministic ECDSA signature as a cipher key for symmetric encryption and would appreciate insights from the community. Here's the setup I'm considering: Signature Generation: A deterministic ECDSA signature is generated using the secp256k1 curve. The private key...