instruction
stringlengths
15
30k
As far as I know, the Second World War was won on codes that used obfuscation, not open source. These were also used during the cold war. For general use (not large companies with hundreds of employees who may or not be trustworthy) surely basic encryption that uses secret algorithms is still of use? I have asked this ...
Is there still a place for obfuscation create for encryption?
As far as I know, the Second World War was won on codes that used obfuscation, not open source. These were also used during the cold war. For general use (not large companies with hundreds of employees who may or not be trustworthy) surely basic encryption that uses secret algorithms is still of use? I have asked this ...
As far as I know, the Second World War was won on codes that used obfuscation, not open source. These were also used during the cold war. For general use (not large companies with hundreds of employees who may or not be trustworthy) surely basic encryption that uses secret algorithms is still of use? I have asked this ...
As far as I know, the Second World War was won on codes that used obfuscation, not open source. These were also used during the cold war. For general use (not large companies with hundreds of employees who may or not be trustworthy) surely basic encryption that uses secret algorithms is still of use? I have asked this ...
Suppose it is an Army Enigma I. Choose reflector UKW-B or UKW-C. Choose three rotors from I, II, III, IV and V. For each of the 120 reflector/rotors permutations, there are 17,576 starting indicator positions to test. Menu ---- Ciphertext $\tt RRHKJ \ KNJXE \ UWNFO \ T$ has 16 characters. Crib $\tt WETTE \ RVORH...
> what is mean by software and hardware implementation? > I want to know how its been done. **Software implementation** is coding the cryptographic schemes/algorithms with a programming language so that it can run under the target operation system. The programming language can be really wide; - C is preferred m...
Is there still a place for obfuscation in encryption?
What is meant by software and hardware implementations of cryptograpic schemes? How to do it?
> I know that the prefix depends on the last two characters of the uncompressed key. **Not the last; is it prefixed**,i.e. added to the beginning. In secp256k1, for compression we have the following rule; - prefix `04` means no compression - prefix `02` means compression with $y$ coordinate is even - prefix ...
About the characterizations of Special Soundness, from [Staking Sigmas][1] we have that: ''A $\Sigma$-protocol $\Pi=(A,Z,\phi)$ is said to have ${\it special\ soundness}$ if there exists a PPT extractor $\mathcal{E}$, such that given any two transcripts $(x,a,c,z)$ and $(x,a,c',z')$, where $c\ne c'$ and $\phi(x,a,c,...
1- Why SHA2 has SHA224, SHA256, SHA384 and SHA512 variants? 2- Can we say SHA512 more secure than SHA256? 3- Symmetric ciphers use at most 2^256 security level and I saw on the internet people saying how impossible to reach that then Why SHA2 has a SHA 512 variant? Do we need 2^512 security level? İsn't it overki...
Why hash algorithms have many different digest size variants?
**Sometimes** there is a need for hardware acceleration of **some** cryptographic functions. This depends on the system and the particular algorithms (both as needed and as implemented). A general-purpose processor (most would call this a CPU core) _can_ evaluate anything given enough time if programmed correctly. H...
So Alice is sending a one-way message to Bob. Alice and Bob both, of course, have their own ECDH private keys, as well as each other's public keys. I am using BouncyCastle 2.2.1 (BC) in this code. It appears (am I wrong?) that Alice and Bob must have the same Derivation and Encoding vectors (dV and eV) to encrypt a ...
Section 4.1 of the paper “Nonlinear Diffusion Layers” [Y. Liu, V. Rijmen, G. Leander] defines the nonlinear function $\rho$ over $\mathbb{F}_{2^m}$ as follows: $$\rho : \mathbb{F}_{2^m}^4 \to \mathbb{F}_{2^m}^4 : (x_3, x_2, x_1, x_0) \mapsto (y_3, y_2, y_1, y_0),$$ where $$y_i = x_i \oplus (x_{i + 1} \boxplus x_{i + 2}...
What is the inverse of this generalised automaton (based on bitwise XOR and modular addition)?
Is there still a place for obfuscation (secret algorithms) in encryption?
Using TR-31 key exchange, how is it possible to use restrictive modes of use, such as V (Verify only)? If Alice were to generate such a key, and send it to Bob, Bob would not be able to generate a MAC for Alice to verify. Can this be solved without leaving the safe bounds of Key Blocks? To be specific, I am referring ...
I've recently implemented & hosted an Oblivious Pseudo-Random Function (OPRF) based on [multiparty/oprf][1] i.e. [Burns et. al. EC-OPRF][2] as an AWS Lambda function / API, that can be recurrently used providing an ID (or getting a random one assigned). Also did some web searches prior and after, but haven't ran across...
Is there any publicly available/self-hosted OPRF service/implementation?
When I served in the Israeli army we could rely on civilian encryption(AES, RSA,...) only to a limited extent. Anything serious had to be protected by Israeli military encryption. What do these magic boxes do? Well that is classified. Do they have entirely novel cryptographic primitives or do they just use a few well...
I'm working with the secp256k1 elliptic curve and have point doubling and point addition formulas for this curve. Given the following formulas: **Point Addition Formula:** ``` s = (Qy - Gy) * pow(Qx - Gx, -1, p) % p Rx = (s**2 - Qx - Gx) % p Ry = (s * (Qx - Rx) - Qy) % p ``` **Point Doubling Formula:** ...
I'm working with the secp256k1 elliptic curve and have point doubling and point addition formulas for this curve. Given the following formulas: **Point Addition Formula in Python3:** ```python3 s = (Qy - Gy) * pow(Qx - Gx, -1, p) % p Rx = (s**2 - Qx - Gx) % p Ry = (s * (Qx - Rx) - Qy) % p ``` **Point Doubl...
> Is there a ΣΣ-protocol with negligible soundness? An interactive proof (protocol) for directed graph isomorphism was constructed by extending Schnorr protocol, and from polynomial graph representation. Prover picks distinct finite field elements for each vertex of both graphs, like $\{1, 2, \dots k\}$, such...
I was reading this article on Wikipedia, but I don't seem to understand how this holds: $(u)^\phi \equiv u^0 \mod n$. Can someone explain it to me? Thank you. > ### Key Generation > Given block size $r$, a public/private key pair is generated as follows: > > 1. Choose large primes $p$ and $q$ such that $r \vert ...
I was reading this article on Wikipedia, but I don't seem to understand how this holds: $u^\phi \equiv u^0 \mod n$. Can someone explain it to me? Thank you. > ### Key Generation > Given block size $r$, a public/private key pair is generated as follows: > > 1. Choose large primes $p$ and $q$ such that $r \vert (p...
In 2012 CRIME attack effectively killed TLS compression. Hash anything changed since 2012 for compression in TLS or did modern browsers sacrificed security over performance? If browsers now use TLS compression how does it bypass CRIME/BREACH?
is TLS compression used in modern browsers?
We are working in the elliptic curve group named [secp256k1][1] over prime field $\mathbb F_p$. The group law is noted $+$, known as point addition (point doubling in the special case of adding a point/element to itself). The group's unity (aka neutral, aka point at infinity) is noted $\mathcal O$. Other elements of th...
We are working in the elliptic curve group named [secp256k1][1] over prime field $\mathbb F_p$. The group law is noted $+$, known as point addition (point doubling in the special case of adding a point/element to itself). The group's unity (aka neutral, aka point at infinity) is noted $\mathcal O$. Other elements of th...
We are working in the elliptic curve group named [secp256k1][1] over prime field $\mathbb F_p$. The group law is noted $+$, known as point addition (point doubling in the special case of adding a point/element to itself). The group's unity (aka neutral, aka point at infinity) is noted $\mathcal O$. Other elements of th...
I'm developping an Swift app that communicate with a Java legacy backend using AES GCM, my biggest problem is that Java let you use a 8 bytes iv/nonce (and the legacy code is written with 8 bytes nonce). You can't do that in swift, it result in error. I can't find in javadoc what happen to nonce too short, i guess th...
**Given**: - A function \( G: \{0,1\}^{3n} -> \{0,1\}^{6n} \) which is a known Pseudorandom Generator (PRG). - A derived function \( G'(x_1 \|\| x_2) = G_b(x_1\|\|0^n\|\|x_2) \), where \( x_1, x_2 are \{0,1\}^n \). **Question**: Can we assert that \( G' \) is also a PRG? **Observations**: - \( G' \)'s out...
If G is a PRG, is G' necessarily a PRG?
1. Any hyperelliptic curve having base field characteristic dividing group order? 2. A subgroup of order equal to the basefield characteristic, a large prime? 3. Having hard DLP in that subgroup? 4. Having pairing? 5. New elliptic-hyperelliptic cycle anyone? SNARKs were introduced with QAP "intermediate...
> what is mean by software and hardware implementation? > I want to know how its been done. **Cryptographic Software implementation** is coding the cryptographic schemes/algorithms with a programming language so that it can run under the target operation system. The programming language can be really wide; - C ...
**Given**: - A function $$G: \{0,1\}^{3n} \to \{0,1\}^{6n}$$ which is known to be a secure Pseudorandom Generator (PRG). - A derived function $$G'(x_1 \| x_2) = G_b(x_1\|0^n\|x_2), \text{ where } x_1, x_2 \in \{0,1\}^n.$$ **Question**: Can we assert that $G'$ is also a PRG? **Observations**: - $G'$'s out...
Does the legacy code convert the 8 byte nonce into a 12 byte nonce (say, by concatenating 32 fixed bits)? Or, does it use it directly into GCM (computing the GHASH of the 8 byte nonce)? If the legacy code converts the 8 byte nonce into a 12 byte nonce, it's pretty obvious (just have the Swift app convert the 8 byte...
Does the legacy code convert the 8 byte nonce into a 12 byte nonce (say, by concatenating 32 fixed bits)? Or, does it use it directly into GCM (computing the GHASH of the 8 byte nonce)? If the legacy code converts the 8 byte nonce into a 12 byte nonce, it's pretty obvious (just have the Swift app convert the 8 byte...
I'm working with the secp256k1 elliptic curve and have point doubling and point addition formulas for this curve. If a point is given Qx and Qy ``` Qx = 112711660439710606056748659173929673102114977341539408544630613555209775888121 Qy = 255830279805708836916569058774019764064488682548162950699198889605415866794...
We are working in the elliptic curve group named [secp256k1][1] over prime field $\mathbb F_p$. The group law is noted $+$, known as point addition (point doubling in the special case of adding a point/element to itself). The group's unity (aka neutral, aka point at infinity) is noted $\mathcal O$. Other elements of th...
This is probably obvious, but I cannot find it anywhere, since all textbooks define OWFs for average-case hardness. Do we known if *worst-case* one-way *permutations* exist assuming $\mathbf{P} \neq \mathbf{NP}$? I don't require average-case hardness, it suffices that the function is hard to invert in the worst-case...
In 2012 CRIME attack effectively killed TLS compression. Has anything changed since 2012 regarding compression in TLS or have modern browsers sacrificed security over performance? If browsers now use TLS compression how does it bypass CRIME/BREACH?
This is probably obvious, but I cannot find it anywhere, since all textbooks define OWFs for average-case hardness. Do we known if *worst-case* one-way *permutations* exist assuming $\mathbf{P} \neq \mathbf{NP}$? I don't require average-case hardness, it suffices that the function is hard to invert in the worst-case...
In the paper located at https://eprint.iacr.org/2011/401.pdf, suppose we replace matrix multiplication with bitwise XOR operations in Definition 5.1 to create an LWE degree-k PRF. I'm seeking clarification regarding how this alteration affects the proof outlined in section 5.4, particularly with respect to Theorem 5.10...
What are the implications for the proof when we substitute matrix multiplication with a bitwise XOR operation in Definition 5.1 (LWE degree-k PRF)?
A Merkle Tree OTS scheme such as XMSS pregenerates 2^h keys that are tied to 1 public key When the 2^h keys run out, does all the 2^h keys get removed/deleted and the device pregenerates another new 2^h keys and the corresponding public key?
I was reading the [Hybrid Public Key Encryption (HPKE) RFC][1] and I came across this sentence in section 9.4 "*All AEADs MUST be IND-CCA2-secure, as is currently true for all AEADs listed in Section 7.3.*" My first thought is that AE (Authenticated Encryption) implies IND-CCA2 by definition ("Introduction to Modern...
I was reading the [Hybrid Public Key Encryption (HPKE) RFC][1] and I came across this sentence in section 9.4 "*All AEADs MUST be IND-CCA2-secure, as is currently true for all AEADs listed in Section 7.3.*" My first thought is that AE (Authenticated Encryption) implies IND-CCA2 by definition ("Introduction to Modern...
I cannot quite understand, if Finished message serves any particular purpose when the server is being authenticated via certificates, or if it there just for "consistency" or "extra protection". The Finished message is said to provide integrity of the entire handshake and computed keys. But when authenticated via ce...
TLS 1.3: How is Finished message useful when authenticating via certificates?
I cannot quite understand, if Finished message serves any particular purpose when the server is being authenticated via certificates, or if it there just for "consistency" or "extra protection". The Finished message is said to provide integrity of the entire handshake and computed keys. But when authenticated via ce...
These types of cryptographic primitive can be distinguished by the security goals they fulfill (in the simple protocol of "appending to a message"): - **Integrity:** Can the recipient be confident that the message has not been accidentally modified? - **Authentication:** Can the recipient be confident that the ...
Consider a pairing-friendly elliptic curve $E$ over a finite field $\mathbb{F}_q$ with embedding degree $k$. Do you know examples of real-world cryptographic protocols based on pairings $\mathbb{G}_1 \!\times\! \mathbb{G}_2 \to \mathbb{F}_{q^k}^*$ such that the number of additions in $\mathbb{G}_1$ is approximately equ...
> What happens when a Merkle Tree OTS scheme runs out of keys? Well, obviously you cannot generate any more signatures for that public key. How that is handled is beyond the scope of the signature system, and would need to be handled by whatever is using the signature scheme. You mentioned 'regenerate a fresh pu...
The security guarantee of the SIV mode (as is) is that it is a [*Deterministic* AE(AD) scheme][1]. This means that SIV is an AEAD scheme as long as the adversary is restricted to only encrypting the same message-header pair once, and the adversary never asks for decryption of ciphertext with headers previously queried....
So Grover's algorithm, also known as the quantum search algorithm, can find an entry, with a high probability, in an unstructured database. Well can't we consider the basis of a lattice problem an unstructured database, and the lattice point we are looking for the entry in that unstructured database? Could Grover's ...
Is lattice encryption be susceptible to Grover's algorithm?
how do i solve equations like this $$(aX \oplus X+b) \bmod M = c$$ If a,b and c are known?\ and if i have system of of equation with different b values, is it solvable?
Imagine Alice is applying for a new job. Alice has an idea of the minimum salary that she is willing to accept—let's call this value `A`. Bob, the hiring manager for a company that Alice is applying to, also has a number in mind: the maximum acceptable salary that he is willing to pay to fill the position—let's call th...
> is it solvable? If $M$ is a power of 2, say, $2^{128}$, then it is easily solvable. We first recognize that, in this system, what happens to bits $0-k$ are not affected by any of the bits $k+1$ and above. That is, we can solve the system to the modulus $2^k$ and then extend that answer to higher order bits. ...
How do I solve equations like this $$(aX \oplus X+b) \bmod M = c$$ If a,b and c are known?\ and if i have system of of equation with different b values, is it solvable? I am particularly interested in $M$ being a power of $2.$
Is lattice encryption susceptible to Grover's algorithm?
Consider a Koblitz elliptic curve over a prime field $\mathbb F_p$, with equation $y^2=x^3+b$, prime order $n$ close to (but different from) $p$. This includes secp256k1, secp224k1, secp192k1, secp160k1, and for a toy example $p=241,b=13,n=211$. Given $(x_P,y_P)$ for $P$ on the curve, classic point doubling formula ...
When I study a zk-SNARK scheme, the scheme claims to be transparent. Does this mean that this scheme does not require a trusted setup? Furthermore, if a NIZK scheme includes a Common Reference String (CRS), does that scheme still remain transparent?
In NIZK, what is the difference between "transparent“ and “without trusted setup”?
There are a few parts to the EFAIL attacks. Some parts are the fault of the mailer authors for exposing unnecessary attack surface via arbitrary incoming email. Some parts are the fault of the OpenPGP and S/MIME designers for failing to heed modern cryptography engineering principles—in particular, failing to provi...
I am studying a little bit about one-way functions from Dr Goyal's notes. He constructs the following OWF: Let $D=\{0,1\}^{n^3}$ and $R=\{0,1\}^{2 n}$. Given $x \in D$, $f$ interprets $x$ as a set $S$ of $n^2$ numbers, each of $n$ bits and uses deterministic PT primality test to find the first two 2 primes in $S...
I am studying a little bit about one-way functions from Dr Goyal's notes. He constructs the following OWF: Let $D=\{0,1\}^{n^3}$ and $R=\{0,1\}^{2 n}$. Given $x \in D$, $f$ interprets $x$ as a set $S$ of $n^2$ numbers, each of $n$ bits and uses deterministic PT primality test to find the first two 2 primes in $S...
I am studying a little bit about one-way functions from Dr Goyal's notes. He constructs the following OWF: Let $D=\Bbb Z_2^{n^3}$ and $R=\Bbb Z_2^{2 n}$. Given $x \in D$, $f$ interprets $x$ as a set $S$ of $n^2$ numbers, each of $n$ bits and uses deterministic PT primality test to find the first two 2 primes in ...
Consider a Koblitz elliptic curve over a prime field $\mathbb F_p$, with equation $y^2=x^3+b$, prime order $n$ close to (but different from) $p$. This includes secp256k1, secp224k1, secp192k1, secp160k1, and for a toy example $p=241,b=13,n=211$. Given $(x_P,y_P)$ for $P$ on the curve, classic point doubling formula ...
I am studying a little bit about one-way functions from Dr Goyal's notes. He constructs the following OWF: Let $D=\Bbb Z_2^{n^3}$ and $R=\Bbb Z_2^{2 n}$. Given $x \in D$, $f$ interprets $x$ as a set $S$ of $n^2$ numbers, each of $n$ bits and uses deterministic PT primality test to find the first two 2 primes in ...
I am interested in modular arithmetic with respect to the prime $p = 2^{64}-2^{32}+1$. Thomas Pornin has [some work](https://eprint.iacr.org/2022/274) on constant time implementation of arithmetic in $\mathsf{GF}(p)$ for this prime (the paper does other things as well --- this is the part relevant to my question). ...
Speedups for non-constant time modular arithmetic?
I am interested in modular arithmetic with respect to the prime $p = 2^{64}-2^{32}+1$. Thomas Pornin has [some work](https://eprint.iacr.org/2022/274) on constant time implementation of arithmetic in $\mathsf{GF}(p)$ for this prime (the paper does other things as well --- this is the part relevant to my question). ...
How to calculate key length in bits?
Does there exist a $5$-bit S-Box $S$ such that the differential branch number of $S$ is equal to $4$ and the linear branch number of $S$ is not less than $3?$ If no, why? If yes, is there any known example of such an S-Box?
Many of the presentations at https://csrc.nist.gov/Events/2023/third-workshop-on-block-cipher-modes-of-operation complain about the lack of key commitment in AES-GCM. But isn't that one application of "associated data?" For instance, can't one include a hash of the key (or something similar) in the associated data?...
Many of the presentations at [The Third NIST Workshop on Block Cipher Modes of Operation 2023][1] complain about the lack of key commitment in AES-GCM. But isn't that one application of "associated data?" For instance, can't one include a hash of the key (or something similar) in the associated data? Maybe I'm m...
> But isn't that one application of "associated data?" For instance, can't one include a hash of the key (or something similar) in the associated data? Maybe I'm missing the point... Actually, that doesn't help with GCM. With GCM, the tag is computed by converting the message and the AAD into a polynomial, and ev...
> But isn't that one application of "associated data?" For instance, can't one include a hash of the key (or something similar) in the associated data? Maybe I'm missing the point... Actually, that doesn't help with GCM. With GCM, the tag is computed by converting the message and the AAD into a polynomial, and ev...
> But isn't that one application of "associated data?" For instance, can't one include a hash of the key (or something similar) in the associated data? Maybe I'm missing the point... Actually, that doesn't help with GCM. With GCM, the tag is computed by converting the message and the AAD into a polynomial, and ev...
Many of the presentations at [The Third NIST Workshop on Block Cipher Modes of Operation 2023][1] complain about the lack of key commitment in AES-GCM. But isn't that one application of "associated data?" For instance, can't one include a hash of the key (or something similar) in the associated data? [1]: https...
> But isn't that one application of "associated data?" For instance, can't one include a hash of the key (or something similar) in the associated data? Maybe I'm missing the point... Actually, that doesn't help with GCM. With GCM, the tag is computed by converting the message and the AAD into a polynomial, and ev...
This blog [post][1] gives a great summary of modern proposals for generic transformations from existing non-committing AEAD schemes to committing AEAD. The two excellent papers referenced are "[Efficient Schemes for Committing Authenticated Encryption][2]" by Mihir Bellare & Viet Tung Hoang; and, "[On Committing Authen...
The last paragraph of Section 1 (Introduction) of the paper [“On the Relationship between Resilient Boolean Functions and Linear Branch Number of S-boxes”](https://eprint.iacr.org/2019/1427) [S. Sarkar, K. Mandal, D. Saha] contains the following text: > For an $n \times n$ S-box $S$, its linear branch number, de...
There are a few parts to the EFAIL attacks. Some parts are the fault of the mailer authors for exposing unnecessary attack surface via arbitrary incoming email. Some parts are the fault of the OpenPGP and S/MIME designers for failing to heed modern cryptography engineering principles—in particular, failing to provi...
Difficulties porting code to OpenSSL 3 may raise some doubts on digest signing. Before version 3 came, digest signing was the only way to use ED25519. On version 3, RSA_sign() being deprecated, I tried to re-use ED25519 code with RSA keys. The code is like so: ```C char *digest; // digest alread...
I'm trying to show that the PRG $G$ defined as below is insecure for any binary matrix $A$. $$ A: m\times n\ (n < m)\\ s: n\times 1\\ G: \{0, 1\}^n\rightarrow\{0, 1\}^{m} \\ G(s)=As(\bmod{2}) $$ As far as I know, I need to provide an adversary with non-negligible advantage, or prove that the PRG is predictab...
The current accepted answer is out of date and somewhat misleading. Disclaimer: I'm an author on the AEGIS Internet-Draft I'm about to talk about. [AEGIS][1] (technically AEGIS-128L and AEGIS-256) has an [Internet-Draft][2] and [TLS cipher suite name][3]. It's in libsodium, the Zig programming language standard libr...
Respected community, I was wondering how weak would AES-128 be, if we provide only a 64 bit key with the other remaining 64 bits either zero bits or public constants, known to the attacker. Is it easy for the attacker to try `2**64` guesses for the unknown part of the key? To gain more clarity to my query, lets...
How weak is using AES with a 128 bit key but 64 bits of the secret key are public constants?
Using AES-128 with only 64-bit uniform random is not secure. There are many entities around that can break this easily by searching the $2^{64}$- space. See in details here; - [How reassuring is 64-bit (in)security?](https://crypto.stackexchange.com/a/63537/18298) Only possible additional complexity that you can ...
Using AES-128 with only 64-bit uniform random is not secure. There are many entities around that can break this easily by searching the $2^{64}$- space. See the details here; - [How reassuring is 64-bit (in)security?](https://crypto.stackexchange.com/a/63537/18298) Only possible additional complexity that you can...
Respected community, I was wondering how weak would AES-128 be, if we provide only a 64 bit key with the other remaining 64 bits either zero bits or public constants, known to the attacker. Is it easy for the attacker to try $2^{64}$ guesses for the unknown part of the key? To gain more clarity to my query, let...
Using AES-128 with only 64-bit uniform random is not secure. There are many entities around that can break this easily by searching the $2^{64}$- space. See the details here; - [How reassuring is 64-bit (in)security?](https://crypto.stackexchange.com/a/63537/18298) Only possible additional complexity that you can...
This blog [post][1] gives a great summary of modern proposals for generic transformations from existing non-committing AEAD schemes to committing AEAD. The two excellent papers referenced are "[Efficient Schemes for Committing Authenticated Encryption][2]" by Mihir Bellare & Viet Tung Hoang; and, "[On Committing Authen...
ChaCha has clear delineations between key, nonce, counter and constants. What is the reason for not using a XEX approach such that the ChaCha key is 512 bits and all the other things are XOR'ed with the key, and only the key is XOR'ed with the ChaCha permutation output? Attacker doesn't gain any additional contro...
Why doesn't ChaCha use XEX & a 512bit key?