Skip to main content

lib_q_prf/
error.rs

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