pub fn ntlm_mech_list_mic(
session_key: &[u8; 16],
server_role: bool,
key_exch: bool,
seq: u32,
message: &[u8],
) -> [u8; 16]Expand description
NTLMSSP MIC for the SPNEGO mechListMIC ([RFC 4178] / [MS-NLMP] §3.4.6), matching samba’s calc_ntlmv2_key + ntlmssp_make_packet_signature:
SignKey = MD5(SessionKey || SIGN_MAGIC_NUL) digest = HMAC-MD5(SignKey, SeqNum_le || message)[0..8] Checksum= RC4(SendSealKey, digest) // only when KEY_EXCH negotiated MAC = 01000000 || Checksum || SeqNum_le