Skip to main content

Crate tc_twofish

Crate tc_twofish 

Source
Expand description

Twofish single-block encryption with 128-, 192- and 256-bit keys.

Variable time: key-dependent S-box and MDS lookups, and key-setup branches, depend on secret data. Use only where timing leakage is outside the threat model; no constant-time alternative is provided. Stored tables and subkeys are wiped on drop, but caller buffers and every register or stack copy are not. No mode, padding or authentication is provided.

Structs§

TwofishEngine
Twofish with a 16-, 24- or 32-byte key and a 16-byte block.

Constants§

ALGO_NAME
Algorithm name written by the engine.
BLOCK_BYTES
Twofish block length in bytes.
KEY_BYTES
Accepted Twofish key lengths in bytes.