Skip to main content

fp2_sqrt

Function fp2_sqrt 

Source
pub fn fp2_sqrt(alpha: &Fp2, p: &BigInt) -> Option<Fp2>
Expand description

√α in 𝔽_{p²} (p ≡ 3 mod 4), or None if α is not a square. From β² = α with β = x + yi: x² − y² = a, 2xy = b, whence x² = (a ± √(a²+b²))/2; a final β² = α check makes it exact.