Skip to main content

Module common

Module common 

Source
Expand description

Common utilities shared across HCTR2/HCTR3 cipher implementations.

Enums§

Direction
Direction of cipher operation.
Error
Unified error type for all HCTR cipher operations.

Constants§

BLOCK_LENGTH
AES block length in bytes.

Functions§

absorb
Absorb message into Polyval with HCTR2/HCTR3-style padding.
elk
ELK mode: Encrypted LFSR Keystream.
lfsr_next_128
LFSR next state function for 128-bit state.
lfsr_next_256
LFSR next state function for 256-bit state.
xctr
XCTR mode: counter-based stream cipher using AES.
xor_block
XOR two 16-byte blocks, storing result in the first argument.
xor_blocks
XOR two 16-byte blocks, returning a new block.
xor_blocks_3
XOR three 16-byte blocks, returning a new block.