Skip to main content

verify_code_proof

Function verify_code_proof 

Source
pub fn verify_code_proof(
    expected_code: &str,
    room_id: &str,
    joiner_x25519_pub: &[u8; 32],
    proof: &[u8; 32],
) -> Result<bool>
Expand description

huddle 2.2 (audit PA-1): constant-time check that proof is the proof for expected_code under this (room_id, joiner_x25519_pub). The owner calls this for each unexpired issued code; the comparison is constant-time so a timing side-channel can’t leak how many proof bytes matched.