2.7 ChaCha20 Algorithm

ChaCha20 is stream Cipher. It is a refinement of the Salsa20 algorithm. ChaCha20 is ARX (Addition/Rotation/XOR) based hash function, keyed, running in counter mode. It embodies the idea that hash function can be used to encrypt data. ChaCha20 initial version has 64 bit of nonce and 64 bit of block counter but Implementation reference published in RFC 8439, has changed the Nonce to 96-bit and Block counter to 32-bit size. Here the API uses 96-bit of Nonce and 32-bit of block Counter.

It is faster than AES in software-only implementations, making it around three times as fast on platforms that lack specialized AES hardware.