Skip to main content

Module modes

Module modes 

Source
Expand description

NIST SP 800-38A confidentiality modes.

These are unauthenticated. The ontology marks them requires_mac: true and an agent asking for “encryption” is steered to an AEAD instead — see ic_ontology::select. They are exposed because protocol implementations (TLS record layers, KDF counter modes, disk formats) genuinely need them.

Functions§

cbc_decrypt
CBC decryption over a block-aligned ciphertext.
cbc_encrypt
CBC encryption over a plaintext that is already a whole number of blocks.
ctr_xor
Counter mode: a stream cipher built from a block cipher.
increment_be
Increment a big-endian counter block in place, with wraparound.
increment_be32
Increment only the trailing 32 bits, as AES-GCM specifies.
pkcs7_pad
Append PKCS#7 padding, returning the new length.
pkcs7_unpad
Strip PKCS#7 padding in constant time, returning the plaintext length.