lib-q-prf 0.0.5

Legendre and Gold (power-residue) PRFs over large prime fields (Fiat-Shamir transcript building blocks)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! Errors for PRF evaluation and parameter parsing.

/// Failure modes for Legendre / Gold PRF operations.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum PrfError {
    /// `(x + K) ≡ 0 (mod p)` so the Legendre symbol is zero and the degree-1 PRF is undefined at this point.
    ZeroInput,
    /// Key material is invalid (e.g. zero or not reduced modulo `p`).
    InvalidKey,
    /// Parameter set is malformed (e.g. modulus not odd).
    InvalidParam,
}