Expand description
ยงLegacy AES-256-CBC-HMAC-SHA256 operations
Aes256CbcHmacSha256 is the construct used in type 2 EncStrings. It is authenticated encryption (AE) via Encrypt-then-MAC, but has no support for associated data (it is not AEAD).
Structsยง
- Aes256
CbcHmac ๐Sha256 - The legacy AES-256-CBC-HMAC-SHA256 Encrypt-then-MAC cipher. The 64-byte composite key is the AES-256-CBC encryption sub-key (first 32 bytes) followed by the HMAC-SHA256 authentication sub-key (last 32 bytes).
Constantsยง
- ENC_
KEY_ ๐SIZE - IV_SIZE ๐
- KEY_
SIZE ๐ - MAC_
KEY_ ๐SIZE - MAC_
SIZE ๐
Functionsยง
- calculate_
mac ๐ - Generate a MAC using HMAC-SHA256 over the IV and ciphertext, without length prefixes or associated data.
- split_
to_ ๐subkeys - Splits the 64-byte composite key into zero-copy views over its encryption and MAC halves.
Type Aliasesยง
- Hmac
Sha256 ๐