Expand description
AES-128-CBC encryption / decryption of SCS_17/SCS_18 DATA payloads.
§Spec: Annex D.5
- DATA is always 0x80-padded (per
super::pad::pad_data). - The CBC ICV is the one’s complement of the last MAC received from the other device.
- Key is
S-ENC.
Functions§
- complement_
icv - Annex D.5 ICV: one’s complement of the last MAC from the other side.
- decrypt_
data - Decrypt a DATA payload and strip the 0x80 padding.
- encrypt_
data - Encrypt a DATA payload with AES-128-CBC, applying the always-0x80 padding
rule.
s_encis the session encryption key,ivis the complemented MAC of the last frame received from the other side.