instruction stringlengths 15 30k |
|---|
I haven't found much info on the internet about the weakness of modes to chosen plaintext attacks, but from what I understand of them, there seem to be some trivial attacks, so I'm a bit confused.
For example, let's encrypt 2 blocks of plaintext with value 0 with CBC:
C0=Ek(P0+IV)=Ek(IV)
C1=Ek(P1+C0)=Ek(Ek(IV)... |
Are modes like CBC, OFB, CFB subject to chosen plaintext attacks? |
Welcome, and that's good :-) Ring oscillator perchance?
800-22 uses a critical value of $\alpha = 0.01$. That means one in a hundred tests will fail on average, even with the most randomnest of generators. That's just because randomness is pesky and stochastic.
It's also not surprising to get at least one or tw... |
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$ ... |
The question tells that "95/100" of failed tests are the Nonoverlapping test.
This implies that at least $14$ tests failed (because $12/13 ≈ 0.923$ would have been rounded to 90/100); and at least $92.5\%$ of the failed tests where the same (because less would have been rounded to 90/100 or less).
There are 15 te... |
The question tells that "95/100" of failed tests are the Nonoverlapping test.
This implies that at least $14$ tests failed (because $12/13 ≈ 0.923$ would have been rounded to 90/100); and at least $92.5\%$ of the failed tests where the same (because less would have been rounded to 90/100 or less).
There are 15 te... |
The question tells that "95/100" of failed tests are the Nonoverlapping test.
This implies that at least $14$ tests failed (because $12/13 ≈ 0.923$ would have been rounded to 90/100); and at least $92.5\%$ of the failed tests where the same (because less would have been rounded to 90/100 or less).
There are 15 te... |
The question tells that "95/100" of failed tests are the Nonoverlapping test.
This implies that at least $14$ tests failed (because $12/13 ≈ 0.923$ would have been rounded to 90/100); and at least $92.5\%$ of the failed tests where the same.
There are 15 tests in NIST800-22, and I'll assume $i\ge8$ have been impl... |
The question tells that "95/100" of failed tests are the Nonoverlapping test.
This implies that at least $14$ tests failed (because $12/13 ≈ 0.923$ would have been rounded to 90/100); and at least $92.5\%$ of the failed tests where the same.
There are $15$ tests in NIST800-22, and I'll assume $i\ge8$ have been im... |
The question tells that "95/100" of failed tests are the Nonoverlapping test.
This implies that at least $14$ tests failed (because $12/13 ≈ 0.923$ would have been rounded to 90/100); and at least $92.5\%$ of the failed tests where the same.
There are $15$ tests in NIST800-22, and I'll assume $i\ge8$ have been im... |
I'm testing my server application (TLS 1.3) using `s_client` program from the `openssl` library and I need to force the `s_client` generating my "random" values in it's ClientHello.
Could you tell me, how can I do it using command line options - where I should point my random sequence to be generated ? |
How I can force the openssl "s_client" utility to generate predefined random bytes in it's ClientHello? |
Consider a ZKP anonymous credential scheme where each tuple of `(x, identity_secret, merkle_root)` corresponds to a unique nullifier computed as `Hash(x|identity_secret)`. The prover can use this tuple repeatedly along with proving other statements.
`x` is designated on a per-session/app basis. And for a specific tr... |
Consider a ZKP anonymous credential scheme where each tuple of `(x, identity_secret, merkle_root)` corresponds to a unique nullifier computed as `Hash(x|identity_secret)`. The prover can use this tuple repeatedly along with proving other statements.
`x` is designated on a per-session/app basis. And for a specific tr... |
I am reading Section 4.1 (An offline algorithm: SmallDB) of [*The Algorithmic Foundations of Differential Privacy* by Dwork and Roth][1]. I am stuck at the proof of Proposition 4.4, which is about the utility guarantee of the small database mechanism (Algorithm 4 in page 70).
> **Proposition 4.4.** Let $\mathcal{Q}$... |
I am reviewing the ZKP course, represented by the university of Berkley (https://zk-learning.org/). In pages 44 of lecture 6 that is attached below (https://zk-learning.org/assets/lecture6.pdf), the instructor explains the Poly-commitment based on Bulletproofs scheme.
I am a little confused that why the verifier com... |
The question tells that "95/100" of failed tests are the Nonoverlapping test.
This implies that at least $14$ tests failed (because $12/13 ≈ 0.923$ would have been rounded to 90/100); and at least $92.5\%$ of the failed tests where the same.
There are $15$ tests in NIST800-22, and I'll assume $i\ge8$ have been im... |
The question tells that "95/100" of failed tests are the Nonoverlapping test.
This implies that at least $14$ tests failed (because $12/13 ≈ 0.923$ would have been rounded to 90/100); and at least $92.5\%$ of the failed tests where the same.
There are $15$ tests in NIST800-22, and I'll assume $i\ge8$ have been im... |
The question tells that "95/100" of failed tests are the Nonoverlapping test.
This implies that at least $14$ tests failed (because $12/13 ≈ 0.923$ would have been rounded to 90/100); and at least $92.5\%$ of the failed tests where the same.
There are $15$ tests in NIST800-22, and I'll assume $i\ge8$ have been im... |
The question tells that "95/100" of failed tests are the Nonoverlapping test.
This implies that at least $14$ tests failed (because $12/13 ≈ 0.923$ would have been rounded to 90/100); and at least $92.5\%$ of the failed tests where the same.
There are $15$ tests in NIST800-22, and I'll assume $i\ge8$ have been im... |
My question is essentially the same as [this one](https://crypto.stackexchange.com/questions/46886/why-are-random-oracle-not-achievable-in-practice).
The random oracle is a black box that does two things.
1. Maintain a lookup table for any query that has already been asked.
2. For all new queries, toss a bunch of... |
Does quantum-sourced randomness allow a potential random oracle instantiation? |
The question tells that "95/100" of failed tests are Nonoverlapping tests. I previously pointed that's a significant statistical anomaly†, and it couldn't have been correctly tested a good generator. I'm no longer sure following [these][2] [comments][3], which make me wonder about which proportion of the tests made are... |
> For 2., why not use randomness from a quantum measurement outcome to achieve the coin flip? What part of this black box fails as a valid instantiation of a random oracle?
Actually, it is precisely equivalent.
This is not a proposed implementation; instead, it is a model of how an idea Random Oracle works. We n... |
> For 2., why not use randomness from a quantum measurement outcome to achieve the coin flip? What part of this black box fails as a valid instantiation of a random oracle?
Actually, it is precisely equivalent.
This is not a proposed implementation; instead, it is a model of how an ideal Random Oracle works. We ... |
> For 2., why not use randomness from a quantum measurement outcome to achieve the coin flip? What part of this black box fails as a valid instantiation of a random oracle?
Actually, it is precisely equivalent.
This is not a proposed implementation; instead, it is a model of how an ideal Random Oracle works. We ... |
Assume integer factoring, discrete log are classical safe and LWE, McEliece etc are quantum safe. This question is only about SHA family.
1. What role does SHA256 or other hash families play? Why are they needed when we have LWE, McEliece etc?
2. What happens if only SHA2 family including SHA256 is broken? Will w... |
What is the critical importance of SHA and other hash families? |
> 1. What role does SHA256 or other hash families play?
A cryptographic hash function (such as SHA256) takes an arbitrary long input, and converts it into a fixed length string such that:
- Given an output of a hash, it is hard to find an input that hashes to that ("preimage resistance")
- Given a string, it i... |
A Diffie Hellman style approach is proposed in https://mathoverflow.net/questions/408757/diffie-hellman-cryptography-based-on-graph-isomorphism but is broken easily.
Two graphs are isomorphic if there adjacency matrices can be permuted to each other. GI has only quasipolynomial algorithms.
I wonder if there is a ... |
A Diffie Hellman style approach is proposed in https://mathoverflow.net/questions/408757/diffie-hellman-cryptography-based-on-graph-isomorphism but is broken easily.
Two graphs are isomorphic iff there adjacency matrices can be permuted to each other. GI has only quasipolynomial algorithms.
I wonder if there is a... |
I am new to RLWE, would like to ask whether what I am thinking make sense <br>
Suppose I have a message e.g.: x=5 <br>
And I have a lattice based encryption scheme, e.g.: BGV<br>
could I encrypt x with BGV by treating x as a polynomial ring with constant coefficient=5, and other coefficient =0? <br>
Thanks |
Can any encryption scheme that is CCA (Chosen Ciphertext Attack) secure be considered to achieve perfect secrecy? |
Does CCA security imply perfect secrecy? |
Which Rust library is recommended if I would like to implement PLONK? |
Alice wants to send Bob a message. Both have well known public/private EC keys (`PA`, `b`, `PB`, `b`). Both have well known public keys tied to an identity.
Alice computes a shared secret with Bob (`PBa`), and uses the `x` coordinate to tweak her private key, creating a new public/private keypair (`PAx`, `ax`).
... |
Is it undesirable for authentication to require decrypting a ciphertext? |
I've this requirement to 'derive' a session key from an AES key that is stored inside a HSM. I don't want to mention which HSM since what I intended to do is to make the system HSM neutral.
The initial idea is to use any existing KDF algorithms but since the AES key is in hardware, the KDF is only possible if the H... |
I was wondering if changing modes or primitives could affect security. For example, let's say you have encrypted data with AES-128 with CBC mode and you want to change it to AES-128 GCM, or to ASCON. What I mean by that is that you decrypt the messages then encrypt them again with the ew scheme. Does that affect securi... |
Is it a bad idea to swap modes/encryption primitives? |
I was wondering if changing modes or primitives could affect security. For example, let's say you have encrypted data with AES-128 with CBC mode and you want to change it to AES-128 GCM, or to ASCON. What I mean by that is that you decrypt the messages then encrypt them again with the new scheme. Does that affect secur... |
That sounds like [OCB](https://en.wikipedia.org/wiki/OCB_mode). OCB and similar schemes are fine. Security bounds are usually a little weaker than non-integrated Encrypt then MAC(EtM) constructions but not enough to matter.
But creating your own? OCB-like constructions are subtle and can break very very badly. [OCB2... |
In ECDSA, if Alice wants to send a message to Bob, she computes $s=k^{-1}(z+rd_A)$.
I was thinking that the formula could simply be $s=k^{-1}zrd_A$ and the algorithm would work just as well, and the verification would be simpler, because the recipient would just have to calculate $X=s^{-1}zrQ_A$ instead of a sum $X... |
ECDSA simpler formula? |
> Is there something I'm missing?
It would make it be easy to generate forgeries; let $X = Q_A$ and $r$ its $x$-coordinate. Let $s = zr$, and then $(r, s)$ is a forgery of the message with hash $z$ |
Welcome, and that's good :-) Ring oscillator perchance?
800-22 uses a critical value of $\alpha = 0.01$. That means one in a hundred tests will fail on average, even with the most randomnest of generators. That's just because randomness is pesky and stochastic.
It's also not surprising to get at least one or tw... |
An interesting recent [paper][1] by Jin-Yi Cai is suggesting that even slightly noisy quantum gates render Shor's algorithm unable to factor $N=pq.$ The author thanks a group of researchers including Shor, Aho, Boneh, Gacs, Galil, Levin, Lipton, Rivest, Sipser, and Valiant in the acknowledgements section for insightful... |
The Kyber KEM defines an encryption scheme KYBER.CPAPKE that is a variant of the so called Lyubashevsky, Peikert, Regev or "LPR" encryption scheme [1]. While LPR encryption is defined over subrings of cyclotomic number fields, KYBER.CPAPKE is instantiated over an $R_q$-Module where the base commutative ring is $R_q := ... |
The Kyber KEM defines an encryption scheme KYBER.CPAPKE that is a variant of the so called Lyubashevsky, Peikert, Regev or "LPR" encryption scheme [1]. While LPR encryption is defined over subrings of cyclotomic number fields, KYBER.CPAPKE is instantiated over an $R_q$-Module where the base commutative ring is $R_q := ... |
The NIST Kyber KEM spec. defines an encryption scheme KYBER.CPAPKE that is a variant of the so called Lyubashevsky, Peikert, Regev or "LPR" encryption scheme [1]. While LPR encryption is defined over subrings of cyclotomic number fields, KYBER.CPAPKE is instantiated over an $R_q$-Module where the base commutative ring ... |
The NIST Kyber KEM spec. defines an encryption scheme, KYBER.CPAPKE, that's a variant of the so called Lyubashevsky, Peikert, Regev ("LPR") encryption scheme [1]. While LPR encryption is defined over subrings of cyclotomic number fields, KYBER.CPAPKE is instantiated over an $R_q$-Module where the base commutative ring ... |
The NIST Kyber KEM spec. defines an encryption scheme, KYBER.CPAPKE, that's a variant of the so called Lyubashevsky, Peikert, Regev ("LPR") encryption scheme [1]. While LPR encryption is typically defined over subrings of cyclotomic number fields, KYBER.CPAPKE is instantiated over an $R_q$-Module where the base commuta... |
The NIST Kyber KEM spec. defines an encryption scheme, KYBER.CPAPKE, that's a variant of the so called Lyubashevsky, Peikert, Regev ("LPR") encryption scheme [1]. While LPR encryption is typically defined over subrings of cyclotomic number fields, KYBER.CPAPKE is instantiated over an $R_q$-Module where the base commuta... |
The NIST Kyber KEM spec. defines an encryption scheme, KYBER.CPAPKE, that's a variant of the so called Lyubashevsky, Peikert, Regev ("LPR") encryption scheme [1]. While LPR encryption is typically defined over subrings of cyclotomic number fields, KYBER.CPAPKE is instantiated over an $R_q$-Module where the base commuta... |
The NIST Kyber KEM spec. defines an encryption scheme, KYBER.CPAPKE, that's a variant of the so called Lyubashevsky, Peikert, Regev ("LPR") encryption scheme [1]. While LPR encryption is typically defined over subrings of cyclotomic number fields, KYBER.CPAPKE is instantiated over an $R_q$-Module where the base commuta... |
> Are there some other examples of modes that shouldn't be swapped?
Yes: https://crypto.stackexchange.com/a/105961/36960 In short, reusing one key for different purpose is generally harmful to the security assumptions and logics.
> And what if we change the primitive?
I'll answer this part assuming it means c... |
In the paper "Dual system encryption: realizing fully secure IBE and HIBE under simple assumption", the authors said "there is an apparent paradox in this strategy since it seems that the reduction algorithm could simply answer the challenge ciphertext". In the paper "An efficient IBE scheme with tight security reducti... |
In the paper [Dual system encryption: realizing fully secure IBE and HIBE under simple assumption][1] ([free PDF][2]), the authors said "there is an apparent paradox in this strategy since it seems that the reduction algorithm could simply answer the challenge ciphertext". In the paper [An efficient IBE scheme with tig... |
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 ... |
Assume integer factoring, discrete log are classical safe and LWE, McEliece etc are quantum safe. This question is only about SHA and hash families in general on why we need them if we have pkc primitives.
1. What role does SHA256 or other hash families play? Why are they needed when we have LWE, McEliece etc?
2.... |
Authors of "How to explain zero-knowledge Protocols to your children?" |
In [Kyber][1] the following estimation is given for a quantum adversary:
> **Theorem 4**. For any quantum adversary $A$ that makes at most $q_{RO}$ many queries to quantum random oracles $H$ and $G$, and at
> most $q_D$ many (classical) queries to the decryption oracle, there
> exists a quantum adversary $B$ such ... |
Anyone can explaine to me how does the round key in aes256 work please, why is the round key 32 digit while 1 block only have 16 digit? how can 32 digit key XOR 16 digit block? Is it like two digit of round key XOR 1 digit in block? |
So the problem I'm exploring is basically how to run a paper exam (such as the SAT) in such a way that participants can be sure that their exams were graded fairly, meaning the exam hosts can't change the answers or questions of the exam after the exam is conducted without the examinees finding out.
So we have a te... |
How to construct a protocol for a trustless standardized paper test? |
So the problem I'm exploring is basically how to run a paper exam (such as the SAT) in such a way that participants can be sure that their exams were graded fairly, meaning the exam hosts can't change the answers or questions of the exam after the exam is conducted without the examinees finding out.
So we have a te... |
All the knowledge I have learned about encryption algorithms tells me that the AES encryption algorithm uses three key bit lengths of 128, 192, and 256 to encrypt data, and these three key bit lengths correspond to 10, 12, and 14 rounds of encryption, respectively.
But the question is, why?
Why not 11, 13, 15? Wh... |
How are the iterations of the AES encryption algorithm determined? |
Studying C code is unlikely to give you insight beyond mechanics of how AES is implemented.
There are questions already on this site addressing these issues. If you haven't read up on these, please do. One that stands out is
[https://crypto.stackexchange.com/questions/2648/how-were-the-number-of-rounds-for-differ... |
I've generated a key using an HSM Thales PayShield and i have share it with a counterpart. I followed these steps:
- i generated key usign KG console command
- i use FK to form ZMK from clear components (received by the
counterpart)
- i exported key key under ZMK (KE command)
Now, in this parti... |
How do I decrypt a key encrypted by my HSM under a ZMK? |
In [Kyber][1] the following estimation is given for a quantum adversary:
> **Theorem 4**. For any quantum adversary $A$ that makes at most $q_{RO}$ many queries to quantum random oracles $H$ and $G$, and at
> most $q_D$ many (classical) queries to the decryption oracle, there
> exists a quantum adversary $B$ such ... |
*Update:*
In Lipton and Regan's blog, Scott Aaranson and Craig Gidney have [commented][1] that the results are not unexpected and also not a deal-breaker in that dealing with this type of noise is already part of the way QC is implemented, including the use of physical measures as well as error correction for making... |
The integer factorization decision problem (does integer N have a prime factor = k?) is known to be an NP problem. Analogous to this, can we say that the decision problem for finding the private key of an Elliptic curve (Is r the number of times base point was added to come up with target point) is also in NP, but not ... |
> Analogous to this, can we say that the decision problem for finding the private key of an Elliptic curve (Is r the number of times base point was added to come up with target point) is also in NP, but not NP-complete?
Actually, the decision problem for discrete log, that is, given $r, G, H$, is $rG = H$, is in P a... |
If we use the following notation:
$$C = E(P, K_e)$$
$$P = D(C, K_d)$$
Where:
$$E(), D(), C, P, K_e, K_d$$ are the encryption algorithm, decryption algorithm, ciphertext, plaintext, encryption key and decryption key respectively
The only difference between symmetric and asymmetric encryption is:
$K_e = K... |
Symmetric and asymmetric encryption using the same encryption/decryption algorithm? |
I am studying openssl 3.0 (Windows, C++) in order to encrypt data using RSA. More specifically, I need to sign a `CertificateVerify` server message in TLS 1.3. <br/>The questions are:<br/>1) how can I define padding mode (PSS) for RSA encryption for this aim ?<br/>2) Should I to create `EVP_PKEY_CTX* ctx` or I need `EV... |
How to define RSA padding for RSA encryption in openssl 3.0? |
From the [PLONK paper](https://eprint.iacr.org/2019/953.pdf).
Page 23, 6 Constraint System
---
The constraint system $C = (V, Q)$ is defined as follows.
- $V$ is of the form $V = (a, b, c)$, where $a$, $b$, $c \in [m]^n$. We think of $a$, $b$, $c$ as the left, right and output sequence of $C$ respectively... |
From the [PLONK paper](https://eprint.iacr.org/2019/953.pdf).
Page 23, 6 Constraint System
---
The constraint system $C = (V, Q)$ is defined as follows.
- $V$ is of the form $V = (a, b, c)$, where $a$, $b$, $c \in [m]^n$. We think of $a$, $b$, $c$ as the left, right and output sequence of $C$ respectively... |
I know it's possible with ECDSA. How bout RSA? |
Can we extract public key from signature created by RSA? |
I would like to let the receiver has the ability to check the authenticity of the message sent by the sender.
Also I want to protect the message's confidentiality and integrity.
Should I use `aes gcm + hmamc` or just `aes gcm`?
I heard `aes gcm` provides messages authentication suing Ghash. But ghash is not... |
Does HMAC provide anything that AES GCM does not? |
This isn't a multi party computation problem. It's a physical security problem. If the exam paper will be published after the fact there's no need for complex multi party computation. Release a signed answer key.
The idea of the test taking organization "changing" their public key after the exam is silly in my opini... |
I would like to let the receiver has the ability to check the sender's authenticity when he gets the message.
Also, I want to protect the message's confidentiality and integrity.
Should I use `aes gcm + hmamc` or just `aes gcm`?
I heard `aes gcm` provides messages authentication suing Ghash. But ghash is n... |
This isn't a multi party computation problem. It's a physical security problem. If the exam paper will be published after the fact there's no need for complex multi party computation. Release a signed answer key.
The idea of the test taking organization "changing" their public key after the exam is silly in my opini... |
I am trying NIST SP 800-22 to test the randomness of 128 bit output in AES, but i always get ***igamc: UNDERFLOW*** or ***Segmentation fault (core dumped)*** error.
My data file has 128 bit output format, for example as follows:
```
0110110001000101111101110101001101100000010111100111110001001011101111100101001110... |
> Should I use `aes gcm + hmamc` or just `aes gcm`?
Just `aes gcm` is fine - GCM includes the integrity protection.
> I heard `aes gcm` provides messages authentication suing Ghash. But ghash is not a mac, so I am confused how aes gcm achieve message authentication
Ghash is indeed not a MAC - it is a [universa... |
The [Pinocchio][1] paper contains a description of the GGPR protocol (Protocol 1), and claims that verification requires "8 pairings for the $\alpha$ terms, and 3 for the $\beta$ term". However I can't figure out how to verify the $\beta$ term with 3 pairings, it seems to require 4.
For context, the proof is given a... |
How many pairings are needed to verify beta term in GGPR13 zk-snark? Pinocchio paper says 3 but I count 4 |
The [Pinocchio][1] paper contains a description of the GGPR protocol (Protocol 1), and states that verification requires "8 pairings for the $\alpha$ terms, and 3 for the $\beta$ term". However I can't figure out how to verify the $\beta$ term with 3 pairings, it seems to require 4.
For context, the proof is given a... |
> Can we extract public key from signature created by RSA
I assume the question is: we have both the message and the RSA signature; can we find an RSA public key that could have been used to sign that message?
The answer is no, it is infeasible.
On the other hand, if we have two signatures (to two different me... |
For security against Chosen Plaintext Attack (CPA), we need randomized algorithms for encryption. But in some schemes (maybe almost all of them) take decryption algorithm deterministic. This procedure occurs in functional encryption, that its security definitions are more complicated than ordinary public encryption, to... |
Why is decryption algorithm usyally deterministic? |
It's possible to use a hash function as an enciphert scheme if used in counter mode.
Let's suppose I take a 64-bytes (512-bits) seed/key and hash it concatenated with counters, and use it as a encipherment scheme. But the hash function has its digest output size of 32-bytes.
Some hash function such as Blake2 and ... |
If encrypting with a hash function in counter mode, will the security of this scheme be at most minimal{input,output}? |
let's look at the public key in this post as an example: https://crypto.stackexchange.com/a/35105
>MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/DgYSF6vUpwmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ51s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQAB
... |
why RSA public keys contains non-ascii characters? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.