Expand description
Blowfish single-block encryption with 4- to 56-byte keys and 8-byte blocks.
§Backend selection
With the rustcrypto feature, BlowfishEngine delegates to
BlowfishRustCryptoEngine, backed by the RustCrypto blowfish crate.
Without it, the engine delegates to BlowfishTableEngine. Both
implementations are also available for direct use when enabled.
§Security
Variable time: key expansion and processing index key-dependent S-boxes with secret data in both backends. Use only where cache-timing leakage is outside the threat model; no constant-time alternative is provided. Stored P-arrays and S-boxes are wiped on drop, but caller buffers and every register or stack copy are not. No mode, padding or authentication is provided.
Structs§
- Blowfish
Engine - Blowfish with a 4- to 56-byte key and an 8-byte block, on the backend the
build selects:
BlowfishRustCryptoEnginewith therustcryptofeature, otherwiseBlowfishTableEngine. - Blowfish
Table Engine - Blowfish with a 4- to 56-byte key and an 8-byte block, using this crate’s own key schedule and S-box tables.
Constants§
- ALGO_
NAME - Algorithm name written by the engine.
- BLOCK_
BYTES - Blowfish block length in bytes.
- MAX_
KEY_ BYTES - Maximum Blowfish key length in bytes.
- MIN_
KEY_ BYTES - Minimum Blowfish key length in bytes.