decaf377::fields::fr::u32::fiat

Function fr_square

Source
pub fn fr_square(
    out1: &mut FrMontgomeryDomainFieldElement,
    arg1: &FrMontgomeryDomainFieldElement,
)
Expand description

The function fr_square squares a field element in the Montgomery domain.

Preconditions: 0 ≤ eval arg1 < m Postconditions: eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) * eval (from_montgomery arg1)) mod m 0 ≤ eval out1 < m