Expand description
SM4 single-block encryption with 128-bit keys and blocks.
Variable time: key expansion and block processing use secret-dependent S-box lookups. Use only where cache-timing leakage is outside the threat model; this crate provides no constant-time alternative.
Stored round keys are wiped on drop, but caller buffers and every register or stack copy are not. No mode, padding or authentication is provided.
Structs§
- Sm4Engine
- SM4 with a 16-byte key and a 16-byte block.
Constants§
- ALGO_
NAME - Algorithm name written by the engine.
- BLOCK_
BYTES - SM4 block length in bytes.
- KEY_
BYTES - SM4 key length in bytes.