Documentation
¶
Index ¶
- Constants
- Variables
- type Fp
- func (z *Fp) Add(x, y *Fp)
- func (z *Fp) AddAssign(x *Fp)
- func (z *Fp) GetUint64() (uint64, error)
- func (z *Fp) Inv(x *Fp)
- func (z *Fp) InvTwoN(n uint)
- func (z *Fp) InvUint64(x uint64)
- func (z *Fp) IsEqual(x *Fp) bool
- func (z *Fp) IsOne() bool
- func (z *Fp) IsZero() bool
- func (z *Fp) Marshal(b *cryptobyte.Builder) error
- func (z *Fp) MarshalBinary() ([]byte, error)
- func (z *Fp) Mul(x, y *Fp)
- func (z *Fp) MulAssign(x *Fp)
- func (z Fp) Order() []byte
- func (z Fp) OrderRootUnity() uint
- func (z *Fp) Random(r io.Reader) error
- func (z *Fp) RandomSHA3(s *sha3.State) error
- func (z *Fp) SetOne()
- func (z *Fp) SetRootOfUnityTwoN(n uint)
- func (z *Fp) SetUint64(n uint64) error
- func (z Fp) Size() uint
- func (z *Fp) Sqr(x *Fp)
- func (z Fp) String() string
- func (z *Fp) Sub(x, y *Fp)
- func (z *Fp) SubAssign(x *Fp)
- func (z *Fp) Unmarshal(s *cryptobyte.String) bool
- func (z *Fp) UnmarshalBinary(b []byte) error
- type Poly
- type Vec
- func (v Vec) AddAssign(x Vec)
- func (v Vec) DotProduct(x Vec) (out Fp)
- func (v Vec) InvNTT(values Vec, n uint)
- func (v Vec) JoinBits() Fp
- func (v Vec) Marshal(b *cryptobyte.Builder) error
- func (v Vec) MarshalBinary() ([]byte, error)
- func (v Vec) NTT(values Vec, n uint)
- func (v Vec) Random(rnd io.Reader) error
- func (v Vec) RandomSHA3(s *sha3.State) error
- func (v Vec) RandomSHA3Bytes(out []byte, s *sha3.State) error
- func (v Vec) ScalarMul(x *Fp)
- func (v Vec) Size() uint
- func (v Vec) SplitBits(n uint64) error
- func (v Vec) SubAssign(x Vec)
- func (v Vec) Unmarshal(s *cryptobyte.String) bool
- func (v Vec) UnmarshalBinary(b []byte) error
Constants ¶
View Source
const Size = 16
Size is the length in bytes of an Fp128 element.
Variables ¶
View Source
var ( ErrMatchLen = errors.New("inputs mismatched length") ErrFieldEltDecode = errors.New("incorrect field element value") ErrNumberTooLarge = errors.New("number of bits is not enough to represent the number") ErrMaxNumTries = errors.New("random rejection sampling reached maximum number of tries") ErrRootsOfUnity = errors.New("Fp has no roots of unity of order larger than 2^66") )
Functions ¶
This section is empty.
Types ¶
type Fp ¶
type Fp [2]uint64
Fp represents a prime field element as a positive integer less than Order.
func (*Fp) MarshalBinary ¶
func (Fp) OrderRootUnity ¶
func (*Fp) SetRootOfUnityTwoN ¶
func (*Fp) UnmarshalBinary ¶
type Vec ¶
type Vec []Fp
func (Vec) DotProduct ¶
func (Vec) MarshalBinary ¶
func (Vec) UnmarshalBinary ¶
Click to show internal directories.
Click to hide internal directories.