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:
Alex Emmet 2026-06-26 17:08:48 +02:00
commit f4118f28ba
25 changed files with 1032 additions and 667 deletions

View file

@ -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);