package
Version:
v1.0.0
Opens a new window with list of versions in this module.
Published: Jul 10, 2019
License: BSD-3-Clause
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 3
Opens a new window with list of known importers.
Documentation
¶
Package fp448 provides prime field arithmetic over GF(2^448-2^224-1).
- Constants
-
func Add(z, x, y *Elt)
-
func AddSub(x, y *Elt)
-
func Cmov(x, y *Elt, n uint)
-
func Cswap(x, y *Elt, n uint)
-
func Inv(z, x *Elt)
-
func IsZero(x *Elt) bool
-
func Modp(z *Elt)
-
func Mul(z, x, y *Elt)
-
func Neg(z, x *Elt)
-
func SetOne(x *Elt)
-
func Sqr(z, x *Elt)
-
func Sub(z, x, y *Elt)
-
func ToBytes(b []byte, x *Elt)
-
type Elt
Size in bytes of an element.
Add calculates z = x+y mod p.
AddSub calculates (x,y) = (x+y mod p, x-y mod p).
Cmov assigns y to x if n is 1.
Cswap interchages x and y if n is 1.
Inv calculates z = 1/x mod p.
IsZero returns true if x is equal to 0.
Modp ensures that z is between [0,p-1].
Mul calculates z = x*y mod p.
Sqr calculates z = x^2 mod p.
Sub calculates z = x-y mod p
ToBytes returns the little-endian byte representation of x.
Elt is a prime field element.
P returns the prime modulus 2^448-2^224-1.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.