Skip to main content

Module aes256_cbc_hmac_sha256_ae

Module aes256_cbc_hmac_sha256_ae 

Source
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ยง

Aes256CbcHmacSha256 ๐Ÿ”’
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ยง

HmacSha256 ๐Ÿ”’