Skip to main content

kdf_counter_mode_hmac_sha256

Function kdf_counter_mode_hmac_sha256 

Source
pub fn kdf_counter_mode_hmac_sha256(
    key: &[u8],
    label: &[u8],
    context: &[u8],
    result_len: usize,
) -> Vec<u8> 
Expand description

SP800-108 counter-mode KDF with HMAC-SHA256 PRF ([MS-SMB2] §3.1.4.1): K(i) = HMAC-SHA256(key, [i]_32BE || label || 0x00 || context || [L]_32BE)

This is protocol plumbing on top of the backend primitive rather than a primitive itself, so it is shared by both backends unchanged.