Discover Packages
github.com/fanym919/circl
math
fp448
package
Version:
v0.0.0-...-8e3605f
Opens a new window with list of versions in this module.
Published: Feb 9, 2022
License: BSD-3-Clause
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Jump to ...
Documentation
Overview
Index
Constants
Variables
Functions
Add(z, x, y)
AddSub(x, y)
Cmov(x, y, n)
Cswap(x, y, n)
Inv(z, x)
InvSqrt(z, x, y)
IsOne(x)
IsZero(x)
Modp(z)
Mul(z, x, y)
Neg(z, x)
SetOne(x)
Sqr(z, x)
Sub(z, x, y)
ToBytes(b, x)
Types
Source Files
Documentation
Documentation
¶
Rendered for
linux/amd64
windows/amd64
darwin/amd64
js/wasm
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 InvSqrt(z, x, y *Elt) (isQR bool)
func IsOne(x *Elt) bool
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) error
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 interchanges x and y if n is 1.
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).
IsOne returns true if x is equal to 1.
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 stores in b the little-endian byte representation of x.
Elt is a prime field element.
One returns the 1 element.
P returns the prime modulus 2^448-2^224-1.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.