Documentation
¶
Overview ¶
Package ff contains field arithmetic operations
Package ff contains field arithmetic operations ¶
Package ff contains field arithmetic operations ¶
Package ff contains field arithmetic operations ¶
Package ff contains field arithmetic operations ¶
Package ff contains field arithmetic operations ¶
Package ff contains field arithmetic operations
Index ¶
Constants ¶
View Source
const ( // 21888242871839275222246405745257275088696311157297823662689037894645226208583 FF_BN256_FQ = iota //21888242871839275222246405745257275088548364400416034343698204186575808495617 FF_BN256_FP )
Type of FF defined
View Source
const (
DEFAULT_PRIME = FF_BN256_FP
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Element ¶
type Element interface {
GetUint64() []uint64
SetUint64(v uint64) Element
SetFromArray(x []uint64) Element
Set(x Element) Element
SetZero() Element
SetOne() Element
Neg(x Element) Element
Div(x, y Element) Element
Equal(x Element) bool
IsZero() bool
Inverse(x Element) Element
SetRandom() Element
One() Element
Add(x, y Element) Element
AddAssign(x Element) Element
Double(x Element) Element
Sub(x, y Element) Element
SubAssign(x Element) Element
Exp(x Element, exponent ...uint64) Element
FromMont() Element
ToMont() Element
ToRegular() Element
String() string
ToByte() []byte
FromByte(x []byte) Element
ToBigInt(res *big.Int) *big.Int
ToBigIntRegular(res *big.Int) *big.Int
SetBigInt(v *big.Int) Element
SetString(s string) Element
Legendre() int
Sqrt(x Element) Element
Mul(x, y Element) Element
MulAssign(x Element) Element
Square(x Element) Element
}
interface to describe Finite Field
func FromInterface ¶
FromInterface converts i1 from uint64, int, string, or element_bn256p, big.Int into element_ panic if provided type is not supported
func NewElement ¶
Create new Finite Field Element depending on type
Click to show internal directories.
Click to hide internal directories.