instruction
stringlengths
15
30k
In the IETF Draft [Deterministic ECDSA and EdDSA Signatures with Additional Randomness](https://datatracker.ietf.org/doc/draft-irtf-cfrg-det-sigs-with-noise/), methods had been specified to seed RNG deterministically with external input, to securely obtain a nonce for use in signing formula. The external input is varia...
I don't have a deep mathematical background in cryptography. I am reading ["The FFX Mode of Operation for Format-Preserving Encryption"](https://csrc.nist.gov/csrc/media/projects/block-cipher-techniques/documents/bcm/proposed-modes/ffx/ffx-spec.pdf). Section D says the following. > Why feistel? The authors believe ...
Is a naive 27bit FPE algorithm using AES-CTR insecure?
All LFSR-based stream ciphers that I know of use a fixed feedback polynomial (i.e. the taps are always in the same position). I know that, at least for non-trivial output lengths, it is necessary to ensure that the polynomial is primitive to avoid creating an LFSR with a short cycle. Are there any published stream ciph...
FFX supports information in arbitrary radix (aka base) beyond 2 of binary, and of multiple allowed length. I'll assume the question is about _Radix_ = 2 and _Lengths_ = {27} , that is plaintext(s) of _n_ = 27 bits. > Because a block cipher in the counter mode such as AES-CTR can encrypt...
FFX supports information in arbitrary radix (aka base) beyond 2 of binary, and multiple allowed lengths. I'll restrict to _Radix_ = 2 and _Lengths_ = {27} , that is plaintext(s) of _n_ = 27 bits. > Because a block cipher in the counter mode such as AES-CTR can encrypt a _n_-bit plain te...
FFX supports information in arbitrary radix (aka base) beyond 2 of binary, and multiple allowed lengths. I'll restrict to _Radix_ = 2 and _Lengths_ = {27} , that is plaintext(s) of _n_ = 27 bits. > Because a block cipher in the counter mode such as AES-CTR can encrypt a _n_-bit plain te...
In the book *The Design by Rijndael* states that the design criteria for the S-box are nonlinearity and algebraic complexity. Can these two criteria be considered as two specific cryptographic properties of the AES S-box? if not is there any way to determine the cryptographic properties of AES S-Box ?
How to determine cryptographic properties of AES S-Box?
For decryption, there is another important measure: What percentage of messages can be decrypted in some fixed time? We don’t actually care about the cost of decryption, but whether we can do it with acceptable cost. If I tell you “worst case cost of decrypting is 2.7 trillion dollars, average case is 9.3 billion” t...
It might be worth actually answering your questions > 1. What do they mean when they say certain problems (like lattices) have an average-case to worst-case relationship? Do they mean there is a polynomial reduction between two case of the problem? Because polynomial reductions are of our interest as they are practi...
> 1. There could be other vulnerability in the scheme/protocol/construction, for example, unsafe design of protocol, how can we be sure that the scheme is at least as difficult as the hard problem? Or, if the scheme/protocol has this kind of vulnerability, it should not be considered holding a reduction to the problem,...
I'm designing an authenticated encryption scheme for a noninteractive one-way radio telemetry system. A number of devices in the field send back telemetry to a base station periodically, but no communications are sent from the base station to the devices. My requirements and threat model are as follows: - The de...
I'm designing an authenticated encryption scheme for a noninteractive one-way radio telemetry system. A number of devices in the field send back telemetry to a base station periodically, but no communications are sent from the base station to the devices. My requirements and threat model are as follows: - The de...
I'm working in an embedded system that uses TLS v1.2 protocol for network secure and it acts as a client. Now I want to test some TLS security functions that requires connecting with a TLS server and see how client interacts if the server tries to perform unexpected behaviors that can be configured by me. Some of behav...
FFX supports information in arbitrary radix (aka base) beyond 2 of binary, and multiple allowed lengths. I'll restrict to _Radix_ = 2 and _Lengths_ = {27} , that is plaintext(s) of _n_ = 27 bits. > Because a block cipher in the counter mode such as AES-CTR can encrypt a _n_-bit plain te...
FFX supports information in arbitrary radix (aka base) beyond 2 of binary, and multiple allowed lengths. I'll restrict to _Radix_ = 2 and _Lengths_ = {27} , that is plaintext(s) of _n_ = 27 bits. > Because a block cipher in the counter mode such as AES-CTR can encrypt a _n_-bit plain te...
Given two points on the curve $P=(x_1,y_1), Q=(x_2,y_2)$ we can determine the parameters of the short Weierstrass form $y^2 = x^2 + ax +b$. Insert the coordinates of the points to the curve equation to get two equations as you did; \begin{align} y_1^2 &= x_1^3 + ax_1 + b &\pmod{n} \\ y_2^2 &= x_2^3 + ax_2 + b &\pm...
TL;DR: Is encrypting data with AES CBC with random IV + PBKDF2 key using the username as salt safe? I have searched the internet, but I could not find a proper answer that encompasses the "AES CBC and random IV with PBKDF2 same salt" dilemma. **The scenario** I am developing a client/server/DB system, and my...
The notion of security considered here is privacy. Is there a secure two-party protocol does not rely on randomness at all when considering passive adversaries (or active adversaries)? If the answer is no, are there any proofs of this in the literature? I tried to find relevant information, but still got nothing.
Is there any secure deterministic two-party computation protocol?
The terms "average-case", "worst-case" hardness are quite confusing. 1. What do they mean when they say certain problems (like lattices) have an average-case to worst-case relationship? Do they mean there is a polynomial reduction between two case of the problem? Because polynomial reductions are of ou...
I'm not sure if anyone explored this area before. Blockcipher encryption definitely fullfills IND-CCA, but what about its inverse? Is there a proof that shows blockcipher decryption is as secure as encryption? Or is there an counter-example? Or it's an open problem?
Does blockcipher decryption always offer equivalent security as blockcipher encryption?
With regard to AES encryption on **blocks**, the next diagram showcase how does a **change** in one cell in the block (every cell is a byte) creates a change in encryption for ALL cells: [![enter image description here][1]][1] Now I have the next question, from a network security course: Say we change the "Mix Col...
How does changing one of AES encryption stages affect its security?
Yes, but there is an important caveat to your $\hat{p}$ formula, actually addressed in § 4.4. Application of Multiple Tests. The tests have to be truly independent of each other. Tests _"such as the cusum test and the runs test, result in P-values that are likely to be correlated."_ A $\chi^2$ test and an $n \...
Yes, but there is an important caveat to your $\hat{p}$ formula, actually addressed in § 4.4. Application of Multiple Tests. The tests have to be truly independent of each other. Tests _"such as the cusum test and the runs test, result in P-values that are likely to be correlated."_ A $\chi^2$ test and an $n \...
In federated learning using homomorphic encryption, all participants in most schemes share the same pair of keys, which can easily cause key leaks and lead to data privacy leaks. After research, I found that someone proposed to use a multi-key homomorphic encryption algorithm to solve the above problems. But I wond...
I'm trying to implement AWS Encryption SDK for JavaScript in a browser environment within a React application. When I attempt to construct an instance of the encryption client using buildClient function with CommitmentPolicy.REQUIRE_ENCRYPT_REQUIRE_DECRYPT policy: const { encrypt } = buildClient(CommitmentPolicy...
I'm working in an embedded system that uses TLS v1.2 protocol for network security and it acts as a client. Now I want to test some TLS security functions that require connecting with a TLS server and see how a client interacts if the server tries to perform unexpected behaviors that can be configured by me. Some o...
There's two reasonable strategies: - symmetric crypto + database to speed up search - relies on nonces being mostly sequential and not too many messages getting lost - asymetric crypto Note:both overheads include the 4 byte deviceID. That doesn't have to be included in the plaintext. Symmetric is very very c...
While designing a crypto system based on existing standards and specifications i find myself questioning some of the accuracy in the current RFC-8037 and IANA specs around Edwards curves, 25519 and ed25519 notation In [RFC8037][1], they say that the public key in its compressed form (32 bytes) should be represented...
RFCs & IANA specs about Ed25519 inaccurate?
> But in Edwards curves, unlike Montgomery (Curve25519) shouldn't be Y > with a signed bit for X instead? Yes > In RFC8037, they say that the public key in its compressed form (32 > bytes) should be represented by X They call it `x` in the JSON representation, which I agree is confusing. However, I've checke...
> But in Edwards curves, unlike Montgomery (Curve25519) shouldn't be Y > with a signed bit for X instead? Yes > In RFC8037, they say that the public key in its compressed form (32 > bytes) should be represented by X They call it `x` in the JSON representation, which I agree is confusing. However, I've checke...
Is there a simple way if counting the number of $S$-Boxes of length $\ell$ over $\mathbb{F}_{2}$? I mean it is quite easy to see that for $\ell=2$ the answer is $0$ but I want to know if there is a general formula, specifically for $\ell=3$?
How many $S$-Boxes of length $3$ are there over $\mathbb{F}_{2}$?
I encounter an odd issue when I calculate SHA256 checksums in Javascript. I use the following code: ```javascript const hashBuffer = await window.crypto.subtle.digest("SHA-256", arrayBuffer) const hashArray = Array.from(new Uint8Array(hashBuffer)); const hashHex = hashArray .map((b) => b.toString(16).padStart(2, ...
Is there a simple way if counting the number of $S$-Boxes of length $\ell$ over $\mathbb{F}_{2}$? By $S$-box I mean an $S$-box satisfying the avalanche condition. I mean it is quite easy to see that for $\ell=2$ the answer is $0$ but I want to know if there is a general formula, specifically for $\ell=3$?
I was looking at a layman explanation for zero-knowledge proofs in zk-SNARKs [here](https://medium.com/@VitalikButerin/quadratic-arithmetic-programs-from-zero-to-hero-f6d558cea649). The idea there is that if one knows a solution (`3`) to a question (find a value of `x` satisfying `x^3 + x + 5 = 0`), then one can pro...
Can a 3-coloring for a graph be represented as a circuit?
I was (trying to) read the following paper: https://eprint.iacr.org/2015/673.pdf Page 2 says: > A related attack is to replace a point P with P + T, where T lies in a small subgroup. If the user multiplies by a scalar s, they will get sP + sT instead of sP, where the difference sT gives away the low-order bits of...
in one online crash game website (casino betting game), every game has a hash that is made public after the plane crashes and the crash coefficient is supposed to be random. The coefficient can be retrieved using the game hash (so if you know the game hash you know the crash coefficient), but what I find unclear is tha...
> Now, how feasible it is to move from AES to ChaCha20? What are pros and cons of this? This _entirely_ depends on the platform and implementation. There's no way we can answer this definitively. However it's usually not particularly difficult to change one cipher to another. > Will ChaCha20 be faster than in-bui...
> Now, how feasible it is to move from AES to ChaCha20? What are pros and cons of this? This _entirely_ depends on the platform and implementation. There's no way we can answer this definitively. However it's usually not particularly difficult to change one cipher to another. > Will ChaCha20 be faster than in-bui...
> Now, how feasible it is to move from AES to ChaCha20? What are pros and cons of this? This _entirely_ depends on the platform and implementation. There's no way we can answer this definitively. However it's usually not particularly difficult to change one cipher to another. > Will ChaCha20 be faster than in-bui...
I have used the threshold version of paillier encryption without a trusted dealer in an application. I have tested the key generation phase with different security key sizes such as 80, 512, 1024, and,2048 bits. With each security size, the key generation time is different and unpredictable due to the randomness involv...
I have used the threshold version of Paillier encryption without a trusted dealer in an application. I have tested the key generation phase with different security key sizes such as 80, 512, 1024, and 2048 bits. With each security size, the key generation time is different and unpredictable due to the randomness inv...
This is an interim answer. The technical aspects are meant as outsider comment and may be reposted to the CFRG mailing list when I subscribe to it. Bureaucracy Aspect ---- Although the draft is expired, the document is still in "Active RG Document" state. All? IETF drafts have maximum 6 months. Those merit furth...
Key generation time in Paillier encryption is about that for RSA for $n$ of comparable size. To generate a key with $k$-bit public modulus $n$, and say $k\ge2048$, it's enough to independently generate two primes $p$ and $q$ essentially random in $(2^{(k-1)/2},2^{k-1})$ just as one would do for RSA. The public key c...
This is an interim answer. The technical aspects are meant as outsider comment and may be reposted to the CFRG mailing list when I subscribe to it. Bureaucracy Aspect ---- Although the draft is expired, the document is still in "Active RG Document" state. All? IETF drafts have maximum 6 months. Those merit furth...
Assuming a party can be trusted for key generation (which may or may not be the case in the question), key generation time in Paillier encryption is about that for RSA for $n$ of comparable size. To generate a key with $k$-bit public modulus $n$, and say $k\ge2048$, it's enough to independently generate two primes $...
Following up [this][1] question Alice has master EC key pair: $a$ - private key, $A$ - corresponding public key I want Alice to sign a message $m$ with a key that's derived from her master key in a deterministic way, say using $a' = a+hash(m)$ BUT I don't want anybody else to know that the signature of m was do...
Assuming a party can be trusted for key generation (which may or may not be the case in the question), key generation time in Paillier encryption is about that for RSA with $n$ of comparable size. To generate a key with $k$-bit public modulus $n$, and say $k\ge2048$, it's enough to independently generate two primes ...
In Regev's [paper](https://homepages.cwi.nl/~rdewolf/qcnotes.pdf) in Lemma 3.12, can someone explain to me how we get from Eq. (15) to the next one? (1) We can only have a superposition of finitely many states, how can we manage to store $x\mod\mathcal{P}(L)$? (2) Afterwards we measure that register and get a $y...
In Regev's [paper](https://homepages.cwi.nl/~rdewolf/qcnotes.pdf) in Lemma 3.12, can someone explain to me how we get from Eq. (15) to the next one? (1) We can only have a superposition of finitely many states, how can we manage to store $x\mod\mathcal{P}(L)$? Isn't this set uncountably large? (2) Afterwards we m...
Following up [this][1] question Alice needs to sign different messages, each with different key. Messages, signatures of those messages and corresponding public keys are published online. Before Alice is allowed to publish those values, a verifier checks that she used the key, derived from her master key in a ...
In one online crash game website (casino betting game), every game has a hash that is made public after the plane crashes and the crash coefficient is supposed to be random. The coefficient can be retrieved using the game hash (so if you know the game hash you know the crash coefficient). But what I find unclear is...
Following up [this][1] question Alice needs to sign different messages, each with different key. Messages, signatures of those messages and corresponding public keys are published online. Before Alice is allowed to publish those values, a verifier checks that she used the key, derived from her master key in a ...
Assuming a party can be trusted for key generation (which may or may not be the case in the question), key generation time in Paillier encryption is about that for RSA with $n$ of comparable size. To generate a key with $k$-bit public modulus $n$, and say $k\ge2048$, it's enough to independently generate two primes ...
This is an interim answer. The technical aspects are meant as outsider comment and may be reposted to the CFRG mailing list when I subscribe to it. Bureaucracy Aspect ---- Although the draft is expired, the document is still in "Active RG Document" state. All? IETF drafts have maximum 6 months. Those merit furth...
This is an interim answer. The technical aspects are meant as outsider comment and may be reposted to the CFRG mailing list when I subscribe to it. Bureaucracy Aspect ---- Although the draft is expired, the document is still in "Active RG Document" state. All? IETF drafts have maximum 6 months. Those merit furth...
Bit based division property is a great method of Integral attack on block ciphers in which was invited by Y.Todo . According to this paper [Todo][1], how the set $[11110000]$ will propagate bellow sets? $[11110000]\rightarrow [11110000]; [11000010]; [01110010];$\ $[01100001] \rightarrow [01100001]; [01000011];$\...
Bit based division property is a great method of Integral attack on block ciphers, which was invented by Y. Todo. According to the paper [_Bit-Based Division Property and Application to Simon Family_][1] (in [proceedings of FSE 2016][2]), how does the set $[11110000]$ will propagate bellow sets? $[11110000]\right...
In the [Pailler cryptosystem][1], decryption goes $m\gets\displaystyle\left\lfloor\frac {\left(c^\lambda\bmod N^2\right)-1}N\right\rfloor\mu\bmod N$ with $\mu<N$ being a part of the private key just like $\lambda=\operatorname{lcm}(p-1,q-1)$ for $N=p\,q$. The [Chineese Remainder Theorem][2] allows to speed-up this c...
Assuming a party can be trusted for key generation (which may or may not be the case in the question), key generation time in Paillier encryption is about that for RSA with $N$ of comparable size. To generate a key with $k$-bit public modulus $N$, and say $k\ge2048$, it's enough to independently generate two primes ...
Following up [this][1] question Alice needs to sign different messages, each with a different key. Messages, signatures of those messages, and corresponding public keys are published online. Before Alice is allowed to publish those values, a verifier checks that she used the key, derived from her master key in...
In Regev's [paper](https://cims.nyu.edu/~regev/papers/qcrypto.pdf)(the right link now) in Lemma 3.12, can someone explain to me how we get from Eq. (15) to the next one? (1) We can only have a superposition of finitely many states, how can we manage to store $x\mod\mathcal{P}(L)$? Isn't this set uncountably large? ...
https://crypto.stackexchange.com/questions/87591/can-ecdsa-signature-signing-and-verification-process-replaces-password-hashed-ba The title of this question won't be exactly right. This is a question that I asked long time ago. I would like to ask does the same application or the underlying mechanism still applic...
I recently start to learn about shamir secret sharing and feldman verification. I know the concepts But I cant figure how it works. mostly because many of modulates are with "p" and some of them are with "q". I can't find a good sample that helps me understand it better. here's the example I am working with: ass...
Following up [this][1] question There are 4 parties: - Alice, who needs to prove a posession of some statement $m$, unique to her, say a street address, which is basically a string of some predefined format, to - Bob, who consumes the proof. - an Oracle, who "helps" Alice to prove $m$ by performing some exte...
For decryption, there is another important measure: What percentage of messages can be decrypted in some fixed time? We don’t actually care about the cost of decryption, but whether we can do it with acceptable cost. If I tell you “worst case cost of decrypting is 2.7 trillion dollars, average case is 9.3 billion” t...
In previous versions of TLS, the choice of the Diffie-Hellman parameters was up to the participants. This resulted in some implementations choosing incorrectly, resulting in vulnerable implementations being deployed. How does TLS 1.3 takes this choice away? How does the **X(g^x mod p)** and **Y(g^y mod p)** values ...
How does TLS 1.3 restricting the Diffie-Hellman parameters to ones that are known to be secure?
I want to conduct an anonymous Internet survey (e.g. “What’s your favorite fruit?” with a multiple choice answer) among a given set of people. Double answers by the same participant are not allowed. I’m looking for a method to conduct this survey using only e-mail and a web page (and maybe trusted software) in a wa...
> How does TLS 1.3 takes this choice away? By having the client pick from the choices of ffdhe2048, ffdhe3072, ffdhe4096, ffdhe6144, ffdhe8192 (which are specific 2048, 3072, 4096, 6144, 8192 bit DH groups); no other choices (other than some elliptic curve groups) are allowed. That is, neither side longer have a wa...
> How does TLS 1.3 takes this choice away? By having the client specify the DH group from the list of ffdhe2048, ffdhe3072, ffdhe4096, ffdhe6144, ffdhe8192 (which are specific 2048, 3072, 4096, 6144, 8192 bit DH groups); no other choices (other than some elliptic curve groups) are allowed. That is, neither side lon...
I've been navigating through many of StackExchange's history questions about point at infinity, and there's something that still doesn't "click" for me. Let me share my understanding (and its logic) and maybe become apparent where I fail. Let's say I have an elliptic curve equation, particularly a Twisted Edwards...
Why points at infinity are relevant in Twisted Edwards elliptic curves?
I was reading up on the recently disclosed [Hertzbleed][1] side channel attack(s). It was speculated on [Twitter][2] that the elliptic-curve cryptography library [libsecp256k1][3] is not susceptible to these attacks. Firstly, is this true and why? Secondly, if it is true should these protections (e.g. blinding facto...
Is the elliptic-curve cryptography library libsecp256k1 not susceptible to the Hertzbleed attack?
[fgrieu][1] has shown that $\lim\limits_{h\to\infty} H(h,k) = k$ for any fixed $k$, so I will try to address the second question, that is, whether or not $$\lim\limits_{h\to\infty} h - H(2h,h) = 0$$ In particular, if we let $n = 2^h$, then we are asking whether $$\lim\limits_{n\to\infty} \lg(n) - n\sum_{j=0}^{n^2}\bi...
I recently start to learn about shamir secret sharing and [Feldman's VSS Scheme][1]. I know the concepts But I cant figure how it works. mostly because many of modulates are with "p" and some of them are with "q". I can't find a good sample that helps me understand it better. here's the example I am working with: ...
I recently started to learn about Shamir secret sharing and [Feldman's VSS Scheme][1]. I know the concepts But I can't figure out how it works. mostly because many of modulates are with "p" and some of them are with "q". I can't find a good sample that helps me understand it better. here's the example I am working ...
I recently started to learn about Shamir secret sharing and [Feldman's VSS Scheme][1]. I know the concepts But I can't figure out how it works. mostly because many of modulates are with "p" and some of them are with "q". I can't find a good sample that helps me understand it better. here's the example I am working ...
currently I am working on some secure accounting application. I have few requirements: 1. Application should store items which can be searched by name. 2. Every item has price and tax. 3. Every invoice contains arbitrary amount of different items. 4. Every invoice has gross and net sum of items My idea is to use...
That's the archetypal solution looking for problem and towards that goal ignoring reality. Case in point: solution = homomorphic encryption, problem = invoicing, reality = invoices need to be understandable by those who make them, since the real work is insuring the inputs are correct, or at least make some sense. A...
I am working on system which can calculate average salary for different positions in large companies I want to use Paillier schema to do such calculation. I have 3 fields which I want to encrypt: companyName, jobTitle, seniority and salary Let’s say I have 3 different companies which want to calculate average sa...
[Paillier cryptosystem](http://en.wikipedia.org/wiki/Paillier_cryptosystem) is a probabilistic asymmetric algorithm for public key cryptography. Doesn't homomorphic encryption schemes have regular effects on the plaintext, and does that mean Pailliers cryptosystem missing the nonce? What is that I am missing? I am a...
The (computational) problem of *iterated squaring* (IS) in the RSA group is defined as follows, where $\leftarrow$ denotes sampling uniformly at random: > Input: $(N,x,T)$, where $N$ is the RSA modulus, $x\leftarrow\mathbb{Z}_N^*$, and $T\in\mathbb{N}$ is the time parameter > >Solution: $x^{2^T}\bmod{N}$. This ...
I want to encrypt very small integers in the range `0-44` using the [Paillier cryptosystem][1]. Is there a way to select `p`, `q` (`g=n+1` anyway) and mostly `r` in such a way that I can guarantee that the encrypted values are still 32-bit integers? Also, I have trouble understanding how to select `r`. According to ...
Consider a verification equation $ e(\Delta,\tilde{G}) = e(W_x,x\tilde{G}+pk_{acc})$ from a pairing based accumulator which uses the value $x$ and the corresponding witness $W_x$ to verify that a value $x$ is accumulated in the accumulator $\Delta$. For anonymous credential system for **multishow unlinkabilit...
How can we construct a ZKPoK which hides both $x$ and the witness $W_x$ in dynamic accumulators?
In previous versions of TLS, the choice of the Diffie-Hellman parameters was up to the participants. This resulted in some implementations choosing incorrectly, resulting in vulnerable implementations being deployed. How does TLS 1.3 takes this choice away? How are the **X(g^x mod p)** and **Y(g^y mod p)** values d...
How does TLS 1.3 restrict the Diffie-Hellman parameters to ones that are known to be secure?
Alice has a master private key $x$, with corresponding public key $X=xG$. $G$ is a well-known base point on the curve. Alice creates a new identity with (private, public) key pair $(a, A = aG)$. Alice encrypts her master private key with a uniformly random scalar $k$, as $x'=x+k$. She calculates $K=kG$. Alice ...
Alice has a master private key $a$, with corresponding public key $A=aG$. $G$ is a well-known base point on the curve. Alice deterministically creates a new identity associated with a particular message $m$. She calculates the private key $b = HKDF_s(a, m)$, where $\operatorname{HKDF_s}$ means to use HKDF to derive ...
Alice has a master private key $a$, with corresponding public key $A=aG$. $G$ is a well-known base point on the curve. Alice deterministically creates a new identity associated with a particular message $m$. She calculates the private key $b = HKDF_s(a, m)$, where $\operatorname{HKDF_s}$ means to use HKDF to derive ...
Alice has a master private key scalar $a$, with corresponding public key $A=aG$. $G$ is a well-known base point on the curve. Alice deterministically creates a new identity associated with a particular message $m$. She calculates the private key $b = HKDF_s(a, m)$, where $\operatorname{HKDF_s}$ means to use HKDF to ...