Host & Client force randomness on each other.
Updated Reserved entry order. Made DataType ID changes easier in future (this MAY NOT happen again once in use).
This commit is contained in:
parent
687e6f9642
commit
f4118f28ba
25 changed files with 1032 additions and 667 deletions
|
|
@ -16,8 +16,10 @@ pub fn hkdf_expand(
|
|||
}
|
||||
|
||||
pub fn hkdf_extract(ikm: &[u8], salt: &[u8]) -> [u8; 32] {
|
||||
// Return the pseudo-random key (PRK) produced by HKDF-Extract directly.
|
||||
// Extract cannot fail, so this avoids the panicking expand step entirely.
|
||||
/*
|
||||
* Return the pseudo-random key (PRK) produced by HKDF-Extract directly.
|
||||
* Extract cannot fail, so this avoids the panicking expand step entirely.
|
||||
*/
|
||||
let (prk, _) = Hkdf::<Sha256>::extract(Some(salt), ikm);
|
||||
let mut out = [0u8; 32];
|
||||
out.copy_from_slice(&prk);
|
||||
|
|
|
|||
Loading…
Reference in a new issue