Expand description
DES and Triple-DES (TDEA) implemented from FIPS PUB 46-3.
All tables are transcribed verbatim from the FIPS 46-3 document (https://csrc.nist.gov/files/pubs/fips/46-3/final/docs/fips46-3.pdf). Tests use the official NIST CAVP Known Answer Test vectors downloaded directly from csrc.nist.gov/CSRC/media/Projects/Cryptographic-Algorithm- Validation-Program/documents/des/KAT_TDES.zip.
Des keeps the original fast byte-table and fused SP_TABLE software
path. DesCt is a separate software-only path that replaces the secret
indexed round function with loop-based permutations and packed ANF bitset
evaluation of the DES S-boxes.
Structs§
- Des
- A DES cipher keyed with a single 64-bit key (including parity bits).
- DesCt
- A software-only constant-time DES path.
- Triple
Des - A Triple-DES (TDEA) cipher.
Enums§
- DesKey
Error - Error returned when a DES/TDEA constructor rejects key material.
- TDes
Mode - Keying option for Triple-DES.
Functions§
- is_
weak_ or_ semi_ weak_ key - Return
truewhenkeyis weak or semi-weak under DES. - key_
schedule - Generate the key schedule from a 64-bit key (including parity bits). Returns 16 subkeys, each 48 bits (stored in the low 48 bits of u64).
Type Aliases§
- KeySchedule
- A 16-round DES key schedule: 16 × 48-bit subkeys.