instruction stringlengths 15 30k |
|---|
Assume RSA with modulus $n$ product of large secret distinct primes $p$ and $q$, large secret encryption and decryption exponents $e$ and $d$ with $e\,d\equiv1\pmod{p-1}$ and $e\,d\equiv1\pmod{q-1}$. Without loss of generality, assume $e,d\in\bigl[0,\operatorname{lcm}(p-1,q-1)\bigr)$ so that there are no equivalent key... |
> - "nobody has a rainbow table for [this scheme]"
Well, this is a huge claim so needs justification. Building a rainbow table is not hard. Once you are a target, the table will be ready. For example [crackstation](https://crackstation.net/) claims to have it. So once the attackers have access to the table of `SHA... |
I think it is just called the output size or possibly the security in bits, as the hash output size is directly tied to it. That is: we presume that the resistance towards pre-image & collision attacks is related to the output size; if it isn't then the hash function is not considered to be cryptographically secure.
... |
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... |
We possess a database containing entries, where each entry consists of a person's ID and the corresponding confidential information (a fractional number) falling within the range of 1.00 to 100.00. We are considering sending a "SELECT" query to this database, aiming to retrieve the noisy secret (obfuscated secret) asso... |
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))$.
This [post](https://crypto.stackexchange.com/a/96474/36334) seems to say that F should be... |
Is the composition of a hash function with a block cipher collision resistant? |
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))$.
This [post](https://crypto.stackexchange.com/a/96474/36334) seems to say that F should be... |
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))$.
This [post](https://crypto.stackexchange.com/a/96474/36334) seems to say that $F$ shoul... |
Suppose Bob encrypts a plaintext(```p```) with an FHE scheme and a key(```k```), then sends the ```c``` to Alice.
Alice want's to know the plaintext, but she 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 ... |
Is it possible to verify and prove the decryption of an FHE cyphertext without the verifier knowing the key with zkProof? |
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 reveali... |
I think it is just called the output size or possibly the security in bits, as the hash output size is directly tied to it. That is: we presume that the resistance towards pre-image & collision attacks is related to the output size; if it isn't then the hash function is not considered to be cryptographically secure.
... |
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 c... |
Can a computationally-unbounded adversary break any cipher which is not perfectly secret? |
I imagine the following security experiment: 1) first the *challenger* (not the adversary) picks a key $K$ for $E$ uniformly at random from the key space of the block cipher; 2) the challenger then hands $K$ to the adversary; 3) the experiments ends with the adversary outputting $X$ and $Y$, and it *wins* if $F_K(X) = ... |
I imagine the following security experiment: 1) first the *challenger* (not the adversary) picks a key $K$ for $E$ uniformly at random from the key space of the block cipher; 2) the challenger then hands $K$ to the adversary; 3) the experiments ends with the adversary outputting $X$ and $Y$, and it *wins* if $F_K(X) = ... |
How is a characteristic of hash function named? |
We possess a database containing entries, where each entry consists of a person's ID and the corresponding confidential information (a fractional number) falling within the range of 1.00 to 100.00. We are considering sending a "SELECT" query to this database, aiming to retrieve the noisy secret (obfuscated secret) asso... |
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 ps... |
What efficiency can we expect from an average consumer computer for the RSA algorithm? |
How many output values does a hash function produce? Is there a name for that? |
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). <br>
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. <br>
Given this a formu... |
Does diffusion also include the reducibility inability of the $n$-times appliance of an encryption scheme? Or has this another name? Any proof for it? |
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](https:... |
***The following context is based on elliptic curves in short-weierstrass form y^2 = x^3 + b.***
**pls read carefully-**
I am looking for a **function/formula/algorithm** that can be applied on any curve, *say for e.g.* *y^2 = x^3 + 2* with *prime = 1097, largest subgroup order(J) = 1098 and subgroups = 1098, ... |
How to map elements from subgroup to larger subgroup of its parent group? |
The Group Law on Affine Coordinates
----------------------------------

Arithmetical rules are derived from the line intersection and tangent equations. The formulas are;
Let $P=(x... |
***The following context is based on elliptic curves in short-weierstrass form y^2 = x^3 + b.***
I know that elements of a non-prime order cyclic group **G** can be moved to its subgroup **H** by a process called "cofactor clearing". You just have to simply multiply a cofactor by an element of main group that ends u... |
Can I move elements from cyclic subgroup to its cyclic parent group? |
I recently came across following idea, does anyone know a name and if it is actually used?
> A wants to send B a message (A and B know both have a common secret
> key) and C wants to intercept it (without the knowledge of the key)
>
> Now we assume they have an encryption method that let's you define two
> dist... |
I recently came across the following idea, does anyone know a name and if it is used?
> A wants to send B a message (A and B know both have a common secret
> key) and C wants to intercept it (without the knowledge of the key)
>
> Now we assume they have an encryption method that lets you define two
> distinct m... |
There is no proof that every output of common hash functions is reachable for some input, but it is expected to be true. No method better than brute force is known to check this, and brute force is entirely impractical.
By the [coupon's collector][1] argument, it is expected to require $2^n\cdot(n\cdot\ln(2)+\gamma)... |
**No**, it is not known that any cryptographic hash in common use has impossible output values (that is a bitstring of the appropriate size to be an output, but that is not reached by any input message). That's at least for [MD5][1], the SHA([-1][2]/[-2][3]) family of [FIPS 180-4][4], [SHA-3][5] of [FIPS 202]... |
OpenSSL's speed command is the base helper to compare your implementation on your platform. You don't need an old article or arbitrary internet library.
Run
>openssl speed rsa
on your system get results then compare. I get the below on my system.
```
Doing 512 bits private rsa's for 10s: 365354 512 bits p... |
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? |
Name for number of output values a hash function can produce? |
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 ... |
Are semantic security and indistinguishability equivalent for symmetric key cryptosystems? |
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][1] he proves a property that:
> $a^{(p-1)/2} = 1$ if and only if $x$ is even
[1]: https://crypto.stackexchange.com/a/22831/59949
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 -... |
Are deterministic keygen algorithms unsafe? Why? |
Why are most KeyGen algorithms constructed to be probabilistic algorithms? |
***The following context is based on elliptic curves in short-weierstrass form y^2 = x^3 + b.***
**pls read carefully-**
I am looking for a **function/formula/algorithm** that can be applied on any curve, *say for e.g.* *y^2 = x^3 + 2* with *prime = 1097, largest subgroup order(J) = 1098 and subgroups = 1098, ... |
Here's a *fully* deterministic keygen algorithm in python for AES. Would you use this? I certainly wouldn't!
```python
def keygen():
return b"YELLOW SUBMARINE"
```
With that said, keygen algorithms are sometimes defined as deterministic processes of a random seed. For example, a keygen uses a key derivatio... |
This is the equation
Public key = Private key * G
Here,
Private key = 0000000000000000000000000000000000000000000000000000000000000001
G = (0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798,
0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8)
As Pri... |
This is the equation
Public key = Private key * G
Here,
Private key = 0000000000000000000000000000000000000000000000000000000000000001
G = (0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798,
0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8)
As Pri... |
While studying [Carter-Wegman](https://www.sciencedirect.com/science/article/pii/0022000081900337) 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 r... |
While studying [Carter-Wegman](https://www.sciencedirect.com/science/article/pii/0022000081900337) 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 r... |
> Can someone explain the difference in more detail?
Actually, there is no real difference. When the first one says $k_i$, what it means is that there is a separate (and independent) $k_i$ for each message (hence, you can't 'xor' them out by xoring two different tags). One way of generating such a $k_i$ is to tran... |
> Can someone explain the difference in more detail?
Actually, there is no real difference. When the first one says $k_i$, what it means is that there is a separate (and independent) $k_i$ for each message (hence, you can't 'xor' them out by xoring two different tags). One way of generating such a $k_i$ is to tran... |
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... |
The purpose of key generation is to construct a key that your adversaries can't figure out. If your adversaries can figure out your key, then they can decrypt your secret data, or forge signatures, or do whatever the key is for. Cryptography aims to protect against adversaries who aren't stupid, so you can't hope to be... |
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... |
I came across a question stating:
> We have a message consisting of 10,000 characters. After computing its message digest using **SHA-1**, we decide to change the last 19 characters in the original message. How many bits in the digest will change if it is recomputed, and why?
Until and unless this is an explicit ... |
The bear describes a process for choosing and computing a uniform random function involving gnomes in boxes, but this doesn't really explain what the random oracle model is in the context of proving security reductions. There are three parts: **uniform random functions**, **cryptosystems built out of hash functions**,... |
Sorry, I didn't express myself clearly.
It seems that in most attribute based encryption schemes, keygen algorithm is probabilistic, which means that given the same public key, master secret key and attribute set (or access structure), it may output different secret keys. However, in inner product function encryption... |
Sorry, I didn't express myself clearly.
It seems that in most attribute based encryption schemes, keygen algorithm is probabilistic, which means that given the same public key, master secret key and attribute set (or access structure), it may output different secret keys. However, in inner product function encrypti... |
We possess a database containing entries, where each entry consists of a person's ID and the corresponding fractional number $w$ 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 say by the Laplace mechanism... |
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 ... |
It seems that in most **Attribute Based Encryption** schemes, the keygen algorithm is probabilistic, which means that given the same public key, master secret key and attribute set (or access structure), it may output different secret keys. However, in inner product function encryption, some of the schemes I saw have a... |
Why are most ABE KeyGen algorithms probabilistic algorithms? |
Are deterministic keygen algorithms unsafe? Why? |
Why are most KeyGen algorithms constructed to be probabilistic algorithms? |
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:
1. **Signature Generation**: A deterministic ECDSA signature is generated using the `secp256k1` curve. The ... |
I'm working on a problem, where given 12 ciphertexts, I'm trying to decode the 12th and find out the key. I've implemented a crib dragging attack, where the crib is a purely guessed word (not known/given), I'm sturggling to actually build the key based on the output, as it seems to be all gibberish...
```import has... |
Who says that there is a repeated word? It seems more logical that the ciphertexts themselves are using a repeated key stream.
Instead assume certain characters to be present (the *alphabet* of the plaintext) and go through all the possible byte values within the key stream. If the key byte results in a plaintext by... |
refers to FIPS 186-5 document, I have a question about RSA Key generation A.1.6 method, "Generation of Probable Primes with Conditions Based on Auxiliary", my understanding is that, this method sets restriction on the size of Auxiliary prime only, so it is possible to generate P and Q with different bit size. Compared ... |
Could FIPS 186-5 A.1.6 method generate P and Q with different bit size? |
> Do my understanding correct?
No; when it generates $P$ (in step 5.3) and $Q$ (in step 6.3), it passes the intended key length (nlen) to the algorithm in appendix B.9. That algorithm will find a (probable) prime in the range $$(\sqrt{2}(2^{nlen/2 - 1}), 2^{nlen/2}-1)$$
This means that both $P$ and $Q$ will be $... |
Who says that there is a repeated word? It seems more logical that the ciphertexts themselves are using a repeated key stream.
Note that modern ciphertext, and certainly OTP generated ciphertext is considered *binary*. The hexadecimals are only for human consumption. So operate on bytes internally, not hexadecimals ... |
Who says that there is a repeated word? It seems more logical that the ciphertexts themselves are using a repeated key stream.
Note that modern ciphertext, and certainly OTP generated ciphertext is considered *binary*. The hexadecimals are only for human consumption. So operate on bytes internally, not hexadecimals ... |
Who says that there is a repeated word? It seems more logical that the ciphertexts lines themselves are using a repeated key stream. Appending the lines is not a good idea, put them in a list instead.
Note that modern ciphertext, and certainly OTP generated ciphertext is considered *binary*. The hexadecimals are onl... |
Who says that there is a repeated word? It seems more logical that the ciphertexts lines themselves are using a repeated key stream. Appending the lines is not a good idea, put them in a list instead.
Note that modern ciphertext, and certainly OTP generated ciphertext is considered *binary*. The hexadecimals are onl... |
It seems that in most Attribute Based Encryption schemes, the keygen algorithm is probabilistic, which means that given the same public key, master secret key and attribute set (or access structure), it may output different secret keys.
Is my opinion correct? If correct, why is this? Will a deterministic keygen alg... |
Why are most ABE KeyGen algorithms probabilistic algorithms? |
There is no proof that every output of common hash functions is reachable for some input (that is, the hash is [surjective][1]), but it is expected to be true. No method better than brute force is known to check this, and brute force is entirely impractical.
By the [coupon's collector][2] argument, it is expected to... |
There is no proof that every output of common hash functions is reachable for some input (that is, the hash is [surjective][1]), but it is expected to be true. No method better than brute force is known to check this, and brute force is entirely impractical.
By the [coupon's collector][2] argument, it is expected to... |
For most common hash functions designed before 2003, there is no proof that every output is reachable for some input (that is, no proof that the hash is [surjective][1]), but it is expected to be true. No method better than brute force is known to check this, and brute force is entirely impractical.
By the [coupon c... |
For starters, I don't need any don't-roll-your-crypto stuff. We're discussing a hypothetical.
So the idea is 3DES needs 3x the key size and achieves only 2x key size bit security. So using the 3x keyspace is essential for achieving the 2x bit security. Now entertain the same example, but this time it's 3AES-192. We ... |
Would this 3AES-192 scheme achieve 384-bit key security with just a 384-bit key? |
For starters, I don't need any don't-roll-your-crypto stuff. We're discussing a hypothetical.
So the idea is 3DES needs 3x the key size and achieves only 2x key size bit security. So using the 3x keyspace is essential for achieving the 2x bit security. Now entertain the same example, but this time it's 3AES-192. We ... |
For common hash functions designed before 2007, there is no proof that every output is reachable for some input (that is, no proof that the hash is [surjective][1]), but it is expected to be true. No general method better than brute force is known to check this, and brute force is entirely impractical.
By the [coupo... |
Paper: "Dispute-free Scalable Open Vote Network using zk-SNARKs" by Muhammad ElSheikh
Available at: https://arxiv.org/pdf/2203.03363.pdf
In this paper, the author has mentioned some pre-defined Groth16 zk-snark arithmetic circuits such as Mux(), LessThan(), GreaterThan(), etc. (page 5).
The author has also writ... |
Paper: "Dispute-free Scalable Open Vote Network using zk-SNARKs" by Muhammad ElSheikh
Available at: https://arxiv.org/pdf/2203.03363.pdf
In this paper, the author has mentioned some pre-defined Groth16 zk-snark arithmetic circuits such as Mux(), LessThan(), GreaterThan(), etc. (page 5).
The author has also writ... |
Who says that there is a repeated word? It seems more logical that the ciphertexts lines themselves are using a repeated key stream. Appending the lines is not a good idea, put them in a list instead.
Note that modern ciphertext, and certainly OTP generated ciphertext is considered *binary*. The hexadecimals are onl... |
The bear describes a process for choosing and computing a uniform random function involving gnomes in boxes, but this doesn't really explain what the random oracle model is in the context of proving security reductions. There are three parts: **uniform random functions**, **cryptosystems built out of hash functions**,... |
Reduction to RSA
===
Let $\mathcal C\colon \mathbb Z \times \mathbb Z \to \mathbb Z \times \mathbb Z$ be a collision-finding oracle giving $(x, x') = \mathcal C(n, y)$ such that $x \ne x'$ and $y^x \equiv y^{x'} \pmod n$, with some probability $p$ given some distribution on RSA moduli $n$ and integers $y$. For any... |
This is the equation
Public key = Private key * G
Here,
Private key = 0000000000000000000000000000000000000000000000000000000000000001
G = (0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798,
0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8)
As P... |
Use of plain random-IV's in CTR mode, without any special "nonces/counters" (or any "dedicated" bits!), can lead to problems with "partial overlaps", whereby attackers can execute known-plaintext-attacks if there is a collision in the keystreams used for encryption.
But, what if we just simply use that ***random IV*... |
Use of plain random-IV's in CTR mode, without any special "nonces/counters" (or any "dedicated" bits!), can lead to problems with "partial overlaps", whereby attackers can execute known-plaintext-attacks if there is a collision in the keystreams used for encryption.
But, what if we just simply use that ***random IV*... |
Use of plain random-IV's in CTR mode, without any special "nonces/counters" (or any "dedicated" bits!), can lead to problems with "partial overlaps", whereby attackers can execute known-plaintext-attacks if there is a collision in the keystreams used for encryption.
But, what if we just simply use that ***random IV*... |
I have a 32-byte cryptographic key generated using .NET's [cryptographic random number generator][1], and I'd like to use it as the key material to generate two other keys per user in my web application.
My plan is to use these two derived keys for AES-256-CBC encryption (the first derived key) and HMAC-SHA256 authe... |
> - "nobody has a rainbow table for [this scheme]"
Well, this is a huge claim so needs justification. Building a rainbow table [is not hard][1]. Once you are a target, the table will be ready. For example [crackstation](https://crackstation.net/) claims to have it. So once the attackers have access to the table of... |
I have been going through the lectures in ZKP MOOC [here](https://www.youtube.com/watch?v=uchjTIlPzFo&list=PLS01nW3Rtgor_yJmQsGBZAg5XM4TSGpPs) youtube series.
I am trying to understand the zk-STARKs discussed in video **ZKP MOOC Lecture 8: FRI-based Polynomial Commitments and Fiat-Shamir**.
In this video, the lect... |
How does the verification step operations using FRI polynomial commitments in zk-STARKs? |
I have been going through the lectures in ZKP MOOC [here](https://www.youtube.com/watch?v=uchjTIlPzFo&list=PLS01nW3Rtgor_yJmQsGBZAg5XM4TSGpPs) youtube series.
I am trying to understand the zk-STARKs discussed in video **ZKP MOOC Lecture 8: FRI-based Polynomial Commitments and Fiat-Shamir**.
In this video, the lect... |
I want to use AES-GCM-SIV for authenticated encryption of messages in my protocol.
Since it is a wireless protocol I want to transmit as little bytes as possible. For successful decryption I need to transmit the nonce alongside the ciphertext and the tag and in theory this nonce is 12 bytes for AES-GCM-SIV, but I do... |
I want to use AES-GCM-SIV for authenticated encryption of messages in my protocol.
Since it is a wireless protocol I want to transmit as few bytes as possible. For successful decryption I need to transmit the nonce alongside the ciphertext and the tag and in theory this nonce is 12 bytes for AES-GCM-SIV, but I don't... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.