Type Definition chacha20::XChaCha20[][src]

pub type XChaCha20 = XChaCha<R20>;
This is supported on crate feature xchacha only.
Expand description

XChaCha20 is a ChaCha20 variant with an extended 192-bit (24-byte) nonce.

The construction is an adaptation of the same techniques used by XSalsa20 as described in the paper “Extending the Salsa20 Nonce”, applied to the 96-bit nonce variant of ChaCha20, and derive a separate subkey/nonce for each extended nonce:

https://cr.yp.to/snuffle/xsalsa-20081128.pdf

No authoritative specification exists for XChaCha20, however the construction has “rough consensus and running code” in the form of several interoperable libraries and protocols (e.g. libsodium, WireGuard) and is documented in an (expired) IETF draft:

https://tools.ietf.org/html/draft-arciszewski-xchacha-03

The xchacha Cargo feature must be enabled in order to use this (which it is by default).