instruction
stringlengths
15
30k
Recently, I was reading about Blake2B and its properties regarding randomness and security, and its connection to Daniel Bernstein's CHA CHA digest. As a budding cryptographer, I find it doable to implement those algorithms, but I find it very hard to grasp why the specific functions were chosen. From wikipedia, this ...
We know that a trapdoor function $f()$ is easy to compute in its original direction $y=f(x)$ while finding its inverse $x=f^{-1}(y)$ requires a secret information: without that *trapdoor* inverting $f()$ is hard: let's say it requires applying $f()$ to many preimages $x$ until the required image $y$ is found, so it's s...
We know that a trapdoor function $f()$ is easy to compute in its original direction $y=f(x)$ while finding its inverse $x=f^{-1}(y)$ requires a secret information: without that *trapdoor* inverting $f()$ is hard: let's say it requires applying $f()$ to many preimages $x$ until the required image $y$ is found, so it's s...
Digital Signatures use an asymmetric algorithm, meaning that if I want to apply a digital signature to a document I sign it with my own private key and send it to the recipient. The recipient, thanks to the public key, can already verify that the message really comes from me: a man in the middle could have intercept...
If a system provide n bits of security, it is known that the best possible attack against the system would be 2^n (security parameter). However, why are the key sizes of some cryptosystems much larger than their security parameters? Is it because these cryptosystems have a weak and vulnerable algorithm?
Does higher key sizes correspond to a higher security parameter?
In RSA ,the encryption, Can we choose the public exponent (e) greater than m (modulus) or e > φ(n) ? I wonder about choosing public key exponents (e) because the most information on the internet or articles has generated public keys from these 2 conditions : 1. 1 < e < phi(n) 2. e < m So is it possible that ...
In RSA ,the encryption, Can we choose public exponent e greater than m (modulus) or e>φ(n)?
If $\Pi=(\mathrm{Gen},\mathrm{Enc},\mathrm{Dec})$ is a CPA secure public key encryption protocol, is the following public key encryption CPA secure? $\Pi'$: - $\mathrm{Gen'}$: Run $\mathrm{Gen}$ twice to get keys $\langle pk_1,sk_1\rangle$ and $\langle pk_2,sk_2\rangle$. - $\mathrm{Enc'}$: Take $pk=\langle pk_1,pk...
Is using a CPA secure public key encryption twice on two halves of the message with different keys secure?
Why [Oribatida][1] uses previous capacity $V_{a+m-1}$ instead of current capacity $V_{a+m}$ for rate masking? [1]: https://www.degruyter.com/document/doi/10.1515/jmc-2020-0018/pdf
I found this recent paper [The Wiener Attack on RSA Revisited: A Quest for the Exact Bound][1], which reported a new bound $d\le \frac 1 {\sqrt[n]{18}} N^\frac 1 4$. Is this well accepted in the cryptanalysis research community? With a Python script, I personally verified the d revealed from the given (N,e) in Sec...
Is this new bound for Wiener Attack well accepted?
> we can arbitrarily choose an exponent $e$ as long as $\gcd(e,\phi(n))=1$. **No.** If we want any security, we further : - Must NOT choose $e=1$, because that makes $x\mapsto x^e\bmod n$ the identity function over $[0,n)$. - Must NOT choose $e$ in a way revealing information about of $\phi(n)$ or the factors of...
In RSA ,the encryption, Can we choose the public exponent (e) greater than m (modulus) or e > φ(n) ? I wonder about choosing public key exponents (e) because the most information on the internet or articles has generated public keys from these 2 conditions : 1. 1 < e < phi(n) 2. e < m So is it possible that ...
In RSA Encryption, Can we choose the public exponent e greater than m (modulus) or e>φ(n) and Will there be a problem?
In RSA Encryption, Can we choose the public exponent e > m (modulus) or e>φ(n) and Will there be a problem?
In RSA Encryption, Can we choose the public exponent e > m (modulus) Will there be a problem?
In RSA Encryption, Can the public exponent e > m (modulus), Will there be a problem?
> we can arbitrarily choose an exponent $e$ as long as $\gcd(e,\phi(n))=1$. **No.** If we want any security, we further : - Must NOT choose $e=1$, because that makes $x\mapsto x^e\bmod n$ the identity function over $[0,n)$. - Must NOT choose $e$ in a way revealing information about of $\phi(n)$ or the factors of...
In RSA Encryption, Can the public exponent e > m (modulus) ? and can we choose any public key without paying attention to the conditions?
I'm using Pedersen commitments to maintain the account balance in the ledger. 1. Assume that when I create the account, I record the Pedersen commitment of 0 in a ledger (here, the blinding factor and generators are also recorded in a ledger). 2. First, I minted some tokens, let's say 10 tokens. Now I retrieve ...
How can I determine if the result of subtracting two Pedersen commitments is negative or positive?
If $\Pi=(\mathrm{Gen},\mathrm{Enc},\mathrm{Dec})$ is a CPA secure public key encryption protocol, is the following public key encryption CPA secure? $\Pi'$: - $\mathrm{Gen'}$: Run $\mathrm{Gen}$ twice to get keys $\langle pk_1,sk_1\rangle$ and $\langle pk_2,sk_2\rangle$. - $\mathrm{Enc'}$: Take $pk=\langle pk_1,pk...
I am wondering to what degree we can define an RSA variant, with a security argument that it is as safe as regular RSA with a given modulus size $m$ (e.g. $m=2048$), in which the **public** key has a compact representation of $k \ll m$ bits. We can fix the public exponent to our favorite customary value, e.g. $e=2^{...
By SHAKE256_256, I mean taking first 256 bits of the output of SHAKE256 i.e. SHAKE256_256(M) = SHAKE256(M,256) What is the motivation of choosing SHAKE256_256 instead of SHA3-256 in XMSS and SPHINCS. Are there any advantages of SHAKE256_256 over SHA3-256. As far as I know, they both have 24 rounds keccak...
To what degree can we define an RSA variant, with a security argument that it is as safe as regular RSA with a given modulus size $m$ (e.g. $m=2048$), in which the **public** key has a compact representation of $k\ll m$ bits? We can fix the public exponent to our favorite customary value, e.g. $e=2^{16}+1$ or $e=3$,...
Can we define an RSA variant in which the public key with $n$-bit public modulus $N$ has a compact representation of $\kappa\ll n/2$ bits, with a security argument that it is as safe as regular RSA for a given $n$ (e.g. $n=2048$), and the constraint that the two prime factors $p$ and $q$ of $N$ have (about) equal bit s...
How much can we compress RSA public keys with two equal size factors?
In [*Hybrid key exchange in TLS 1.3*](https://www.ietf.org/id/draft-ietf-tls-hybrid-design-09.html#name-introduction), they mention that with a hybrid approach, we concatenate the shared secret from each method (say KEM like Kyber768 + classical ECDH X25519 = X22519Kyer768). concatenated_shared_secret = sha...
> Is [this][1] well accepted in the cryptanalysis research community? I see no reason there would be a doubt. However, the exact bound for Wiener's attack is not a hot topic, because: - Dan Boneh & Glenn Durfee's [_Cryptanalysis of RSA with Private Key $d$ Less than $N^{0.292}$_](https://doi.org/10.1109/18.54902) ...
> How does this concatenation provide the simultaneous benefit of both classical and quantum at the same time? This proposal assumes the TLS 1.3 key derivation chain, where they perform an HKDF-Extract on the shared secret (that is, the concatination of the classical and the postquantum shared secrets). With HKDF...
> Is [this][1] $d<\frac 1 {\sqrt[n]{18}} N^\frac1 4$ bound well accepted in the cryptanalysis research community? I see no reason there would be a doubt. However, the exact bound for Wiener's attack is not a hot topic, because: - Dan Boneh & Glenn Durfee's [_Cryptanalysis of RSA with Private Key $d$ Less than $N^{...
> Is [this][1] $d<\frac 1 {\sqrt[n]{18}} N^\frac1 4$ bound well accepted in the cryptanalysis research community? I see no reason there would be a doubt. However, the exact bound for Wiener's attack is not a hot topic, because: - Dan Boneh & Glenn Durfee's [_Cryptanalysis of RSA with Private Key $d$ Less than $N^{...
> How does this concatenation provide the simultaneous benefit of both classical and quantum at the same time? This proposal assumes the TLS 1.3 key derivation chain, where they perform an HKDF-Extract on the shared secret (that is, the concatenation of the classical and the postquantum shared secrets). With HKDF...
Note: the bound discussed in the [linked paper][1] is $d<\frac 1 {\sqrt[4]{18}} N^\frac1 4$, not $d<\frac 1 {\sqrt[n]{18}} N^\frac1 4$ as in the question. > Is [this][1] bound well accepted in the cryptanalysis research community? I see no reason there would be a doubt. However, the exact bound for Wiener's atta...
Note: the bound discussed in the [linked paper][1] is $d<\frac 1 {\sqrt[4]{18}} N^\frac1 4$, not $d<\frac 1 {\sqrt[n]{18}} N^\frac1 4$ as in the question. > Is this bound well accepted in the cryptanalysis research community? I see no reason why there would be a doubt. However, the exact bound for Wiener's attac...
I found this recent paper [The Wiener Attack on RSA Revisited: A Quest for the Exact Bound][1], which reported a new bound $d\le \frac 1 {\sqrt[4]{18}} N^\frac 1 4$. Is this well accepted in the cryptanalysis research community? With a Python script, I personally verified the d revealed from the given (N,e) in Sec...
What are the statefulness and signature count limits of SPHINCS+?
> Is this $\frac 1{\sqrt[4]{18}}N^\frac1 4$ bound well accepted in the cryptanalysis research community? I see no reason why there would be a doubt. However, the exact bound for Wiener's attack is not the subject of much scrutiny by the cryptanalysis research community, because: - Dan Boneh & Glenn Durfee's [_Cryp...
I was thinking about how SRP might be used with Curve25519 or Curve448. In this question, https://crypto.stackexchange.com/questions/6519/can-srp-be-used-with-elliptic-curves, the answer is that you can't directly translate SRP to a group that isn't also a ring, because SRP uses not just multiplication but also additi...
SRP on elliptic curves: replacing + and - operations?
I found this recent paper [The Wiener Attack on RSA Revisited: A Quest for the Exact Bound][1], which reported a new bound $d\le \frac 1 {\sqrt[4]{18}} N^\frac 1 4$. Is this well accepted in the cryptanalysis research community? With a Python script, I personally verified the d revealed from the given (N,e) in Sec...
I have a scenario where same k is used but also the value for z1 and z2 is identical which leaves only s1 and s2 different. Here: r1 = r2 z1 = z2 s1 not s2 Does this mean an attacker can recover my secret key or i am protected? Thank you
Can ecdsa be broken if same nonce is used the same message?
Can ecdsa be broken if same nonce is used with the same message?
In RSA ,the encryption, Can we choose the public exponent (e) greater than m (modulus) or e > φ(n) ? I wonder about choosing public key exponents (e) because the most information on the internet or articles has generated public keys from these 2 conditions : 1. 1 < e < phi(n) 2. e < m So is it possible that we...
In RSA Encryption, Can I choose the public exponent e > m (modulus) ? or e > φ(n)?
> Is this $\frac 1{\sqrt[4]{18}}N^\frac1 4$ bound well accepted in the cryptanalysis research community? I see no reason why there would be a doubt. However, the exact bound for Wiener's attack is not the subject of much scrutiny by the cryptanalysis research community, because: - Dan Boneh & Glenn Durfee's [_Cryp...
An efficient algorithm for factoring would be a major mathematical achievement giving the person who discovered it anstant fame. About two years ago, C. P. Schnorr claimed such a breakthrough but it turned out the approach did not work as well as he thought. The technical details of his approach were extensively discus...
Passkeys are being introduced. From what I understand so far, a passkey involves the storage of a private key, and retention of a public key with the internet service. Eg Google, Apple, Microsoft, Reddit, StackExchange, etc. Does the formation of a passkey, or the subsequent use of a passkey by itself alone, id...
Does the use of a passkey link your physical device id, eg IMEI, to that specific passkey?
Passkey (and FIDO in general) generates keypairs on the device rather than on the server. The web servers can only know the type of device that generates them, but can't tell the specific model. This is because of the information included in the data format used for key attestation. The device provide different ...
Does the use of a passkey (FIDO) link your physical device id, eg IMEI, to that specific passkey?
Or, you don't. This question is predicated on the notion that such a break though is made by an academic (as was Schnorr). And also that it would be _"catastrophic"_. To whom? Since we're dealing with alternative realities, can I suggest an alternative to your alternative? Since the brightest and best cryptograp...
I have a scenario where $k_2 = -k_1$ while $z_1$ and $z_2$ are identical. Due to the different but possibly equivalent $k$ values the $s_1$ and $s_2$ are different. So we have $r_1 = r_2$ and $z_1 = z_2$ but $s_1 \neq s_2$. Does this mean an attacker can recover my secret key or am I protected?
Can ECDSA be broken if same nonce is used with the same message?
I have a scenario where $k_2 = -k_1$ while $z_1$ and $z_2$ are identical but the values $s_1$ and $s_2$ are different. So we have $r_1 = r_2$ and $z_1 = z_2$ but $s_1 \neq s_2$. Does this mean an attacker can recover my secret key or I am protected?
Hashing functions are used for data integrity when integrated with signing asymmetric algorithms but I miss a step. In multiple sources like [here][1] or [here][2] I read for granted that hashing algorithm per se are enough for ensuring data integrity. Let's go into an example. We hash the content and send it alon...
Is hashing really enough for data integrity or needs signing?
For some [common curve][1], can we exhibit three distinct ECDSA signatures $(r,s_1)$, $(r,s_2)$, $(r,s_3)$, a message $m$, and valid public key $Q$, such that the signatures verify? Can we also generate the private key $d$ matching $Q$? Can we do this for given $Q$ and matching $d$? ___ For two signatures, that...
Three ECDSA signatures sharing first component r, verifying against same message and public key?
For some [common curve][1], can we exhibit three distinct [ECDSA][2] signatures $(r,s_1)$, $(r,s_2)$, $(r,s_3)$, a message $m$, and valid public key $Q$, such that the signatures verify? Can we also generate the private key $d$ matching $Q$? Can we do this for given $Q$ and matching $d$? ___ For two signatures,...
For some [common curve][1], can we exhibit three distinct [ECDSA][2] signatures $(r,s_1)$, $(r,s_2)$, $(r,s_3)$, a message $m$, and valid public key $Q$, such that the signatures verify? Can we also generate the private key $d$ matching $Q$? Can we do this for given $Q$ and matching $d$? ___ For two signatures,...
I generated a Pedersen commitment for a given account balance (say, 10) and stored it in the ledger. Now, when I debit 15 tokens from the same account, I first retrieve the Pedersen commitment of 10 from the ledger and subtract it from the Pedersen commitment of 15, and then I want to check whether the resultant Peders...
I'm an amateur so bare with me. I was thinking about an E2E solution for data-at-rest proxy scenarios (like cloud storage provider) that allows you to issue and revoke users via symmetric keys. I'm thinking that Alice wants to communicate with Bob, via Eve. Without revealing the master key to Bob or Eve, this see...
Does something like Symmetric reencryption exist?
i have a pretty straightforward question but i can’t seem to find an answer : Regardless of the physical protection provided by an HSM or TPM or any hardware cryptographic key storage system, are keys generated in hardware “higher quality” than those generated in software? in the sense that in software, pseudora...
I'm an amateur so bare with me. I was thinking about an E2E solution for data-at-rest proxy scenarios (like cloud storage provider) that allows you to issue and revoke users via symmetric keys. I'm thinking that Alice wants to communicate with Bob, via Eve. Without revealing the master key to Bob or Eve, this see...
> Regardless of the physical protection provided by an HSM or TPM or any hardware cryptographic key storage system, are keys generated in hardware “higher quality” than those generated in software? This is not necessarily the case. The fact that these systems are often certified to work correctly and securely doe...
> Regardless of the physical protection provided by an HSM or TPM or any hardware cryptographic key storage system, are keys generated in hardware “higher quality” than those generated in software? This is not necessarily the case. The fact that these systems are often certified to work correctly and securely doe...
I'm an amateur so bear with me. I was thinking about an E2E solution for data-at-rest proxy scenarios (like cloud storage provider) that allows you to issue and revoke users via symmetric keys. I'm thinking that Alice wants to communicate with Bob, via Eve. Without revealing the master key to Bob or Eve, this see...
> Is it possible at all? The primary concern here is, without knowing the original value of Pedersen commitment, is it possible to determine if it is a negative or positive number if I only have Pedersen commitment (and corresponding blinding factor, generator)? No, it is not (independent of what "negative" means in...
> Regardless of the physical protection provided by an HSM or TPM or any hardware cryptographic key storage system, are keys generated in hardware “higher quality” than those generated in software? This is not necessarily the case. The fact that these systems are often certified to work correctly and securely doe...
I was having a conversation with a private key cryptologist who claimed they created and distributed, in the early 1990s, all 32 bit primes on 1 640Mb CD-ROM, which could also used for immediate lookup of 32 prime factors, is that even possible, in early 1990s? They also claimed that design has been upgraded over 3...
All 32 bit primes on 1 640Mb CD-ROM , and then used as immediate lookup of 32 prime factors, is that even possible, in early 1990s?
I was having a conversation with a private key cryptologist who claimed they created and distributed, in the early 1990s, all 32 bit primes on 1 640Mb CD-ROM, which could also used for immediate lookup of resulting prime factors, is that even possible, in early 1990s? They also claimed that design has been upgraded...
All 32 bit primes on 1 640Mb CD-ROM , and then used as immediate lookup of resulting prime factors, is that even possible, in early 1990s?
Lookup from a CD is really really slow. Building a list of all 32bit primes in the early 90s very plausible, putting it on a CD? didn't count them, but sounds about correct. Using them as a lookup? probably not. Maybe as a sieve, not exactly "an immediate lookup" reading from CD(or more likely a magnetic hard drive d...
I wonder,Is gcd(e,p−1)=1 = gcd(e,q−1) similar to gcd(e,phi(n))=1 ??
Is gcd(e,p−1)=1=gcd(e,q−1) similar to gcd(e,phi(n))=1?
I have an elliptice curve in the form > y² = x³ + ax + b (mod p) And I have a multiplication algortihm which uses only x and z coordinate How can I recover the Y coordinate ? I tried to use the curve equation, but because of sqrt_mod, there's 2 possibles solutions and I don't know which one to choose ```...
I have an elliptice curve in the form > y² = x³ + ax + b (mod p) And I have a multiplication algortihm which uses only x and z coordinate How can I recover the Y coordinate ? I tried to use the curve equation, but because of sqrt_mod, there's 2 possibles solutions and I don't know which one to choose ```...
I have an elliptice curve in the form > y² = x³ + ax + b (mod p) And I have a multiplication algortihm which uses only x and z coordinate How can I recover the Y coordinate ? I tried to use the curve equation, but because of sqrt_mod, there's 2 possibles solutions and I don't know which one to choose ```...
I have an elliptice curve in the form > y² = x³ + ax + b (mod p) And I have a multiplication algortihm which uses only x and z coordinate How can I recover the Y coordinate ? I tried to use the curve equation, but because of sqrt_mod, there's 2 possibles solutions and I don't know which one to choose ```...
This question drew my attention to the design of ["Schwaemm and Esch: Lightweight Authenticated Encryption and Hashing using the Sparkle Permutation Family"][1]. In the enhanced sponge-based design, they incorporated a portion of rate whitening. However, this aspect is not accounted for in the security analysis, as it ...
Here's the code: salt = b'salt123123123' password = 'password123' hash_password = argon2.PasswordHasher().hash(password.encode('UTF-8'), salt = salt) Returns $argon2id$v=19$m=65536,t=3,p=4$c2FsdDEyMzEyMzEyMw$GJrdl/EO1WTelvwalnJsSc/JcMsS0LGEVsIwcd/xSIU The salt here is c2FsdDEyMzEyMzEyMw, h...
I made two Linux kernel modules of Hasty Pudding Cipher with key size of 16896-bits (16384-bits key + 512-bits tweak also called "spice), one has 512-bits of block size, the other 128-bits. I would like to use the 128-bits block size version with XTS in Linux, but I read [an answer][1] here in the forum saying that ...
What is the security of XTS block cipher mode of operation if the key is much larger than the block size?
[This](https://eprint.iacr.org/2022/1695.pdf) paper says in the appendix, >At a high-level, malicious privacy is defined similar to malicious security, but with a modified ideal functionality that is corruptible, meaning that the adversary can control what it outputs. So does malicious privacy refer to malicious se...
What is malicious privacy?
[This](https://eprint.iacr.org/2022/1695.pdf) paper says in the appendix, >At a high-level, malicious privacy is defined similar to malicious security, but with a modified ideal functionality that is corruptible, meaning that the adversary can control what it outputs. So does malicious privacy refer to malicious se...
I'm trying to implement encrypted firmware update functionality for an embedded device. The goal is to prevent reverse engineering of our firmware when the update files are shared with our customers. The approach that I've chosen is to encrypt the firmware using AES-128 with CTR block mode. What I'm pondering right ...
This is from Justin Thaler's book - [Proofs, Arguments & Zero Knowledge](https://people.cs.georgetown.edu/jthaler/ProofsArgsAndZK.pdf) Page 43 > > For it to make sense to talk about multilinear extensions, we need to view the adjacency matrix $A$ not as a matrix, but rather as a function $f_A$ mapping $\lbrace0...
Sumcheck Protocol: How to represent a matrix as an MLE which takes row & column numbers as parameters?
This is from Justin Thaler's book - [Proofs, Arguments & Zero Knowledge](https://people.cs.georgetown.edu/jthaler/ProofsArgsAndZK.pdf) Page 43 > > For it to make sense to talk about multilinear extensions, we need to view the adjacency matrix $A$ not as a matrix, but rather as a function $f_A$ mapping $\lbrace0...
I wonder, is $\gcd(e,p−1)=1=\gcd(e,q−1)$ similar to $\gcd(e,\phi(n))=1$ ??
> In figure 4.5, the parameters of $f_A$ is the bit pattern of the element number of the matrix. However, above it changes to row & column numbers. How does this match with figure 4.5? The inputs to $f_A$ are always a pair consisting of a row and column. If the book wanted to be extremely precise, they would have us...
I understand that the // operator is used for floor division in regular arithmetic ``` result = 7 // 3 # This will result in 2 ``` but how can I adapt this to work with the specific mathematical operations involved in secp256k1? Could someone provide guidance or a code snippet illustrating how to perform floor...
Given two values - $r'-r \mod Q$ - $i - r \mod Q$ Where - $r',r$ sampled randomly from $Z_Q$ - while i is pick arbitrarily from $Z_Q$ Can we claim that this hides $i$? Here is my sketch: Distribution of above samples is indistinguishable to - $r'' \mod Q$ - $i - r \mod Q$ Where $r''$ is randomly pic...