Skip to main content

Crate tc_gost28147

Crate tc_gost28147 

Source
Expand description

GOST 28147-89 single-block cipher with caller-selected S-boxes.

Keys are 32 bytes and blocks are 8 bytes. The S-box is a parameter; choosing a different table changes the cipher. Standard tables live in s_box. Gost28147ParamsRef defaults to s_box::DEFAULT; custom parameter types implement Gost28147Params.

The alloc feature adds Gost28147ParamsOwned, which owns its key and S-box and wipes them on drop.

Modules§

s_box
The standardized GOST 28147 S-boxes.

Structs§

Gost28147Engine
GOST 28147-89 with a 32-byte key, an S-box, and an 8-byte block.
Gost28147ParamsOwned
An owned key paired with an owned S-box, both wiped on drop.
Gost28147ParamsRef
A borrowed key paired with the S-box to run it under.

Constants§

ALGO_NAME
Algorithm display name.
BLOCK_BYTES
Block length in bytes.
KEY_BYTES
Required key length in bytes.

Traits§

Gost28147Params
Supplies a GOST 28147 key and the S-box to run it under.