Skip to main content

Crate tc_threefish

Crate tc_threefish 

Source
Expand description

Threefish tweakable single-block ciphers.

The 256-, 512- and 1024-bit variants require a block-sized key and an optional 16-byte tweak. An absent tweak is equivalent to sixteen zero bytes.

ThreefishEngine and its aliases use ThreefishPortableEngine, a portable engine after Bouncy Castle. The rustcrypto feature adds ThreefishRustCryptoEngine, backed by RustCrypto’s threefish crate, which ThreefishEngine then uses. The alloc feature adds ThreefishParamsOwned, which owns its key and tweak and wipes them on drop.

Structs§

ThreefishEngine
Threefish with RustCrypto when the rustcrypto feature is enabled, otherwise the portable engine, with a compile-time block width.
ThreefishParamsOwned
An owned key with an optional owned tweak, both wiped on drop.
ThreefishParamsRef
A borrowed key with an optional borrowed tweak.
ThreefishPortableEngine
Portable Threefish after Bouncy Castle, with a compile-time block width.
ThreefishRustCryptoEngine
Threefish backed by RustCrypto’s threefish crate, enabled with rustcrypto.

Constants§

THREEFISH_256_ALGO_NAME
Threefish-256 display name.
THREEFISH_512_ALGO_NAME
Threefish-512 display name.
THREEFISH_1024_ALGO_NAME
Threefish-1024 display name.
TWEAK_BYTES
Fixed tweak length in bytes.

Traits§

ThreefishParams
Supplies a Threefish key and its optional tweak.

Type Aliases§

Threefish256Engine
Threefish-256 engine with a 32-byte block and key.
Threefish512Engine
Threefish-512 engine with a 64-byte block and key.
Threefish1024Engine
Threefish-1024 engine with a 128-byte block and key.