Module secured_cipher::algorithm::chacha20
source · Expand description
Module for the ChaCha20 stream cipher algorithm.
Structs
- The
ChaCha20struct represents the ChaCha20 stream cipher.
Constants
- Size of the ChaCha20 nonce in bytes. The nonce is a 64-bit (8 bytes) value used to make each block unique.
- Constants for the ChaCha20 algorithm. These four 32-bit words represent the ASCII encoding of “expand 32-byte k”, used in the state initialization of the ChaCha20 block.
- Number of 32-bit words in the ChaCha state. The ChaCha20 state consists of 16 words, each of which is 32 bits long.
Functions
- Runs the ChaCha20 permutation on the provided state.
- XORs two 512-bit state arrays. This function modifies the first array in place.
Type Aliases
- The array of words representing a ChaCha20 block.