Skip to main content

derive_shared_key

Function derive_shared_key 

Source
pub fn derive_shared_key(
    local_priv_b64: &str,
    remote_pub_b64: &str,
) -> Result<[u8; 32], String>
Expand description

Derive a 32-byte AES key from X25519 ECDH shared secret via HKDF-SHA256. local_priv_b64 and remote_pub_b64 are base64url-encoded.