#collisions | Lower Bound | Upper Bound | |||
1 | 635 | 0.00968 | |||
2 | 446 | 0.00680 | |||
#collisions | Lower Bound | Upper Bound | |||
1 | 6981 | 0.00666 | |||
2 | 4044 | 0.00386 | |||
#collisions | Lower Bound | Upper Bound | |||
1 | 91677 | 0.00546 | |||
2 | 46030 | 0.00274 | |||
3 | 38561 | 0.00230 |
We show that the underlying permutation of ChaCha20 stream cipher does not behave as a random permutation for up to 17 rounds with respect to rotational cryptanalysis. In particular, we derive a lower and an upper bound for the rotational probability through ChaCha quarter round, we show how to extend the bound to a full round and then to the full permutation. The obtained bounds show that the probability to find what we call a parallel rotational collision is, for example, less than $ 2^{-505} $ for 17 rounds of ChaCha permutation, while for a random permutation of the same input size, this probability is $ 2^{-511} $. We remark that our distinguisher is not an attack against the ChaCha20 stream cipher, but rather a theoretical analysis of its internal permutation from the point of view of rotational cryptanalysis. Whenever possible, our claims are supported by experiments.
Citation: |
Table 1. Experimental results on a toy version of ChaCha quarter round
#collisions | Lower Bound | Upper Bound | |||
1 | 635 | 0.00968 | |||
2 | 446 | 0.00680 | |||
#collisions | Lower Bound | Upper Bound | |||
1 | 6981 | 0.00666 | |||
2 | 4044 | 0.00386 | |||
#collisions | Lower Bound | Upper Bound | |||
1 | 91677 | 0.00546 | |||
2 | 46030 | 0.00274 | |||
3 | 38561 | 0.00230 |
Table 2.
Bounds propagation through ChaCha rounds with
Round | Lower Bound |
Upper Bound |
Round | Lower Bound |
Upper Bound |
|
1 | 11 | |||||
2 | 12 | |||||
3 | 13 | |||||
4 | 14 | |||||
5 | 15 | |||||
6 | 16 | |||||
7 | 17 | |||||
8 | 18 | |||||
9 | 19 | |||||
10 | 20 |
[1] |
J.-P. Aumasson, S. Neves, Z. Wilcox-O'Hearn and C. Winnerlein, BLAKE2: Simpler, smaller, fast as MD5, International Conference on Applied Cryptography and Network Security, 7954 (2013), 119-135.
doi: 10.1007/978-3-642-38980-1_8.![]() ![]() |
[2] |
D. Bernstein, Salsa20 Security, Technical report, eSTREAM Project, 2005, Available at: http://cr.yp.to/snuffle/security. pdf.
![]() |
[3] |
D. J. Bernstein, Salsa20 Specification, Technical report, eSTREAM Project, https://www.ecrypt.eu.org/stream/, 2005, Available at: http://www.ecrypt.eu.org/stream/salsa20pf.html.
![]() |
[4] |
D. J. Bernstein, Salsa20 Specification, eSTREAM Project algorithm description, http://www.ecrypt.eu.org/stream/salsa20pf.html.
![]() |
[5] |
D. J. Bernstein, What output size resists collisions in a xor of independent expansions?, ECRYPT Workshop on Hash Functions, (2007), Available at https://cr.yp.to/rumba20/expandxor-20070503.pdf.
![]() |
[6] |
D. J. Bernstein, ChaCha, a variant of Salsa20, Workshop Record of SASC, 8 (2008), 3-5.
![]() |
[7] |
D. J. Bernstein, Response to "On the Salsa20 core function", 2008, Available at: https://cr.yp.to/snuffle/reoncore-20080224.pdf.
![]() |
[8] |
D. J. Bernstein, The salsa20 family of stream ciphers, New Stream Cipher Designs, 4986 (2008), 84-97.
doi: 10.1007/978-3-540-68351-3_8.![]() ![]() |
[9] |
D. J. Bernstein, The Salsa20 core, Available at: http://cr.yp.to/salsa20.html.
![]() |
[10] |
D. J. Bernstein, D. Hopwood, A. Hülsing, T. Lange, R. Niederhagen, L. Papachristodoulou, M. Schneider, P. Schwabe and Z. Wilcox-O'Hearn, SPHINCS: Practical stateless hash-based signatures, Advances in cryptology–EUROCRYPT, 9056 (2015), 368-397.
doi: 10.1007/978-3-662-46800-5_15.![]() ![]() ![]() |
[11] |
C. A. Charalambides, Enumerative Combinatorics, CRC Press Series on Discrete Mathematics and its Applications. Chapman & Hall/CRC, Boca Raton, FL, 2002.
![]() ![]() |
[12] |
N. T. Courtois and J.-J. Quisquater, Can a differential attack work for an arbitrarily large number of rounds?, Information Security and Cryptology–ICISC, 12593 (2020), 157-181.
doi: 10.1007/978-3-030-68890-5_9.![]() ![]() ![]() |
[13] |
M. Daum, Cryptanalysis of Hash Functions of the MD4-Family, PhD thesis, Ruhr University Bochum, 2005, http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.88.7847&rep=rep1&type=pdf.
![]() |
[14] |
J. C. Hernandez-Castro, J. M. Tapiador and J.-J. Quisquater, On the salsa20 core function, International Workshop on Fast Software Encryption, (2008), 462–469.
![]() |
[15] |
D. Khovratovich, I. Nikolić, J. Pieprzyk, P. Sokolowski and R. Steinfeld, Rotational cryptanalysis of ARX revisited, Fast Software Encryption, 9054 (2015), 519-536.
doi: 10.1007/978-3-662-48116-5_25.![]() ![]() |
[16] |
X. Lai, J. L. Massey and S. Murphy, Markov ciphers and differential cryptanalysis, Advances in Cryptology–EUROCRYPT'91, 547 (1991), 17-38.
doi: 10.1007/3-540-46416-6_2.![]() ![]() ![]() |
[17] |
Y. Nir and A. Langley, Chacha20 and poly1305 for IETF protocols, RFC, 8439 (2018), 1-46.
doi: 10.17487/RFC8439.![]() ![]() |
[18] |
Various, Google groups: Sci.crypt/re-rolled salsa20 function, 2005, Newsgroup on September 26th (2005), Available at: https://groups.google.com/forum/#!msg/sci.crypt/AkQnSoO40BA/o4eG96rjkgYJ.
![]() |
The ChaCha quarter round