instruction
stringlengths
15
30k
I know that in order to find the linear complexity of the two sequence beginnings $$(1,-1,0,-1,0,0,0,0,1,0,\dots)\in\mathbb{Z}_3^\mathbb{N}\\ (2,0,-1,-2,0,0,-2,2,-1,-2,\dots)\in\mathbb{Z}_5^\mathbb{N},$$ I have to find LFSRs that generate these sequences. Do these have to be found by trial and error or is there a bet...
I am reviewing the ZKP course, represented by the university of Berkley (https://zk-learning.org/). In pages 41 and 42 of lecture 6 that is attached below (https://zk-learning.org/assets/lecture6.pdf), the instructor explains the Poly-commitment based on Bulletproofs scheme. He uses an example for a polynomial with deg...
It's asked a theoretical approach, thus I'll suppose the question is not about using existing tools as in [this answer][1], which would be off-topic; but rather I'll assume custom code for the password recovery. The general sketch is to test candidate passwords, approximately from most to least likely, by 1. Turning t...
In a [previous question](https://crypto.stackexchange.com/q/26689/36960), we explored various security definitions of encryption schemes, such as IND-CPA, IND-CPA{1,2,3,etc.} These indistinguishability games can roughly translate to blockciphers, as both data encryption and block encryption involve keys - a hidden p...
In a [previous question](https://crypto.stackexchange.com/q/26689/36960), we explored various security definitions of encryption schemes, such as IND-CPA, IND-CCA{1,2,3,etc.} These indistinguishability games can roughly translate to blockciphers, as both data encryption and block encryption involve keys - a hidden p...
Consider a system in which DES is used to encrypt messages in which the first three plaintext Bytes are known by the attacker. How many encrypted messages is it necessary intercept to be reasonably sure of identifying the key used for encryption? I thought about this, but I am not sure: The probability that pla...
Consider a system in which DES is used to encrypt messages in which the first three plaintext Bytes are known by the attacker. How many encrypted messages is it necessary intercept to be reasonably sure of identifying the key used for encryption? I thought about this, but I am not sure: The probability that pla...
I am looking for references for the most basic secret sharing and MPC arithmetic algorithms for generic rings or prime fields. Problem: >Suppose there are $m$ parties $P_1, \ldots, P_m$ which wish to do arithmetic over a ring. > >They hold some secret shared values $[x], [y]$ and they wish to compute $[x+y]$ and ...
Consider a system in which DES is used to encrypt messages in which the first three plaintext Bytes are known by the attacker. How many encrypted messages is it necessary intercept to be reasonably sure of identifying the key used for encryption? I thought about this, but I am not sure: The probability that pla...
Consider a system in which DES is used to encrypt messages in which the first three plaintext Bytes are known by the attacker. How many encrypted messages is it necessary to intercept in order to be reasonably sure of identifying the key used for encryption? I thought about this, but I am not sure: The probabil...
I am trying to create linear approximation table of AES SBox to better understand linear cryptanalysis, I have followed the formula in [this paper](https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=9447687) (page 7 of pdf file) to be able to generate the linear approximation table of AES S-Box, specifically that...
I am trying to create linear approximation table of AES SBox to better understand linear cryptanalysis, I have followed the formula in [this paper](https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=9447687) (page 7 of pdf file) to be able to generate the linear approximation table of AES S-Box, specifically that...
In the preliminaries section of a paper$^\color{magenta}{\star}$ on lattice-based cryptography, the matrix norm $\| \cdot \|_{2}$ is used. Why do we define such norm? What's the purpose of defining such a norm? Is it common in matrix mathematics? --- [![picture][2]][2] --- $\color{magenta}{\star}$ Dan Bone...
Does Apple secure enclave support rfc6979 with P256 curve? This RFC defines a deterministic ecdsa with a deterministic k value. THATS LINK OF THE RFC https://www.rfc-editor.org/rfc/rfc6979 I looked everywhere in their documentation but couldn't find a mention of such usage
I am looking for references for the most basic secret sharing and MPC arithmetic algorithms for generic rings or prime fields. Problem: >Suppose there are $m$ parties $P_1, \ldots, P_m$ which wish to do arithmetic over a ring. > >They hold some secret shared values $[x], [y]$ and they wish to compute $[x+y]$ and ...
Is it possible to check if a PGP signed message has been tampered with when the public key of the signer is not available? Like, is there a message digest (hash) that can be checked without knowing the public key of the signer? Note that I am aware that, if the message digest is *okay*, it is not possible to prov...
Recently, I have noticed that openssl always gives numbers which have '1' msb two bits. It always begins with 0xC or upper values. It doesn't give primes that starting with 0xB, 0xC, 0xA, 0x9 or 0x8. Common thing among those values is that their bit before msb is '0'. I have an assumption about that situation. In RS...
Recently, I have noticed that openssl always gives numbers which have '1' in upper two bits. It always begins with 0xC or higher values (0xD, 0xE, 0xF). It doesn't give primes that starting with 0xB, 0xC, 0xA, 0x9 or 0x8. Common thing among those values is that their bit before msb is '0'. I have an assumption about...
The observation in the question is incorrect: on my first attempt, `openssl genra` has made me [a key][1] with the first byte of $p$ equal to 0xB8. I'm using the version in [Mint 21.1 Vera][2], such that `openssl version` outputs `OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)`. openssl tries to obe...
> openssl always gives numbers which have '1' in upper two bits. It always begins with 0xC or higher values (0xD, 0xE, 0xF). I observe otherwise. On my first attempt, `openssl genra` made me [a key][1] with the first byte of $p$ equal to 0xB8. I'm using the version in [Mint 21.1 Vera][2], such that `openssl version`...
Assume that we have n people each owning a secret number. Now we want to collaboratively compute the addition of all these numbers without anyone revealing their numbers. Then the result will be made public to all. Wonder what algorithm shall I use? (I have looked into multi-party computation, specifically secret sh...
Assume that we have n people each owning a secret number. Now we want to collaboratively compute the addition of all these numbers without anyone revealing their numbers. Then the result will be made public to all. Wonder what algorithm shall I use? (I have looked into multi-party computation, specifically secret sh...
I have private data and I want to encrypt it to share it with some users who should be able to decrypt it. Therefore, I need multiple keys to decrypt it. But, I also want to be able to revoke a key to prevent someone from decrypting it, is there an algorithm that allows key revocation without encrypting the data again?...
Is there a multi-key encryption and decryption algorithm that allows key revocation?
Matrix norms are common in mathematics. It is worth mentioning that "matrix norm" can mean (at least) two things 1. a norm on the space of matrices, or 2. a *sub-multiplicative* norm on the space of matrices. What does sub-multiplicative mean? A norm must satisfy a few properties, namely 1. non-negative 2. ...
Assume that we have n people each owning a secret number. Now we want to collaboratively compute the addition of all these numbers without anyone revealing their numbers. Then the result will be made public to all. Wonder what algorithm shall I use? (I have looked into multi-party computation, specifically secret sh...
Is it possible to check if a PGP signed message has been tampered with when the public key of the signer is not available? Like, is there a message digest (hash) that can be checked without knowing the public key of the signer? Note that I am aware that, even if the message digest is *okay*, it is not possible to...
Is it possible to check if a PGP signed message has been tampered with when the public key of the signer is not available? Like, is there a message digest (hash) that can be checked without knowing the public key of the signer? Note that I am aware that, even if the message digest is *okay*, it is not possible to...
Suppose we have multiple parties ${P_i}$ each holding a secret share $(y_i,k_i)$ of the secret $(y,k)$. How can we calculate the inverse value $(y+k)^{-1}$ using multiparty computation such that these secret shares are never revealed?
Is it possible to check if a PGP signed message has been modified when the public key of the signer is not available? Like, is there a message digest (hash) that can be checked without knowing the public key of the signer? Note that I am aware that, even if the message digest is *okay*, it is not possible to prov...
Is it possible to check if a PGP signed message has been modified when the public key of the signer is not available? Like, is there a message digest (hash) that can be checked without knowing the public key of the signer? Note that I am aware that, even if the message digest is *okay*, it is not possible to prov...
Clarification on the use of Key block Version ID For the first time since we migrated to the Key Block we are exchanging keys with third parties, The keys were all generated by choosing Key Scheme "S". During export as Key Scheme of ZMK we selected "R". One of the counterparts is experiencing problems and they b...
How do you feel about `n^2` communication costs? If you're okay with that we can do this with Pedersen commitments. The basic protocol works as follows. Each participant `(i=0...n)` - starts with their number `x[i]` and picks a blinding factor `u[i]` - computes a Pedersen commitment of their value `C[i]=G*x[i]+...
How do you feel about `n^2` communication costs? If you're okay with that we can do this with Pedersen commitments. The basic protocol works as follows. Each participant `(i=0...n)` - starts with their number `x[i]` and picks a blinding factor `u[i]` - computes a Pedersen commitment of their value `C[i]=G*x[i]+...
In general or in specific examples, how is the group used in an instance of the hidden subgroup problem embedded into a complex Hilbert space in order to apply the quantum fourier transform needed to solve the problem efficiently? In quantum computing we imagine qubits as unit vectors in a complex Hilbert space $\ma...
I need a digital signature scheme with the following characteristics, but I don't know what it's called, so I'm having trouble searching for publications about it. It seems likely that something like it already exists. Could you please help me identify what it's called? The scheme I need consists of four algorithms:...
> However, Shamir secret reconstruction does not require the shares to be in any order, then why does this fail? Well, Shamir's secret sharing works in a finite field; in your code, you use the field $Z/251$ (which is a valid field). However, in your reconstruction code, you have the line: pt *= po...
By using additive sharing of the private key over the integers, one can obtain a simple threshold RSA signature scheme.\ It provides security against a passive adversary.\ The dealer chooses random $d_{i}$ from $\mathbb{Z}$ such that the RSA private key $d=\sum_{i=1}^{n} d_{i}\mod \phi(n)$.\ In order not to reveal i...
Given **n** voters and **p** candidates, how can we design a trustless voting algorithm that satisfies the following properties. Each voter can only vote for exactly one candidate. The algorithm needs to: * Keep all voters' vote private, i.e. only known to the voter itself * **Keep the number of votes each can...
In mental poker, we can use ZK-shuffle to deal cards to the players such that the cards are kept private to each player (https://hackmd.io/@nmohnblatt/SJKJfVqzq). Suppose we deal exactly one card to each player, I wonder if there is any way for the players who got the cards with the same number to know this fact withou...
After ZK-shuffle, how can we let people who got the same number card know each other without letting anyone else know?
Say $B$ is a server and $A$ is a client who wants to login to the server, by proving herself to $B$. In challenge-response authentication protocols, $B$ sends challenge to $A$ and $A$ replies with response. Here, I think all kinds of challenge-response authentication protocols are vulnerable to Man-in-the-Middle attack...
How about the following straightforward solution? I'm assuming that each party $P_i$ holds an input $x_i$ belonging to some abelian group $\mathbb{G}$, and that the parties are connected through private channels (which can be implemented with key exchange and symmetric encryption). - Each party $P_i$ secretly share...
Say $B$ is a server and $A$ is a client who wants to login to the server, by proving herself to $B$. In challenge-response authentication protocols, $B$ sends challenge to $A$ and $A$ replies with response. Here, I think all kinds of challenge-response authentication protocols are vulnerable to Man-in-the-Middle at...
Say $B$ is a server and $A$ is a client who wants to login to the server, by proving herself to $B$. In challenge-response authentication protocols, $B$ sends challenge to $A$ and $A$ replies with response. Here, I think all kinds of challenge-response authentication protocols are vulnerable to Man-in-the-Middle at...
Say $B$ is a server and $A$ is a client who wants to login to the server, by proving herself to $B$. In challenge-response authentication protocols, $B$ sends challenge to $A$ and $A$ replies with response. Here, I think all kinds of challenge-response authentication protocols are vulnerable to Man-in-the-Middle at...
1. The general question is: Why are ABE schemes usually/sometimes proven in the selective-set of attributes model of security? Or even co-selective (both attributes and policy function)? *Is it just because of difficulties in security proofs, i.e., reductions?* 2. **More precisely**, what are the limitations of the ...
Why do we need "selective security" for ABE?
The spec ( https://github.com/ulid/spec which is not a real standard ) explains that there are 80 random bits in an ULID. UUIDv4 is better from a security aspect, as it has 122 bits for randomness. But UUIDv4 has no monotonic sort order, and that would be very benefical in my actual application. So how bad would it ...
Are Universally Unique Lexicographically Sortable Identifiers (ULIDs) safe to use as a session id?
[bscrypt][1] is a cache-hard password hashing algorithm/KDF from Steve Thomas (aka Sc00bz/TobTu), who was on the [Password Hashing Competition (PHC)][2] panel. He argues it is [better][3] than the alternative algorithms on his minimum password hashing parameters page. There are [two][4] [talks][5] for further informati...
Cache-hard or memory-hard password hashing algorithms?
we have a concern about a key exchange. We completed the migration to Key Block LMK in our environment (with HSM Thales 10K). Now, we have to exchange keys with third-parties that still use Keys in variant form. We generated the keys and formed the ZMK using the Key Block standard. To resolve the issue we have to ex...
I want to test my server application (TLS 1.3) using `s_client` program from the `openssl` library and I need to get from the `s_client` a keyshare in the 1st ClientHello for `secp256r1` (it proposes `x25519` now).<br/> Could you tell me, which command line options in `s_client` should I use ?
How to force openssl/s_client to send a keyshare for the specific elliptic curve (secp256r1)?
Hi I want to implement pedersen commitment ontop of lib sodium <br/> Below is what I am trying to do:<br/> comm1: m1G+r1H <br/> comm2: m2G+r2H <br/> comm3: (m1+m2)G+(r1+r2)H <br/> comm4: comm1+comm2 <br/> and comm3 should equals comm4 <br/> And here is my code: unsigned char x[crypto_core_ristretto255_...
Hi I am new to lib sodium, may I ask that is it possible to get scalar of ristretto255 from integer/bytes or NTL:zz? <br/> Some thing as follows: <br/> ``` unsigned char px[crypto_core_ristretto255_BYTES]; crypto_core_ristretto255_from_bytes(px, x); crypto_core_ristretto255_from_int(px, x); crypto_core_ristretto...
Given integers $s_1, \dots , s_n$ and target integer $t$, I'm trying to find small integer coefficients $x_1, \dots , x_n$ such that: $$ t \approx x_1 s_1 + \dots +x_ns_n $$ Taking inspiration from the Knapsack problem, I was trying to use LLL on the matrix : $$ B = \begin{pmatrix} 1 & & & & \\ & 1 & & & \\...
LWE, factoring and discrete log are currently being deployed or already deployed. Factoring and discrete log has quantum polynomial time algorithms while LWE has none as far as we know. Despite this what is the consequence if all three can be broken on a classical computer? Do we have any other alternatives?
What if LWE, factoring and discrete log are not as secure as we think?
Any SuperSingular curve or similar with Fp = Fq which is not badly broken unless big field orders are used?
If I interpret your question correctly, you want to know if there is a curve over a prime field $\mathbb F_p$ such that the order of the curve group is itself $p$. Such curves are called anomalous curves and they are even weaker than supersingular curves. The works of [Semaev][1], [Smart][2], [Sato and Araki][3] give a...
Given $e(a,b)$ as known, can I get the value of $a$ or $b$?
Is bilinear pairing reversible?
In general or in specific examples, how is the group used in an instance of the hidden subgroup problem embedded into a complex Hilbert space in order to apply the quantum fourier transform needed to solve the problem efficiently? In quantum computing we imagine qubits as unit vectors in a complex Hilbert space $\ma...
LWE, factoring and discrete log are currently being deployed or already deployed. Factoring and discrete log has quantum polynomial time algorithms while LWE has none as far as we know. >Despite this what is the consequence if all three can be broken on a classical computer? Do we have any other alternatives?
we have a concern about a key export. We completed the migration to Key Block LMK in our environment (with HSM Thales 10K). Now, we have to exchange keys with third-parties that still use Keys in variant form. We generated the keys and formed the ZMK using the Key Block standard. To resolve the issue we have to expo...
Let $N=pq$ be an RSA modulus, that is, $p$ and $q$ are large, distinct primes.\ Let $J_{N}=\{y\in\mathbb{Z}^{*}_{N}:(\frac{y}{N})_{J}=1\}$ denote the set of all integers in $\mathbb{Z}^{*}_{N}$ with Jacobi symbol $1$.\ The Quadratic Residuosity (QR) problem is to decide whether a given $y\in J_{N}$ is a quadratic res...
Let $N=pq$ be an RSA modulus, that is, $p$ and $q$ are large, distinct primes.\ Let $J_{N}=\{y\in\mathbb{Z}^{*}_{N}:(\frac{y}{N})_{J}=1\}$ denote the set of all integers in $\mathbb{Z}^{*}_{N}$ with Jacobi symbol $1$.\ The Quadratic Residuosity (QR) problem is to decide whether a given $y\in J_{N}$ is a quadratic res...
In asymmetric key encryption, we have 2 functions, `encrypt(m,k)` and `decrypt(m,k)`, and 2 keys, `public_key` and `private_key`. And it must hold true that `decrypt(encrypt(msg, public_key), private_key)) = msg`. Question 1: Are the `encrypt(m,k)` and `decrypt(m,k)` functions different, or are they the same func...
Are asymmetric encryption and decryption same function?
Let $N=pq$ be an RSA modulus, that is, $p$ and $q$ are large, distinct primes.\ Let $J_{N}=\{y\in\mathbb{Z}^{*}_{N}:(\frac{y}{N})_{J}=1\}$ denote the set of all integers in $\mathbb{Z}^{*}_{N}$ with Jacobi symbol $1$.\ The Quadratic Residuosity (QR) problem is to decide whether a given $y\in J_{N}$ is a quadratic res...
Let $N=pq$ be an RSA modulus, that is, $p$ and $q$ are large, distinct primes.\ Let $J_{N}=\{y\in\mathbb{Z}^{*}_{N}:(\frac{y}{N})_{J}=1\}$ denote the set of all integers in $\mathbb{Z}^{*}_{N}$ with Jacobi symbol $1$.\ The Quadratic Residuosity (QR) problem is to decide whether a given $y\in J_{N}$ is a quadratic res...
Homomorphic properties turn out to be very useful, e.g., for achieving secure multiparty computation. \ As a concrete example, homomorphic commitments can be used as a building block for secure election schemes: very roughly, during the voting stage, voters put their votes into homomorphic commitments, and during the...
Can hommorphic property a commitment scheme be harmful?
Are RSA-KEM key exchange material cyphertexts indistinguishable from random noise?
LWE schemes are currently being deployed. LWE has no quantum polynomial time algorithms as far as we know. >Despite this what is the consequence if LWE can be broken on a classical computer? Do we have any other alternatives?
What if LWE is not as secure as we think?
Can hommorphic property of a commitment scheme be harmful?
I'm trying to understand the security of the Montgomery ladder algorithm in the context of timing side-channel attacks. I'm looking at the algorithm from [wikipedia](https://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication#Montgomery_ladder) While I know that the algorithm ensures a constant number of ope...
Why is the Montgomery ladder algorithm safe against timing side-channel attacks?
> However, constant-time programming advises against using if statements with secret conditions. However, in the case of the Montgomery ladder, we iterate over the bits of the scalar, which is a secret. Doesn't this pose a potential security risk? I assume you are asking about the conditional jump that sits at the b...
Can homomorphic property of a commitment scheme be harmful?
I am looking for guidance on implementing a protocol where a BLS private key is split into 2 out of 3 shares using Shamir's Secret Sharing, and signatures must be obtained without revealing the original message to the other parties. Here's my current approach: Alice has a BLS private key. She splits this private ...
How can I have a message signed by other shares of a private key without revealing it?
I am looking for guidance on implementing a protocol where a BLS private key is split into 2 out of 3 shares using Shamir's Secret Sharing, and signatures must be obtained without revealing the original message to the other parties. Here's my current approach: Alice has a BLS private key. She splits this private ...
The [ME-600 key generator][1] was developed in the early 1990s for generating truly random one time key streams. That's not exactly World War 2. I don't know how long it was used, or whether it still is. Now with quantum computing on the horizon, people are looking at post-quantum cryptography. We also don't yet ...
Are one time pads still used, perhaps for military or diplomatic purposes?
I have been given a DES encryption assignment. I was given the Cipher text, the Plain text and the "passphrase". The passphrase consist of a 4 byte hex string. I have studied several different tutorials on you-tube about the workings of DES but I still can't seem to be able to figure out the key. I have tried to ad...
In short, my question is: What exactly do people mean when they say that **"The more you apply the Rabin-Miller test to a number, the more certain you can be that the number you're testing is prime."**? To clarify what I'm asking, let's look at an example I was working through: Testing if N = 78007 is prime or...
The [ME-600 key generator][1] was developed in the early 1990s for generating truly random one time key streams. That's not exactly World War 2. I don't know how long it was used, or whether it still is. Now with quantum computing on the horizon, people are looking at post-quantum cryptography. We also don't yet ...
getting wrong rsa private exponent (d) for this particular test vector from nist cvap In 186-2rsatestvectors.zip/SigVerRSA.rsp n = bb5784794f27bfab90a19bcc20bb10ac3d1d432d90651dace6235e34560abd733a0c3b693ea3802707c0e22e81603a6e2b82812a0027ece2d974a5a5190df89d636f7ab200849065fe412fe85e41aceb0d68b10cdd07e42ea16...
In 186-2rsatestvectors.zip/SigVerRSA.rsp n = bb5784794f27bfab90a19bcc20bb10ac3d1d432d90651dace6235e34560abd733a0c3b693ea3802707c0e22e81603a6e2b82812a0027ece2d974a5a5190df89d636f7ab200849065fe412fe85e41aceb0d68b10cdd07e42ea16184c974f58c10c560aa444f64b41e932ab25355648b510b1feedca780cfb68f11ac9fc98ab15b ...
is it safe to reuse the public key in NTRUEncrypt?
I'm still kinda new to Galois theory so I apologize if this question is very obvious to some people. Basically I'm reading [this paper by the NTRU Prime team](https://ntruprime.cr.yp.to/latticerisks-20211031.pdf) and in section 2.5 it's explaining how cyclotomic fields should be replaced with prime degree fields wit...
How does big Galois groups yield better security in NTRU Prime?
[RSA factoring challenge](https://en.wikipedia.org/wiki/RSA_Factoring_Challenge) is a famous one and is still not completely solved. Are there similar challenges for 1. Discrete log over $\mathbb Z_p^*$? 2. Discrete log over Elliptic curves? 3. LWE? 4. LPN?
First layer of each AES round is the Byte Substitution layer. It is the only nonlinear element of AES. What would happen if this layer was not in the path? And the lack of it would create a problem in the design goals?
Can the error in LWE or ringLWE schemes be from $\{0,1\}$? If not why and what is the best attack in this case?
Is $0/1$ error ok in LWE?