pub fn gost_cmac(
k_em: &[u8],
iv: &[u8],
security_control: u8,
challenge_a: &[u8],
challenge_b: &[u8],
) -> Result<Vec<u8>, &'static str>Expand description
Mechanism 8 (HLS CMAC, GOST): KUZN_CMAC(LSB256(K_EM), iv ‖ SC ‖ challenge_a ‖ challenge_b).
K_EM is the 512-bit global encryption/authentication key; its least
significant 256 bits (the last 32 octets) form the Kuznyechik CMAC key. The
resulting 16-octet MAC becomes the tail of f = SC ‖ IC ‖ MAC
(Р 1323565.1 §7.5.1). iv is system-title ‖ IC.