Documentation
¶
Index ¶
- Constants
- Variables
- func TestBinaryOp[FP impl.FiniteFieldElementPtrLowLevel[FP, F], F any](tb testing.TB, a, b, c *F, op func(c, a, b *F))
- func TestBinaryOpWithOk[FP impl.FiniteFieldElementPtrLowLevel[FP, F], F any](tb testing.TB, a, b, c *F, ok ct.Bool, op func(c, a, b *F) ct.Bool)
- func TestUnaryOp[FP impl.FiniteFieldElementPtrLowLevel[FP, F], F any](tb testing.TB, a, c *F, op func(c, a *F))
- func TestUnaryOpWithOk[FP impl.FiniteFieldElementPtrLowLevel[FP, F], F any](tb testing.TB, a, c *F, ok ct.Bool, op func(c, a *F) ct.Bool)
- type BinaryOpVector
- type BinaryOpVectorWithOk
- type BinaryOpVectors
- type BinaryOpVectorsWithOk
- type FiniteFieldElementJSON
- type TestFp
- func (fp *TestFp) Add(lhs, rhs *TestFp)
- func (fp *TestFp) Bytes() []byte
- func (fp *TestFp) ComponentsBytes() [][]byte
- func (*TestFp) Degree() uint64
- func (fp *TestFp) Div(lhs, rhs *TestFp) (ok ct.Bool)
- func (fp *TestFp) Double(v *TestFp)
- func (fp *TestFp) Equal(rhs *TestFp) ct.Bool
- func (fp *TestFp) Inv(v *TestFp) (ok ct.Bool)
- func (fp *TestFp) IsNonZero() ct.Bool
- func (fp *TestFp) IsOne() ct.Bool
- func (fp *TestFp) IsZero() ct.Bool
- func (fp *TestFp) Limbs() []uint64
- func (fp *TestFp) Mul(lhs, rhs *TestFp)
- func (fp *TestFp) Neg(v *TestFp)
- func (fp *TestFp) Select(choice ct.Choice, z, nz *TestFp)
- func (fp *TestFp) Set(v *TestFp)
- func (fp *TestFp) SetBytes(data []byte) (ok ct.Bool)
- func (fp *TestFp) SetBytesWide(data []byte) (ok ct.Bool)
- func (fp *TestFp) SetLimbs(data []uint64) (ok ct.Bool)
- func (fp *TestFp) SetOne()
- func (fp *TestFp) SetRandom(prng io.Reader) (ok ct.Bool)
- func (fp *TestFp) SetUint64(u uint64)
- func (fp *TestFp) SetUniformBytes(componentsData ...[]byte) (ok ct.Bool)
- func (fp *TestFp) SetZero()
- func (fp *TestFp) Sqrt(v *TestFp) (ok ct.Bool)
- func (fp *TestFp) Square(v *TestFp)
- func (fp *TestFp) Sub(lhs, rhs *TestFp)
- type UnaryOpVector
- type UnaryOpVectorWithOk
- type UnaryOpVectors
- type UnaryOpVectorsWithOk
Constants ¶
View Source
const TestFpModulus = 0x429d16a1
Variables ¶
View Source
var ( TestFpE = uint64(bits.TrailingZeros64(uint64(TestFpModulus) - 1)) TestFpProgenitorExp = binary.LittleEndian.AppendUint32(nil, TestFpModulus>>(TestFpE+1)) TestFpRootOfUnity = uint64(0xa93059e) )
Functions ¶
func TestBinaryOp ¶
func TestBinaryOp[FP impl.FiniteFieldElementPtrLowLevel[FP, F], F any](tb testing.TB, a, b, c *F, op func(c, a, b *F))
func TestBinaryOpWithOk ¶
func TestUnaryOp ¶
func TestUnaryOp[FP impl.FiniteFieldElementPtrLowLevel[FP, F], F any](tb testing.TB, a, c *F, op func(c, a *F))
Types ¶
type BinaryOpVector ¶
type BinaryOpVector[FP impl.FiniteFieldElementPtrLowLevel[FP, F], F any] struct { A FiniteFieldElementJSON[FP, F] `json:"a"` B FiniteFieldElementJSON[FP, F] `json:"b"` C FiniteFieldElementJSON[FP, F] `json:"c"` }
type BinaryOpVectorWithOk ¶
type BinaryOpVectorWithOk[FP impl.FiniteFieldElementPtrLowLevel[FP, F], F any] struct { A FiniteFieldElementJSON[FP, F] `json:"a"` B FiniteFieldElementJSON[FP, F] `json:"b"` C FiniteFieldElementJSON[FP, F] `json:"c"` Ok ct.Bool `json:"ok"` }
type BinaryOpVectors ¶
type BinaryOpVectors[FP impl.FiniteFieldElementPtrLowLevel[FP, F], F any] struct { Vectors []BinaryOpVector[FP, F] `json:"vectors"` }
type BinaryOpVectorsWithOk ¶
type BinaryOpVectorsWithOk[FP impl.FiniteFieldElementPtrLowLevel[FP, F], F any] struct { Vectors []BinaryOpVectorWithOk[FP, F] `json:"vectors"` }
type FiniteFieldElementJSON ¶
type FiniteFieldElementJSON[FP impl.FiniteFieldElementPtrLowLevel[FP, F], F any] struct { V F }
func (*FiniteFieldElementJSON[FP, F]) UnmarshalJSON ¶
func (f *FiniteFieldElementJSON[FP, F]) UnmarshalJSON(data []byte) error
type UnaryOpVector ¶
type UnaryOpVector[FP impl.FiniteFieldElementPtrLowLevel[FP, F], F any] struct { A FiniteFieldElementJSON[FP, F] `json:"a"` C FiniteFieldElementJSON[FP, F] `json:"c"` }
type UnaryOpVectorWithOk ¶
type UnaryOpVectorWithOk[FP impl.FiniteFieldElementPtrLowLevel[FP, F], F any] struct { A FiniteFieldElementJSON[FP, F] `json:"a"` C FiniteFieldElementJSON[FP, F] `json:"c"` Ok ct.Bool `json:"ok"` }
type UnaryOpVectors ¶
type UnaryOpVectors[FP impl.FiniteFieldElementPtrLowLevel[FP, F], F any] struct { Vectors []UnaryOpVector[FP, F] `json:"vectors"` }
type UnaryOpVectorsWithOk ¶
type UnaryOpVectorsWithOk[FP impl.FiniteFieldElementPtrLowLevel[FP, F], F any] struct { Vectors []UnaryOpVectorWithOk[FP, F] `json:"vectors"` }
Click to show internal directories.
Click to hide internal directories.