Skip to main content

Module rabbit

Module rabbit 

Source
Expand description

Rabbit stream cipher — RFC 4503.

Rabbit is a software-oriented 128-bit stream cipher from the eSTREAM era. Its state consists of eight 32-bit state words, eight 32-bit counters, and one carry bit. Each round advances the counters, runs the nonlinear g-function on each state word plus counter, and then mixes the eight g outputs into the next state.

The implementation follows RFC 4503 directly:

  • 128-bit key
  • optional 64-bit IV setup
  • 16-byte keystream blocks

Rabbit is naturally byte-oriented like the other stream ciphers in this crate: apply_keystream XORs the keystream into caller-owned buffers.

Structs§

Rabbit
Rabbit stream cipher.