instruction
stringlengths
15
30k
Is my domain separation in stream cipher and MAC accepted?
is it possible to someone reverse the script of rsa with small prime (128bits) and just only have d to crack it? I try hard on this question but i couldn't find N, we know e =65537 but we don't have N. First try, I write the code to find factors of ed-1 and find it on factordb and try to find out p and q but it doesn't...
Crack RSA with e and d?
Ok, let’s see if we can go through one line of reasoning, and see if that makes sense. If we have the sequence: $$g^{k/2^t} \bmod N, g^{k/2^{t-1}} \bmod N, …, g^{k/2} \bmod N, g^k \bmod N$$ We know that the last entry evaluates to 1, and we are looking at the probability (for random $g$) that the entry immedia...
This is not a technical question, but rather it seeks advice on what to do if cryptanalytical research goes wrong. I've discovered a new attack that works great in theory, but in practice, it fails. I don't know why. Haven't figured it out yet. Tried really hard. I work on this thing alone. Not sure If I could d...
Suppose one has a password manager, based on symmetric cryptography, that requires a master passphrase to be unlocked. Argon2 is used for deriving a secret key from the master passphrase. I need several secret keys to encrypt different components, so I'm faced with a choice: 1. Output more material using Argon2. ...
Suppose one has a password manager, based on symmetric cryptography, that requires a master passphrase to be unlocked. Argon2 is used for deriving a secret key from the master passphrase. I need several secret keys to encrypt different components, so I'm faced with a choice: 1. Output more material using Argon2. ...
I'm implementing impossible differential cryptanalysis on 3.5 round IDEA using the methods in "Miss in the middle attack on IDEA and Khufu" paper. In the first step, I need to provide $2^{32}$ pairs that are identical in $X_2$ and $X_4$ and have all the possibilities in $X_1$ and $X_3$ to start the cryptanalysis. ...
I'm new to cryptography, so please don't bash me. I'm trying to learn to recover a RSA private key. As you can see from my profile I'm a cybersecurity professional, which is only now trying to learn some cryptography.. Let's assume we have 5 message and public keys derived from the same string message. It is shor...
Which cryptographic attack here is feasible on RSA?
[According to the documentation of HighwayHash][1], for finding a collision are expected m/2 guesses, being m the message. By contrast, 'strong' hashes such as SipHash or HighwayHash require infeasible attacker effort to find a hash collision (an expected 2^32 guesses of m per the birthday paradox) or recover th...
Suppose one has a password manager, based on symmetric cryptography, that requires a master passphrase to be unlocked. Argon2 is used for deriving a secret key from the master passphrase. I need several secret keys to encrypt different components, so I'm faced with a choice: 1. Output more material using Argon2. ...
Suppose one has a password manager, based on symmetric cryptography, that requires a master passphrase to be unlocked. Argon2 is used for deriving a secret key from the master passphrase. I need several secret keys to encrypt different components, so I'm faced with a choice: 1. Output more material using Argon2. ...
The rainbow signature was not seen in round 4 of the NIST PQC standardization process. Was Rainbow not shortlisted?
Rainbow What happened to signatures in the NIST standardization process?
I want to understand how the hardness of Learning With Errors problem varies as size of the error term changes. For example, assuming that the other parameters are the same, 1. LWE with errors sampled from centered binomial distribution of $\{-1, 0, 1\}$ 2. LWE with errors sampled from centered binomial distribut...
Learning with large errors?
I want to understand how the hardness of Learning With Errors problem varies as size of the error term changes. For example, assuming that the other parameters are the same, 1. LWE with errors sampled from centered binomial distribution of $\{-1, 0, 1\}$ 2. LWE with errors sampled from centered binomial distribut...
Let's suppose I encrypt a plaintext with one key and a nonce in CTR block cipher mode of operation. Can I reuse the nonce with another key in another plaintext if I start the block counting with different counters than those used in the first plaintext? I mean (for example), encrypt the first plaintext stopping at t...
In CTR block cipher mode of operation, can I reuse the nonce with another key for encrypting another plaintext if using different counters?
In Learning with errors, what is the relation between the size(or standard deviation) of errors and security?
Since all evaluation in BGV scheme is on polynomials it seems that it does not really matter if the coefficients of the polynomials are within $q$ range or not. All must be okay for the congruent values. **Q1**) If there are no specific optimizations (e.g. RNS) for BGV, can we work in modulo $Kq$, where $K$ is some ...
[According to the documentation of HighwayHash][1], for finding a collision are expected **m/2** guesses, being m the message. *By contrast, 'strong' hashes such as SipHash or HighwayHash require infeasible attacker effort to find a hash collision (an expected 2^32 guesses of m per the birthday paradox) or recover t...
[According to the documentation of HighwayHash][1], for finding a collision are expected $m \over 2$ guesses, being $m$ the message. > By contrast, 'strong' hashes such as SipHash or HighwayHash require infeasible attacker effort to find a hash collision (an expected $2^{32}$ guesses of $m$ per the birthday paradox)...
When you perform CPA against AES, you'll attack either the first or the last round depending on the data you've got at hand. Both attacks are of the same complexity, roughly. If you know the plaintext $p$, then you'll exploit the very first `AddRoundKey` and attack the first `SubBytes` routine, which will allow you ...
I have been learning about Vigenère ciphers and then thought of this scenario: - A cryptographer encrypts a plaintext English message with a Vigenère cipher, - Then another cryptographer, who wants to ensure that the message is very secure, encrypts the ciphertext with another Vigenère cipher (with a different ke...
I have been learning about Vigenère ciphers and then thought of this scenario: - A cryptographer encrypts a plaintext English message with a Vigenère cipher, - then another cryptographer, who wants to ensure that the message is very secure, encrypts the ciphertext with another Vigenère cipher (with a different ke...
Is it safe or reasonable to use the key parameter in a cryptographic hash function as a counter?
Actually I once answered that question in all detail on StackOverflow: https://stackoverflow.com/a/590169/15809 I'm not sure if it would be considered spamming to repeat the answer here but just linking to an answer is frowned upon, so I'll copy it here anyway. --- Your server creates a key pair, consisting of...
JSON Web Tokens (JWTs) ([RFC][1], [introduction][2]) are digitally signed using a secret key (which can be symmetric, but for distributed use cases will [typically be][3] asymmetric). The signature forms the third and final part of the JWT, and can be verified from the JWT recipient side using the same secret key (for ...
How to verify that a JWT was in fact generated by the claimed issuer (iss)?
Is it possible to decipher a ciphertext, in RSA with small primes (two 128-bit factors) when we only have ciphertext $c$, private exponent $d$ and public exponent $e=65537$ to crack it? I try hard on this question but I couldn't find $N$. First try, I write the code to find factors of $ed-1$ and find it on factordb ...
Some interpretations say "By masking a secret value with a uniformly random zero sharing, the masked value appears to be a random value drawn from a uniform distribution. This randomness helps protect the privacy of the original secret value, as it becomes indistinguishable from other random values. Using zero sharings...
Why zero sharings are used to mask secret value to the masked value appears to be a random value?
Crack RSA with $e$ and $d$?
Use SHA3-224 [HMAC](https://en.wikipedia.org/wiki/HMAC). Define a security parameter $\kappa$, and both sides consume that much $K_i$ keying material. A paper based OTP will probably choose a smaller parameter than a TCP-based protocol would choose. Compute and append the $\kappa$ prefix of the HMAC result to...
Suppose one has a password manager, based on symmetric cryptography, that requires a master passphrase to be unlocked. Argon2 is used for deriving a secret key from the master passphrase. I need several secret keys to encrypt different components, so I'm faced with a choice: 1. Output more material using Argon2. ...
I have seen various papers discussing the security of the Learning with Errors problem with very small uniform secrets and errors but I have not found any papers on the general LWE problem with uniform secrets and errors within (-b,b) range where b < the LWE modulus q but not so small as to be binary or ternary. Is th...
CRYSTALS Dilithium - How does the supporting algorithms work?
There is a common term used in cryptography called a hash collision. If I am reading the definition correctly on wikipedia, this can occur if two different data values give rise to the same hash value. https://en.wikipedia.org/wiki/Hash_collision Duplicate hash, different input: > text1 encoded = hash1 > ...
In an online community, you sometimes have to ban certain IP addresses or even entire IP ranges due to abuse. You may hire moderators to help you with this, but you might not trust them enough to show them everybody’s plain IP address. The question is: *Is there a scheme to encrypt or hash IP addresses in a way that...
In an online community, you sometimes have to ban certain IP addresses or even entire IP ranges due to abuse. You may hire moderators to help you with this, but you might not trust them enough to show them everybody’s plain IP address. The question is: *Is there a scheme to encrypt or hash IP addresses in a way that...
In an online community, you sometimes have to ban certain IP addresses or even entire IP ranges due to abuse. You may hire moderators to help you with this, but you might not trust them enough to show them everybody’s plain IP address. The question is: *Is there a scheme to encrypt or hash IP addresses in a way that...
There is a common term used in cryptography called a hash collision. If I am reading the definition correctly on [Wikipedia](https://en.wikipedia.org/wiki/Hash_collision), this can occur if two different data values give rise to the same hash value. Duplicate hash, different input: > text1 encoded = hash1 > >...
There is a common term used in cryptography called a hash collision. If I am reading the definition correctly on [Wikipedia](https://en.wikipedia.org/wiki/Hash_collision), this can occur if two different data values give rise to the same hash value. Duplicate hash, different input: ``` text1 encoded = hash1 t...
KZG poly-commitment & QAP linear PCP can be proved sound under Knowledge of Exponent assumption or Generic Group Model (I take it for granted from lecture 6 and 9 of ZK-MOOC https://zk-learning.org/), and it seems to me GGM is the preferred one because it permits less trusted setup parameters. If I have understood c...
There is a common term used in cryptography called a hash collision. If I am reading the definition correctly on [Wikipedia](https://en.wikipedia.org/wiki/Hash_collision), this can occur if two different data values give rise to the same hash value. Duplicate hash, different input: ``` text1 encoded = hash1 t...
There is a common term used in cryptography called a hash collision. If I am reading the definition correctly on [Wikipedia](https://en.wikipedia.org/wiki/Hash_collision), this can occur if two different data values give rise to the same hash value. Duplicate hash, different input: ``` text1 encoded = hash1 t...
There is a common term used in cryptography called a hash collision. If I am reading the definition correctly on [Wikipedia](https://en.wikipedia.org/wiki/Hash_collision), this can occur if two different data values give rise to the same hash value. Duplicate hash, different input: ``` text1 encoded = hash1 t...
There is a common term used in cryptography called a hash collision. If I am reading the definition correctly on [Wikipedia](https://en.wikipedia.org/wiki/Hash_collision), this can occur if two different data values give rise to the same hash value. Duplicate hash, different input: ``` text1 encoded = hash1 t...
Assume we have a hash table using the function h(x) = x mod 32. Also assume it dynamically resizes by doubling the amount of buckets and rehashing. If I was able to provide inputs for the hash table it would be really easy to flood with colliding entries to slow lookups to O(n). However, say we were to xor each inp...
I have been unable to find any mathematical explanations on how TrueCrypt's plausible deniability encryption works, when using TC containers. Would someone be able to provide a mathematical walkthrough of how it works? Other encryption systems implementing things in a similar way is outside the scope of my quest...
How does the plausible deniability used by TrueCrypt work mathematically?
Assume we have a hash table using the function <s>h(x) = x mod 32</s>. h(x) = x mod 33. Also assume it dynamically resizes by doubling the amount of buckets and rehashing. If I was able to provide inputs for the hash table it would be really easy to flood with colliding entries to slow lookups to O(n). However, say...
In short what are the differences (pros & cons) between multiplying by powers of Tau (from this lecture https://youtu.be/tAdLHQVW) [![from this lecture https://youtu.be/tAdLHQVWlUY ][1]][1] and raising to powers of Tau (from this lecture https://youtu.be/xuGQYEvytxk) [![from this lecture https://youtu.be/xuGQ...
What is the difference between those two KZG SNARKS (Plonk)?
In short what are the differences (pros & cons) between multiplying by powers of Tau (from this lecture https://youtu.be/tAdLHQVW) [![from this lecture https://youtu.be/tAdLHQVWlUY ][1]][1] and raising to powers of Tau (from this lecture https://youtu.be/xuGQYEvytxk) [![from this lecture https://youtu.be/xuGQ...
There is a common term used in cryptography called a hash collision. If I am reading the definition correctly on [Wikipedia](https://en.wikipedia.org/wiki/Hash_collision), this can occur if two different data values give rise to the same hash value. Duplicate hash, different input: ``` text1 encoded = hash1 t...
There is a common term used in cryptography called a hash collision. If I am reading the definition correctly on [Wikipedia](https://en.wikipedia.org/wiki/Hash_collision), this can occur if two different data values give rise to the same hash value. Duplicate hash, different input: ``` text1 encoded = hash1 t...
I am relatively new to cryptography and am curious what cryptographers would say about what I think is a beautiful one-way hash function described in a paper I found here https://arxiv.org/abs/1801.05079 To summarize the hash function, the Collatz function $f: \mathbb N \rightarrow \mathbb N$, is defined as $f(n)=(3...
I read somewhere that ike1 does not support asymmetric authentication. Does that mean that it does nit support PKI authentication (digital certs)? Thanks Champ
What does it mean when they say IKEv1 does not support asymmetric authentication?
I read this in the [documentation of HighwayHash][1]: > By contrast, 'strong' hashes such as SipHash or HighwayHash require > infeasible attacker effort to find a hash collision (an expected 2^32 > guesses of m per the birthday paradox) or recover the seed (2^63 > requests). These security claims assume the seed ...
Hashing a seed full of entropy with a cryptographic hash function and emiting a key with the same size as input: can a collision attack occurs?
I am trying to solve a problem where private key exponent d, ciphertext c, and public key exponent e (65537) are known. How can I calculate &phi;(n) or n itself? An extended version of the problem would be : *If we can get many d and ciphers for the same plaintext, where e is always 65537, is there a way to decr...
CRYSTALS-Dilithium - How do the supporting algorithms work?
There is a common term used in cryptography called a hash collision. If I am reading the definition correctly on [Wikipedia](https://en.wikipedia.org/wiki/Hash_collision), this can occur if two different data values give rise to the same hash value. Duplicate hash, different input: ``` text1 encoded = hash1 t...
I'm implementing impossible differential cryptanalysis on mini-AES using [Raphael phan's paper][1]. I've coded mini AES using [Raphael phan's first paper on the structure of mini-AES][1], where he only mentions 2-round mini-AES. But in the impossible differential paper we're attacking 5-round mini-AES so I need t...
What are the RCons for mini-AES if you want to encrypt more than 2 rounds?
I'm implementing impossible differential cryptanalysis on mini-AES using [Raphael phan's paper][1]. I've coded mini AES using [Raphael phan's first paper on the structure of mini-AES][1], where he only mentions 2-round mini-AES. But in the impossible differential paper we're attacking 5-round mini-AES so I need t...
Is there a list of all the (most) assumptions (such as RSA and DDH assumptions) used in cryptography and the corresponding properties?
Security assumption: Where is an assumption from (who provides and formalizes it)?
I'm implementing impossible differential cryptanalysis on mini-AES using [Raphael phan's paper][1]. I've coded mini-AES using [Raphael phan's first paper on the structure of mini-AES][1], where he only mentions 2-round mini-AES. But in the impossible differential paper we're attacking 5-round mini-AES so I need t...
> I read somewhere that ike1 does not support asymmetric authentication. Does that mean that it does nit support PKI authentication (digital certs)? No, it doesn't mean that - IKEv1 does allow PKI authentication. What it means that both sides must share the same type of authentication. To explain further: IKE...
> I read somewhere that ike1 does not support asymmetric authentication. Does that mean that it does nit support PKI authentication (digital certs)? No, it doesn't mean that - IKEv1 does allow PKI authentication. What it means that both sides must share the same type of authentication. To explain further: IKE...
What is the difference between those two KZG Polynomial Commitment Schemes?
Since all evaluation in BGV scheme is on polynomials it seems that it does not really matter if the coefficients of the polynomials are within $q$ range or not. All must be okay for the congruent values. I have the following questions: 1. If there are no specific optimizations (e.g. RNS) for BGV, can we work in ...
> If this hash function is used on some server somewhere and people have the ability to supply it with entries, is it (relatively) safe from algorithmic complexity attacks? No, here is one attack funnels all entries into 33 slots (even if there were 10,000 entries): Have the attacker submit 10,000 entries that al...
Why was the dimension of A doubled in kyber? LWE encryption uses a public matrix A of dimension K but kyber uses a double matrix A resulting in $A ^{ k * k * n }$ When deriving the results of the definition of gen, enc en dec this results in: $$ RA_0 S + RA_1 S + RE + E_3 + \frac{q}{2}m - RA_0 S + RA_1 S + ES...
I am studying the zerocoin paper(https://ieeexplore.ieee.org/abstract/document/6547123), more precisely I am stuck at page 6, on the Spend function (in paragraph *"B. Our construction"*). I am not understanding how is the ZKSoK computed. Let's consider the Pedersen commitment as [![enter image description here][...
I'm implementing impossible differential cryptanalysis on mini-AES using [Raphael phan's paper][1]. I've coded mini-AES using [Raphael phan's first paper on the structure of mini-AES][2], where he only mentions 2-round mini-AES. But in the impossible differential paper we're attacking 5-round mini-AES so I need t...
I am reading the [Wikipedia page for Interactive proof systems][1] and am having trouble understand the notation in the definition of soundness, many of which is left unspecified. Given a formal language of strings $L$, a verifier $\mathcal{V}$ for this language satisfies the *soundness property* if for every prover...
Informally, a signature scheme with message recovery is one where some or all of the message is embedded in the signature. That can reduce the size of the signed message, sometime by a proportion approaching 2, e.g. for RSA public-key certificates. ### Common practice: Signature scheme with appendix <!--- trim Com...
I am studying the [zerocoin paper][1]‡. More precisely I am stuck at [page 6][2], on the Spend function (in paragraph *"B. Our construction"*). I am not understanding how the ZKSoK is computed. Let's consider the Pedersen commitment as $$C\gets g^Sh^r\bmod p$$ <!--- [![enter image description here][1]][1] [1...
The conventional and simple wisdom is to combine `head` with `/dev/urandom` to create the amount of pseudo-random data that is needed. But that is slow. I found a faster method - `cryptsetup` FAQ suggests to use its mechanism. See 2.19 at: https://gitlab.com/cryptsetup/cryptsetup/-/wikis/FrequentlyAskedQuesti...
I don't understand why relinearization is so significant. I understand the equations in the paper (in this post I'll be using notation from BV but I would it applies to BGV+BFV) but if anything it seems like it would be ***less*** efficient. We go from: $$h_0+\sum_ih_ix_i+\sum_{i,j}h_{i,j}x_ix_j$$ to utilizing t and ...
I don't understand why relinearization is so significant. I understand the equations in the paper (in this post I'll be using notation from BV but I would it applies to BGV+BFV) but if anything it seems like it would be ***less*** efficient. We go from: $$h_0+\sum_ih_ix_i+\sum_{i,j}h_{i,j}x_ix_j$$ to utilizing t and ...
In "Efficient reductions among lattice problems" by Micciancio (2007) it is said, that **SVP reduces to SIVP in their exact versions**. I did not found anything about this fact, is a reduction that trivial? Does the same hold for their approximation versions?
I read this in the [documentation of HighwayHash][1]: > By contrast, 'strong' hashes such as SipHash or HighwayHash require > infeasible attacker effort to find a hash collision (an expected 2^32 > guesses of m per the birthday paradox) or recover the seed (2^63 > requests). These security claims assume the seed ...
I think I understand the value of using ZKP's for proving things about data in isolated systems, like for privacy and computation roll-ups in blockchains L2's. But I hear a lot about real-world use-cases, a classic example is proving your age is above a certain number, or proving your income to a mortgage lender, wi...
If a trusted entity is required to attest to a user's data accuracy, what is the value-add of ZKP's?
I think I understand the value of using ZKP's for proving things about data in isolated systems, like for privacy and computation roll-ups in blockchains L2's. But I hear a lot about real-world use-cases, a classic example is proving your age is above a certain number, or proving your income to a mortgage lender, wi...
I am trying to understand how this ciphertext length is calculated from a signcryption scheme to analyze the communication cost. I understand, we consider the key length and the message length to calculate the ciphertext length. But don't understand at what step and what parameters we actually consider. For example, in...
How to compute a ciphertext length from a cryptographic scheme?
Intuitively, if we can invert a PRG, then we can easily distinguish it with random distribution by checking g(inverse(y)) = y. So every PRG is a OWF?
Is every pseudorandom generator a one-way function?
Intuitively, if we can invert a PRG, then we can easily distinguish it with random distribution by checking g(inverse(y)) = y. So every PRG is a OWF? I can prove that if the output length is large enough (for example |g(x)| >= 2|x|) then the PRG must be a OWF, but it seems that such a restriction is not necessary.
Is every pseudorandom generator a one-way function, even if the output length has no extra restrictions?
Intuitively, if we can invert a PRG, then we can easily distinguish it with random distribution by checking g(inverse(y)) = y. So every PRG is a OWF? Unlike the problem "[Is every pseudorandom generator a one way function?](https://crypto.stackexchange.com/questions/41140/is-every-pseudorandom-generator-a-one-way-fu...
I am trying to understand how this ciphertext length is calculated from a signcryption scheme to analyze the communication cost. I understand, we consider the key length and the message length to calculate the ciphertext length. But don't understand at what step and what parameters we actually consider. For example, in...