Skip to main content

field_pow

Function field_pow 

Source
pub fn field_pow<const LIMBS: usize>(
    base: &FieldElement<LIMBS>,
    exp: &[u64; LIMBS],
    p: &[u64; LIMBS],
) -> FieldElement<LIMBS>
Expand description

Modular exponentiation: base^exp mod p. Constant-time: always does multiply + square for each bit (left-to-right).