Questions tagged [chacha]
ChaCha is a family of stream ciphers proposed by Daniel J. Bernstein, as an evolution of Salsa20 with (conjecturally) improved resistance to cryptanalysis.
189 questions
2 votes
0 answers
83 views
Can I have a 32-byte nonce XChaCha20 by XORing the counter?
XChaCha20 takes a 192-bit nonce and a 64-bit counter, but I need a 256-bit nonce. Can I simply XOR the 64-bit counter to the bottom of a 256-bit random nonce? This would be analogue to the XCTR mode ...
2 votes
1 answer
113 views
ChaCha20 security boundary without a nonce
Under the assumption that ChaCha20's nonce and counter are replaced with a 128-bit counter, how many blocks would it be secure up to? My intuition tells me it is secure even after encrypting $2^{128}$ ...
3 votes
2 answers
675 views
Is it possible to invert ChaCha20 rounds to recover an internal state of a specific round?
Can an adversary invert some rounds of ChaCha20 (or ChaCha12) to obtain the internal state of a specific round? I mean, if an adversary can invert 12 rounds of ChaCha20 to obtain the internal state of ...
3 votes
1 answer
315 views
How to "fix" the ChaCha permutation?
The generalized ChaCha core permutation (as used in BLAKE and *NORX) consists of: $$ \mathrm{QuarterRound}(a, b, c, d):\\ \...
4 votes
1 answer
184 views
Why do some ARX ciphers require many more rounds than others?
chacha20 has 20 rounds and even that is somewhat deceptive because the rounds alternate between columns and diagonals such that you need 2 rounds to involve the entire state. However if you compare it ...
1 vote
0 answers
114 views
ChaCha/BLAKE quarter round as a standalone block cipher
If you take the quarter round function from ChaCha/BLAKE (128 bit permutation with 32-bit words or 256 bit permutation with 64-bit words; different rotation constants) Would you have a sound 128/256 ...
1 vote
3 answers
132 views
CSPRNG: Difference between hashing in recursion and hashing with a counter?
When trying to implement a seeded CSPRNG, is there any security differences between: chacha20(seed, 0) chacha20(seed, 1) ... chacha20(seed, n) and ...
5 votes
2 answers
155 views
Why do popular ARX ciphers have large states?
salsa20/chacha20/blake/blake2/blake3 all utilize a 4x4 grid of words on which transformations occur row-wise and then column/diagonal-wise. State size varies between 512 and 1024 bits based on word ...
1 vote
3 answers
237 views
Using shortened key for Chacha20
As I understand it, the chacha20 algorithm is designed for use with 256-bit keys, but is it possible to use shorter keys than this without compromising the security? Say if i use a 192-bit key and set ...
-2 votes
1 answer
140 views
Why increment counters by 1 in stream ciphers?
What is the security rationale behind incrementing by 1 in stream ciphers like ChaCha20Poly1305—which often only changes one or two bits and is very weak and predictible—versus other methods like ...
2 votes
2 answers
153 views
Can you use ChaCha20 as one-time pad?
My knowledge of cryptography nothing beyond basic so I am by no means an expert, but I do know a bit of undergraduate mathematics including number theory. I know that stream ciphers like ChaCha20 is ...
0 votes
0 answers
130 views
ChaCha20 1Gb encryption speed question
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 ...
1 vote
1 answer
721 views
ChaCha20 as a block cipher
Would it be possible to use ChaCha20 as a block cipher? With the key, the entire block function can be reversed.
2 votes
2 answers
615 views
Constant values of ChaCha20
Is it possible to change the constant values of ChaCha20? and how it will affect the security of the cipher.
1 vote
0 answers
108 views
Extended-Chacha20
Research paper: "Extended-Chacha20 Stream Cipher With Enhanced Quarter Round Function" The initial matrix is 6x6, but what are the exact inputs for each index, in other words, how will you ...