Skip to main content

k_wrap

Function k_wrap 

Source
pub fn k_wrap(label: &[u8], sid: &[u8], isk: &[u8; 64]) -> [u8; 32]
Expand description

Derives K_wrap = SHA-256(label || sid || ISK).

label is PSK_LABEL or NONCE_LABEL, sid the CPace session id exactly as the PAKE used it, and isk the 64-byte CPace intermediate session key. The three are concatenated raw; their lengths are fixed by the protocol, so no delimiter is needed.