XSalsa20
XSalsa20 is a stream cipher that builds upon the Salsa20 cipher. Its primary innovation lies in its ability to handle nonces of arbitrary length, typically 192 bits, while still maintaining the security properties of Salsa20. This is achieved by using a key-derivation function, XoR, to generate a new 256-bit key from the original 256-bit key and the longer nonce. This derived key is then used with the standard Salsa20 algorithm.
The design of XSalsa20 addresses a common challenge in stream cipher usage: the requirement for unique nonces
The XoR function within XSalsa20 consists of two rounds of the Salsa20 core function, using the original