Versions in this module Expand all Collapse all v1 v1.11.0 Oct 31, 2023 Changes in this version + const FieldBytes + const FieldLimbs + const MaxDstLen + const WideFieldBytes + var OversizeDstSalt = []byte("H2C-OVERSIZE-DST-") + func ExpandMsgXmd(h *EllipticPointHasher, msg, domain []byte, outLen int) []byte + func ExpandMsgXof(h *EllipticPointHasher, msg, domain []byte, outLen int) []byte + func Pow(out, base, exp *[FieldLimbs]uint64, params *FieldParams, ...) + func Pow2k(out, arg *[FieldLimbs]uint64, k int, arithmetic FieldArithmetic) + type EllipticPoint struct + Arithmetic EllipticPointArithmetic + Params *EllipticPointParams + X *Field + Y *Field + Z *Field + func (p *EllipticPoint) Add(lhs, rhs *EllipticPoint) *EllipticPoint + func (p *EllipticPoint) BigInt() (x, y *big.Int) + func (p *EllipticPoint) Double(point *EllipticPoint) *EllipticPoint + func (p *EllipticPoint) Equal(rhs *EllipticPoint) int + func (p *EllipticPoint) Generator() *EllipticPoint + func (p *EllipticPoint) GetX() *Field + func (p *EllipticPoint) GetY() *Field + func (p *EllipticPoint) Hash(bytes []byte, hasher *EllipticPointHasher) (*EllipticPoint, error) + func (p *EllipticPoint) Identity() *EllipticPoint + func (p *EllipticPoint) IsIdentity() bool + func (p *EllipticPoint) IsOnCurve() bool + func (p *EllipticPoint) Mul(point *EllipticPoint, scalar *Field) *EllipticPoint + func (p *EllipticPoint) Neg(point *EllipticPoint) *EllipticPoint + func (p *EllipticPoint) Random(reader io.Reader) (*EllipticPoint, error) + func (p *EllipticPoint) Set(clone *EllipticPoint) *EllipticPoint + func (p *EllipticPoint) SetBigInt(x, y *big.Int) (*EllipticPoint, error) + func (p *EllipticPoint) Sub(lhs, rhs *EllipticPoint) *EllipticPoint + func (p *EllipticPoint) SumOfProducts(points []*EllipticPoint, scalars []*Field) (*EllipticPoint, error) + func (p *EllipticPoint) ToAffine(clone *EllipticPoint) *EllipticPoint + type EllipticPointArithmetic interface + Add func(out, arg1, arg2 *EllipticPoint) + Double func(out, arg *EllipticPoint) + Hash func(out *EllipticPoint, hasher *EllipticPointHasher, bytes, dst []byte) error + IsOnCurve func(arg *EllipticPoint) bool + RhsEq func(out, x *Field) + ToAffine func(out, arg *EllipticPoint) + type EllipticPointHashName uint + const BLAKE2B + const SHA256 + const SHA3_256 + const SHA3_384 + const SHA3_512 + const SHA512 + const SHAKE128 + const SHAKE256 + func (n EllipticPointHashName) String() string + type EllipticPointHashType uint + const XMD + const XOF + func (t EllipticPointHashType) String() string + type EllipticPointHasher struct + func EllipticPointHasherBlake2b() *EllipticPointHasher + func EllipticPointHasherSha256() *EllipticPointHasher + func EllipticPointHasherSha3256() *EllipticPointHasher + func EllipticPointHasherSha3384() *EllipticPointHasher + func EllipticPointHasherSha3512() *EllipticPointHasher + func EllipticPointHasherSha512() *EllipticPointHasher + func EllipticPointHasherShake128() *EllipticPointHasher + func EllipticPointHasherShake256() *EllipticPointHasher + func (e *EllipticPointHasher) Name() string + func (e *EllipticPointHasher) Type() EllipticPointHashType + func (e *EllipticPointHasher) Xmd() hash.Hash + func (e *EllipticPointHasher) Xof() sha3.ShakeHash + type EllipticPointParams struct + A *Field + B *Field + BitSize int + Gx *Field + Gy *Field + Name string + type Field struct + Arithmetic FieldArithmetic + Params *FieldParams + Value [FieldLimbs]uint64 + func (f *Field) Add(lhs, rhs *Field) *Field + func (f *Field) BigInt() *big.Int + func (f *Field) Bytes() [FieldBytes]byte + func (f *Field) CMove(lhs, rhs *Field, choice int) *Field + func (f *Field) Cmp(rhs *Field) int + func (f *Field) Double(a *Field) *Field + func (f *Field) Equal(rhs *Field) int + func (f *Field) Exp(base, exp *Field) *Field + func (f *Field) Invert(a *Field) (*Field, bool) + func (f *Field) IsNonZero() int + func (f *Field) IsOne() int + func (f *Field) IsZero() int + func (f *Field) Mul(lhs, rhs *Field) *Field + func (f *Field) Neg(input *Field) *Field + func (f *Field) Raw() [FieldLimbs]uint64 + func (f *Field) Set(rhs *Field) *Field + func (f *Field) SetBigInt(bi *big.Int) *Field + func (f *Field) SetBytes(input *[FieldBytes]byte) (*Field, error) + func (f *Field) SetBytesWide(input *[WideFieldBytes]byte) *Field + func (f *Field) SetLimbs(input *[FieldLimbs]uint64) *Field + func (f *Field) SetOne() *Field + func (f *Field) SetRaw(input *[FieldLimbs]uint64) *Field + func (f *Field) SetUint64(rhs uint64) *Field + func (f *Field) SetZero() *Field + func (f *Field) Sqrt(a *Field) (*Field, bool) + func (f *Field) Square(a *Field) *Field + func (f *Field) Sub(lhs, rhs *Field) *Field + type FieldArithmetic interface + Add func(out, arg1, arg2 *[FieldLimbs]uint64) + FromBytes func(out *[FieldLimbs]uint64, arg *[FieldBytes]byte) + FromMontgomery func(out, arg *[FieldLimbs]uint64) + Invert func(wasInverted *int, out, arg *[FieldLimbs]uint64) + Mul func(out, arg1, arg2 *[FieldLimbs]uint64) + Neg func(out, arg *[FieldLimbs]uint64) + Selectznz func(out, arg1, arg2 *[FieldLimbs]uint64, choice int) + Sqrt func(wasSquare *int, out, arg *[FieldLimbs]uint64) + Square func(out, arg *[FieldLimbs]uint64) + Sub func(out, arg1, arg2 *[FieldLimbs]uint64) + ToBytes func(out *[FieldBytes]byte, arg *[FieldLimbs]uint64) + ToMontgomery func(out, arg *[FieldLimbs]uint64) + type FieldParams struct + BiModulus *big.Int + Modulus [FieldLimbs]uint64 + R [FieldLimbs]uint64 + R2 [FieldLimbs]uint64 + R3 [FieldLimbs]uint64 + type IsogenyParams struct + XDen [][FieldLimbs]uint64 + XNum [][FieldLimbs]uint64 + YDen [][FieldLimbs]uint64 + YNum [][FieldLimbs]uint64 + func (p *IsogenyParams) Map(xIn, yIn *Field) (x, y *Field) + type SswuParams struct + A [FieldLimbs]uint64 + B [FieldLimbs]uint64 + C1 [FieldLimbs]uint64 + C2 [FieldLimbs]uint64 + Z [FieldLimbs]uint64 + func (p *SswuParams) Osswu3mod4(u *Field) (x, y *Field)