instruction
stringlengths
15
30k
Let's say we have a billion short individual json files with same regular structure: ``{"name": "<name>", "id": <id>}``. Each file is individually encrypted with some crypto algorithm (symmetric or asymmetric). The cryptanalyst has all the billion files, and additionally knows public key that generated the billion indi...
> Is the application of encryption flawed (less secure) in this case? It should not. - It's the goal of any modern encryption algorithm that it remains safe in the question's situation, unhindered by the billion ciphertexts: modern ciphers withstand _Known Ciphertext_ attacks. - That's even if the attacker knows...
> Is the application of encryption flawed (less secure) in this case? It should not. - It's the goal of any modern encryption algorithm that it remains safe in the question's situation, unhindered by the billion ciphertexts: modern ciphers withstand _Known Ciphertext_ attacks. - That's even if the attacker knows...
> Is the application of encryption flawed (less secure) in this case? It should not. - It's the goal of any modern encryption algorithm that it remains safe in the question's situation, unhindered by the billion ciphertexts: modern ciphers withstand _Known Ciphertext_ attacks. - That's even if the attacker knows...
> Is the application of encryption flawed (less secure) in this case? It should not. - It's the goal of any modern encryption algorithm that it remains safe in the question's situation, unhindered by the billion ciphertexts: modern ciphers withstand _Known Ciphertext_ attacks. - That's even if the attacker knows...
I have read lots of books about CPA,CCA1,CCA2. I understand how to get an example satisfies CPA but not CCA2. However, I can't find such a scheme which is CPA but not CCA1. What is the extra advantage by lunch attack?
How can I understand the gap between CPA and CCA1?
Forgive my ignorance, but I've run into some confusion in an AES implementation I'm testing. To the best of my understanding, ECB provides no diffusion, the same plaintext with the same key will yield the same ciphertext every time. That's what makes it so bad for real-world cryptography. But as a programmer, ...
As a general rule most counterexamples will be very contrived. If you don't mind that, it's actually not too hard to come up with a separating example. First consider what power we have in CCA1 that we don't have in CPA. We get to make decryption queries, but only *before* receiving the challenge ciphertext. This me...
the gnfs is the most efficient algorithm for factoring numbers formed of equal composites. But it’s sequential parts means (If I’m not wrong), that it requires at least 10 minutes on current hardware to factor semi‑primes formed of composites of equal length (in the case of 382 bits semi‑primes). Are there less e...
I am trying to implement the NTT as done in this [paper][1], but I keep getting the wrong result even when doing the math by hand. Is formula 9 of the paper wrong ? (I suspect that I am the wrong one but just want to confirm) [1]: https://arxiv.org/pdf/2212.14191.pdf
Two popular example dynamical systems for PRNG are - LFSRs, basically the orbit $(x^ks)_{k>0}$ for some non-zero seed $s$ and (primitive) $x$ in $GF(2^n)^{\times}$ - CTR_DRBG, say with AES128 and 256-bit seed covering the key and initial counter block (i.e. $N+2$ AES encryptions, $N$ for output and one each for upda...
I'm reading "[On lattices, learning with errors, random linear codes, and cryptography](https://doi.org/10.1145/1568318.1568324)" by O. Regev. I'm having trouble with understanding the proof of claim 5.2. "Hence, it is enough to show that $\left|\sum_{i=1}^k p x_i \bmod p\right|<p / 16$ with high probability. This c...
When I'm reading this paper "[On lattices, learning with errors, random linear codes, and cryptography](https://doi.org/10.1145/1568318.1568324)" by O. Regev. I have trouble understanding the proof of claim 5.2. "Hence, it is enough to show that $\left|\sum_{i=1}^k p x_i \bmod p\right|<p / 16$ with high probability....
``` Root (Hash01234) / \ Hash0123 Hash4 / \ Hash01 Hash23 / \ / \ Hash0 Hash1 Hash2 Hash3 ``` Can I construct a Merkle Tree like above instead of creating it like the below? ``` ...
Can I construct a incomplete Merkle Tree without denting its security?
the gnfs is the most efficient algorithm for factoring numbers formed of equal composites. But it’s sequential parts means (If I’m not wrong), that it requires at least 10 minutes on current hardware to factor semi‑primes formed of composites of equal length (in the case of 382 bits semi‑primes). Are there less e...
the gnfs is the most efficient algorithm for factoring numbers formed of equal composites. But it’s sequential parts means (If I’m not wrong), that it requires at least 10 minutes on current hardware to factor semi‑primes formed of composites of equal length (in the case of 382 bits semi‑primes). Are there less e...
1. Security is the same. 2. Efficiency. Producing and transmitting Merkle proofs can become inefficient if the tree is too unbalanced. On the other hand, an extremely unbalanced tree (where only only a single branch grows[1]) can be used in a hash-based signature scheme where it is expected that signatures are go...
Let's say a user creates their primary gpg key pair for ``User Name <user@email.com>`` and selects an encryption and signing algorithm that isn't widely available (think goldilocks). For instance, let's say one would create a signing key with ed448, and encryption key with cv448. If the user goes ahead and submits s...
Let's say a user creates their primary gpg key pair for ``User Name <user@email.com>`` and selects an encryption and signing algorithm that isn't widely available (think goldilocks). For instance, let's say one would create a signing key with ed448, and encryption key with cv448. If the user goes ahead and submits s...
the gnfs is the most efficient algorithm for factoring numbers formed of equal composites. But it’s sequential/Linea Algebra parts mean (If I’m not wrong), that it requires at least 10 minutes on current hardware to factor semi‑primes formed of composites of equal length (in the case of 382 bits semi‑primes). Are...
the gnfs is the most efficient algorithm for factoring numbers formed of equal composites. But it’s sequential/Linea Algebra parts mean (If I’m not wrong), that it requires at least 10 minutes on current hardware to factor semi‑primes formed of composites of equal length (in the case of 382 bits semi‑primes). Are...
The idea of n-1 parties being garblers and 1 party being evaluator is not clear to me. Can I get an explanation of how the BMR protocol runs stage by stage with an example. I guess the keys to each wire is concatenation of the keys from every garbler, however what's the need for permutation bit? How is the sec...
the gnfs is the most efficient algorithm for factoring numbers formed of equal composites. But it’s sequential/Linea Algebra parts mean (If I’m not wrong), that it requires at least 10 minutes on current hardware to factor semi‑primes formed of composites of equal length (in the case of 382 bits semi‑primes). Are...
Is it possible to construct a (pseudo-)continuous encryption scheme?
The above answer is correct, but I know from teaching this problem to others some still have trouble grasping why it is right. If that is you, think of it this way: You have ten wires. Consider them each in turn. For the first wire, you have 26 choices of where to plug in one of its ends. After doing so, you have...
The above answer is correct, but I know from teaching this problem to others some still have trouble grasping why it is right. If that is you, think of it this way: You have ten wires. Consider them each in turn. For the first wire, you have 26 choices of where to plug in one of its ends. After doing so, you have...
The above answer is correct, but I know from teaching this problem to others some still have trouble grasping why it is right. If that is you, think of it this way: You have ten wires. Consider them each in turn. For the first wire, you have 26 choices of where to plug in one of its ends. After doing so, you have...
The above answer is correct, but I know from teaching this problem to others some still have trouble grasping why it is right. If that is you, think of it this way: You have ten wires. Consider them each in turn. For the first wire, you have 26 choices of where to plug in one of its ends. After doing so, you have...
The above answer is correct, but I know from teaching this problem to others some still have trouble grasping why it is right. If that is you, think of it this way: You have ten wires. Consider them each in turn. For the first wire, you have 26 choices of where to plug in one of its ends. After doing so, you have...
It seems to me that if the image is close if and only if the pre-image is close, this is violating a basic security property, isn't it? Local search will then be feasible *unless* you appeal to some kind of *chaotic* or fractal function definition--which presents its own problems for cryptography. There are questio...
Adaptive adversaries are a class of adversaries who can decide to corrupt parties in the protocol execution process. However, I want more information about this model and the proof skills. There are some questions: (1) Where can I find the corresponding security definition? When was it first proposed and by whom? (2...
Is it possible to construct a (pseudo-)continuous PRF or MAC?
p = 115792089237316195423570985008687907853269984665640564039457584007908834671663 E(Fp^6) : x^3 + 7 E'(Fp^6) : x^3 + 4 then, by sextic twist property, E/Fp^6 and E'/Fp^6 is isomorphic. How should I map E'(Fp6) --> E'(Fp) starting from Bitcoin public key coordinates(x,y)? Is this map frobenius endomorph...
How should I map E'(Fp6) --> E'(Fp) starting from Bitcoin public key coordinates(x,y)?
Does anybody have a library of fastest parity finding algorithms in RNS representation? By parity I mean $x \bmod 2$ where $x$ is the number between $0$ and $N=\Pi m_i$ and all moduli are odd. I have found a fast algorithm, but since it is quite simple, I need to check whether it pre-exists or not. I found a referen...
Does anybody have a library of fastest parity finding algorithms in RNS representation? By parity I mean $x \bmod 2$ where $x$ is the number between $0$ and $N=\Pi m_i$ and all moduli are odd. I have found a fast algorithm, but since it is quite simple, I need to check whether it pre-exists or not. I found a referen...
Let us consider the scenario where there are n-1 garblers and a single evaluator. The garblers together need to generate a garbled circuit. We use a distributed garbling protocol such as [BLO16] and hand over the inputs to evaluator. Why during the computation are the masking bits needed? It is stated that each par...
Is there any example for data that has the same **sha256sum value**? Or is it impossible to find out with current computational power?
the gnfs is the most efficient algorithm for factoring numbers formed of equal composites. But it’s sequential/Linea Algebra parts mean (If I’m not wrong), that it requires at least 10 minutes on current hardware to factor semi‑primes formed of composites of equal length (in the case of 382 bits semi‑primes). Are...
Given a private key using algorithm RSA-PSS with SHA256 is it possible to use this key to sign a JWT using algorith RS256 (RSA with SHA256) instead of PS256 (RSA-PSS with SHA256)? The German government seems to be of the opinion it is possible and wants us to do this for one of their new tax reporting related APIs....
the gnfs is the most efficient algorithm for factoring numbers formed of equal composites. But it’s sequential/Linea Algebra parts mean (If I’m not wrong), that it requires at least 10 minutes on current hardware to factor semi‑primes formed of composites of equal length (in the case of 382 bits semi‑primes). Are...
Two popular example dynamical systems for PRNG are - LFSRs, basically the orbit $(x^ks)_{k>0}$ for some non-zero seed $s$ and (primitive) $x$ in $GF(2^n)^{\times}$ - CTR_DRBG, say with AES128 and 256-bit seed covering the key and initial counter block (i.e. $N+2$ AES encryptions, $N$ for output and one each for upda...
I have difficulties understanding the PRP in the absorb phase of a sponge construction: a block is XORed to the r part of the state memory,and then the entire state sent through a blockcipher-like pseudorrandom permutation in CBC-Mode or is it simply seen as an output of a pseudorrandom function f or can you do both? ...
Can f(S) also be replaced by PRF(S) in a Sponge consruction?
When assuming the following idea for ciphers: For a block cipher, a 4-round Feistel network where the key schedule is: input key, input key with every odd bit flipped, input key with every even bit flipped, input key with every bit flipped. For a stream cipher: a 64-bit unsigned int that gets concatenated with th...
BLAKE3 for Block and Stream ciphers?
When assuming the following idea for ciphers: For a block cipher, a 4-round balanced Feistel network where the key schedule is: input key, input key with every odd bit flipped, input key with every even bit flipped, input key with every bit flipped. For a stream cipher: a 64-bit unsigned int that gets concatenate...
There are MPC comparison protocols which can securely compute $(a<^?0):=\begin{cases}1,\text{ if }a<0\\ 0,\text{ otherwise}\end{cases}$, where $a$ is an element of a prime-order field (of course one needs a notion of what $"<"$ even means in this case). But to my knowledge, all of them use some kind of bit decompositio...
When assuming the following idea for ciphers: For a block cipher, a 4-round balanced Feistel network where the PRF is BLAKE3 and the key schedule is: input key, input key with every odd bit flipped, input key with every even bit flipped, input key with every bit flipped. For a stream cipher: a 64-bit unsigned int...
Can f(S) also be replaced by PRP(S) in a Sponge consruction?
What do you mean about "proof skills"? Anyway, the adaptive security model is well motivated: it gives the adversary additional power that is very natural in practice. Furthermore, there are a few approaches to MPC that entirely break in the presence of an adversary that can corrupt parties at any point of the proto...
Simple question : given a randomly generated number `N` from a hash that is hard to factor, how to check if `N` is probably a semi‑prime in a faster way than factoring it ? My problem is while it’s easy to check if `N` has more than 2 composites most of the time, I’d like to avoid scenarios where I spend 9 months ...
How to know if a random number is a semiprime?
> I have difficulties understanding the PRP in the absorb phase of a sponge construction This is a good question. The key is that sponge constructions do not use a PRP. The (usual) sponge construction uses a public random permutation instead. The difference is that the adversary can evaluate a public permutation dir...
Assuming the generator of one group $\mathbb G$ is $G$. Given an element $C\in \mathbb G$ and a cryptographic hash function $H(\cdot)$, is it hard for one adversary to find a pair of message $m$ and another element $R\in \mathbb G$ to make $RG^{H(m||R)}=C$? Besides, is it necessary to make $H(\cdot)$ become the rand...
Is it hard to find m, R to make RG^H(m||R)=C?
In digital multi signature. Does the Rogue Key Attack and the Key cancellation attack are the same ? or there are a differences between them, because (as I understood) the attacker in both cases generates a valid signature instead of other cosigners.
From [this][1] answer I am able to understand that if CM field discriminant for a particular curve is small then it provide us a fast endomorphism which in turn allow rho method to speed up by $\sqrt{\frac{1}{3}}$. What I cannot understand is: 1. How one calculate this CM discriminant? Is this same as $\Delta = ...
How does Fast Reed-Solomon Interactive Oracle Proof (FRI) protocol work using polynomial commitments in zk-STARKs?
Simple question : given a randomly generated number $N$ from a hash that is hard to factor, how to check if $N$ is probably a semi‑prime in a faster way than factoring it ? My problem is while it’s easy to check if $N$ has more than 2 composites most of the time, I’d like to avoid scenarios where I spend 9 months ...
How to know if a random number is a probable semiprime?
> I have difficulties understanding the PRP in the absorb phase of a sponge construction This is a good question. The key is that sponge constructions do not use a PRP. The (usual) sponge construction uses a public random permutation instead. The difference is that the adversary can evaluate a public permutation dir...
Simple question : given a randomly generated number $N$ from a hash that is hard to factor, how to check if $N$ is probably a semi‑prime in a faster way than factoring it ? My problem is while it’s easy to check if $N$ has more than 2 composites most of the time, I’d like to avoid scenarios where I spend 9 months ...
Hypothetically, if I am using tink-java and I generate a keyset/keypair. If I lost my private key, can I get the public key from that?
Using HPKE, if I generate my key pair can I derive the public key from the private key just in case I lose the public key?
Let $p$ be the prime number `115792089237316195423570985008687907853269984665640564039457584007908834671663` and let $E$ and $E'$ be the curve equations $$E(\mathbb F_{p^6}) : x^3 + 7$$ $$E'(\mathbb F_{p^6}) : x^3 + 4$$ then, by sextic twist property, $E/\mathbb F_{p^6}$ and $E'/\mathbb F_{p^6}$ are isomorphic. ...
There's also Eugene Styer's [Javascript DES Example](https://people.duke.edu/~tkb13/courses/ncsu-csc405-2015fa/RESOURCES/JS-DES.shtml) (mirror of university course, original is down) which can be (re-)modified to allow using any key: 623c623 < <td><input name="key" value="0000000000000000" size="25"...
Are the rogue key attack and the key cancellation attack identical within digital multi signature? In both cases the attacker generates a valid signature instead of other cosigners, to my understanding.
I am asking it again because no one answered my previous question with more clarity. I have deleted that question One more co-CDH in Type three pairing groups $G_1 \times G_2 \to G_T$: means given a generator $g_2$ in $G_2$, $A = g_2^a$ with random $a$ and an oracle $\mathcal{O}$ which which accepts query $Q \in G_1...
In the two-party setting, there are fast protocols for securely comparing two shared integers that do not go through bit decomposition. For example: **If you want to optimize online communication** (but are ok with paying more communication in an input-independent preprocessing phase), then the best approaches rely ...
Did you read the paper [NTY21][1]? [NTY21] designed the zero-XOR protocol that includes zero-sharing and OPPRF. For $P_1$, OPPRF is used to get the other parties' share. If you don't use OPPRF to get the share, $P_1$ can't map the element $x$ to its corresponding share. [1]: https://eprint.iacr.org/2021/1221
The security of the multi-party computation protocol can be given by real/ideal world paradigm. The simulator based proof considers the joint distribution of adversary's output and honest parties output. Why is there a need to take the joint distribution in this case? Why can't we just take adversary's output to pro...
Elliptic curves are not the only curves that have groups structure, or uses in cryptography. But they hit the sweet spot between security and efficiency better than pretty much all others. For example, conic sections (quadratic equations) do have a well-defined geometric addition law: given $P$ and $Q$, trace a line...
I read a statement that states OT (Oblivious transfers) cannot be constructed from public key encryption in a black box manner. What does it mean here by black box manner? Is Oblivious transfer a complete primitive?
Hypothetically, if I am using tink-java and I generate a keyset/keypair. If I lost my public key, can I get the public key from the private key?
I am looking at ways to blind an ECDSA signing key (and verification key respectively). Looking at proposed solutions like the [IETF KBSS draft](https://datatracker.ietf.org/doc/draft-irtf-cfrg-signature-key-blinding/), and the [IETF ARKG draft](https://datatracker.ietf.org/doc/draft-bradleylundberg-cfrg-arkg/) it s...
What does black box manner mean in Oblivious Transfer (OT)?
I'm building a micro-controller based encryption device that uses one time pads. [System details][1] The reason I'm going this route is that I want a system which secure, but also very simple and easy to understand. One time pad encryption has a known vulnerability against bit flip attacks. I would like to mitiga...
What is the simplest method of protecting a one time pad encrypted message from bit flip attacks?
I'm looking for a more efficient way to avoid adding duplicate members to a cryptographic accumulator. Currently, I require users to provide a non-membership proof, and only if the proof is valid, adding to the accumulator is allowed. Is there a way to merge the check-and-add steps into one step? Additionally, ...
How to efficiently avoid adding duplicate members to cryptographic accumulators?
I have case when I need take payload to client with key for decrypting. But client mustn't encrypt another payload by this key. After some research, as I understand it's case of asymmetric encryption. Me: Encrypt data by "public" key. Client: Decrypts data by "private" key and can't encrypt another payload becaus...
What can I use for encrypting by one key, decrypting by another key?
I have case when I need take payload to client with key for decrypting. But client mustn't encrypt another payload by this key. After some research, as I understand it's case of asymmetric encryption. Me: Encrypt data by "public" key. Client: Decrypts data by "private" key and can't encrypt another payload becaus...
NIST recently unveiled the criteria for crafting a new block cipher mode of operation for AES called [Accordion Cipher Mode][1]. Simultaneously, they've announced Ascon as the Winner in the Lightweight Cryptography competition (LWC). This raises the question: 1. What shortcomings does Ascon possess, prompting NIST...
According to [answer](https://serverfault.com/a/755655) and status of PGP on [RFC search](https://www.rfc-editor.org/search/rfc_search.php), OpenPGP RFCs can be used as "technical reference for the applicable internet standard". The quote mentioned in previous sentence is a little vague. In Crypto community, is OpenPGP...
I checked a [related question](https://crypto.stackexchange.com/questions/51629/is-triple-des-still-considered-safe-to-use), but I still did not find the answer I was looking for. Specifically, do we have any statistics on the usage of DES/2DES/3DES? It seems [from here](https://crypto.stackexchange.com/questions/...
Is DES/2DES/3DES still used?
Im reviewing my crypto and I would like to prove the following: RSA experiment where the adversary is given N, e, and y. The adversary knows p, q. I know the RSA scheme is built on the idea that it is hard to find 2 large primes that are factors of N, and we already have this so it's easy to solve for d now. In orde...
I wrote a simple implementation of ChaCha20 encryptor for files in C using MbedTLS implementation. The process of encryption is standard - I set key, then for each block of fixed size I generate new nonce (to prevent nonce reuse) and encrypt this block. Then I write nonce to a new file and then append block of encrypte...
EdDSA generates the private nonce deterministically by hashing the private key and the message, and this means that the public nonce R and the signature s will be same if the same message signed more than once. Does this mean that EdDSA is vulnerable to Reply attack ? I now it is not, but I don't what are the mechanis...
> Does this mean that EdDSA is vulnerable to Reply attack ? I now it is not, but I don't what are the mechanisms that EdDSA uses to avoid this type of attacks. I assume you mean "Replay attack". Well, for any signature system, if an attacker gets a (message, signature) pair, they could try to use it multiple time...
Is there a square matrix with applications in Cryptography such that the determinant of this matrix is 0 and all its sub minors are non-singular?
> Does this mean that EdDSA is vulnerable to Reply attack ? I now it is not, but I don't what are the mechanisms that EdDSA uses to avoid this type of attacks. I assume you mean "Replay attack". Well, for any signature system, if an attacker gets a (message, signature) pair, they could try to use it multiple time...
I have been reading Flaws in Applying Proof Methodologies to Signature Schemes and ran into a bit that I do not understand. In section 4.2 the authors describe a scheme where a malicious signer crafts a public key and signature that verifies two different messages. They postulate that upon revealing the second messag...
I have been reading Flaws in Applying Proof Methodologies to Signature Schemes and ran into a bit that I do not understand. In section 4.2 the authors describe a scheme where a malicious signer crafts a public key and signature that verifies two different messages. They postulate that upon revealing the second messag...
We utilize a differential privacy mechanism (Laplace noise) to provide the privacy of records stored within a dataset. Each individual is associated with two, and at most $k$, records. These records are represented as $(Username, O_i)$, where $O_i$ denotes the $i$th noisy value (generated by the mechanism) correspondin...
We utilize a differential privacy mechanism (Laplace noise, with scale $b$) to provide the privacy of records stored within a dataset. Each individual is associated with two, and at most $k$, records. These records are represented as $(Username, O_i)$, where $O_i$ denotes the $i$th noisy value (generated by the mechani...