ChaCha, a variant of Salsa20
Daniel J. Bernstein
?
Department of Mathematics, Statistics, and Computer Science (M/C 249)
The University of Illinois at Chicago
Chicago, IL 60607–7045
snuffle6@box.cr.yp.to
Abstract. ChaCha8 is a 256-bit stream cipher based on the 8-round
cipher Salsa20/8. The changes from Salsa20/8 to ChaCha8 are designed
to improve diffusion p er round, conjecturally increasing resistance to
cryptanalysis, while preserving—and often improving—time per round.
ChaCha12 and ChaCha20 are analogous modifications of the 12-round
and 20-round ciphers Salsa20/12 and Salsa20/20. This paper presents
the ChaCha family and explains the differences between Salsa20 and
ChaCha.
1 Introduction
1.1 Background
The Salsa20/20 stream cipher expands a 256-bit key into 2
64
randomly accessible
streams, each containing 2
64
randomly accessible 64-byte blocks. Salsa20/20 is a
more conservative design than AES, and the community seems to have rapidly
gained confidence in the security of the cipher. See [2, Section 5] for a summary
of third-party cryptanalysis.
Salsa20/20 is consistently faster than AES. I recommend Salsa20/20 for en-
cryption in typical cryptographic applications. The Salsa20 family also includes
reduced-round ciphers—the 12-round cipher Salsa20/12 and the 8-round cipher
Salsa20/8—aimed at users who value speed more highly than confidence. See [2,
Table 1.1] for a summary of the speeds of Salsa20/8, Salsa20/12, and Salsa20/20.
1.2 Contributions
This paper introduces the ChaCha family of stream ciphers, a variant of the
Salsa20 family. ChaCha follows the same basic design principles as Salsa20, but I
changed some of the details, most importantly to increase the amount of diffusion
per round. I speculate that the minimum number of secure rounds for ChaCha is
smaller (and not larger!) than the minimum number of secure rounds for Salsa20.
?
Permanent ID of this document: 4027b5256e17b9796842e6d0f68b0b5e. Date of this
document: 2008.01.28. Thi s work was supported by the National Science Foundation
under grant ITR–0716498.