Function tor_hscrypto::ops::hs_mac

source ·
pub fn hs_mac(key: &[u8], msg: &[u8]) -> CtByteArray<HS_MAC_LEN>
Expand description

Compute the lightweight MAC function used in the onion service protocol.

(See rend-spec-v3 section 0.3 MAC.)

This is not a great MAC; KMAC wasn’t defined at the time that the HSv3 design was written. Please don’t use this MAC in new protocols.