Skip to main content

should_use_nonpq_session

Function should_use_nonpq_session 

Source
pub fn should_use_nonpq_session(
    require_pq_ratio: f64,
    session_key: &[u8],
) -> bool
Expand description

A consistent way to determine, given a session that is not PQ and a ratio of sessions which if not PQ should be archived, which sessions to use (returning true) and which to archive (returning false). The session key’s first 4 bytes are used as a uniformly random big-endian integer as part of this calculation, which works well for a session’s alice_base_key().