Class XChaCha20Engine

All Implemented Interfaces:
SkippingCipher, SkippingStreamCipher, StreamCipher

public class XChaCha20Engine extends ChaCha7539Engine
Implementation of the XChaCha20 stream cipher (extended-nonce ChaCha20) as described in draft-irtf-cfrg-xchacha-03.

XChaCha20 takes a 256 bit key and a 192 bit nonce. The first 128 bits of the nonce are used together with the key in HChaCha20 to derive a 256 bit subkey; that subkey, together with the remaining 64 bits of the nonce (prefixed by four zero bytes to form a 96 bit IETF nonce), then drives a standard ChaCha20-IETF stream as defined by RFC 7539.