Size in bytes of an element.
const Size = 56
func Add(z, x, y *Elt)
Add calculates z = x+y mod p.
func AddSub(x, y *Elt)
AddSub calculates (x,y) = (x+y mod p, x-y mod p).
func Cmov(x, y *Elt, n uint)
Cmov assigns y to x if n is 1.
func Cswap(x, y *Elt, n uint)
Cswap interchanges x and y if n is 1.
func Inv(z, x *Elt)
Inv calculates z = 1/x mod p.
func InvSqrt(z, x, y *Elt) (isQR bool)
InvSqrt calculates z = sqrt(x/y) iff x/y is a quadratic-residue. If so, isQR = true; otherwise, isQR = false, since x/y is a quadratic non-residue, and z = sqrt(-x/y).
func IsOne(x *Elt) bool
IsOne returns true if x is equal to 1.
func IsZero(x *Elt) bool
IsZero returns true if x is equal to 0.
func Modp(z *Elt)
Modp ensures that z is between [0,p-1].
func Mul(z, x, y *Elt)
Mul calculates z = x*y mod p.
func Neg(z, x *Elt)
Neg calculates z = -x.
func SetOne(x *Elt)
SetOne assigns x=1.
func Sqr(z, x *Elt)
Sqr calculates z = x^2 mod p.
func Sub(z, x, y *Elt)
Sub calculates z = x-y mod p.
func ToBytes(b []byte, x *Elt) error
ToBytes stores in b the little-endian byte representation of x.
Elt is a prime field element.
type Elt [Size]byte
func One() (x Elt)
One returns the 1 element.
func P() Elt
P returns the prime modulus 2^448-2^224-1.
func (e Elt) String() string