Versions in this module Expand all Collapse all v0 v0.0.18 May 9, 2024 v0.0.17 May 11, 2023 v0.0.16 Oct 19, 2022 v0.0.15 Sep 16, 2022 v0.0.14 Jul 11, 2022 v0.0.13 Jul 6, 2022 Changes in this version + type CSForKeyTest struct + Sys crypto.Pairing + func (C *CSForKeyTest) Compute(_ string) ([]crypto.FieldElement, error) + func (C *CSForKeyTest) ComputeInC(cPath, info string) (wits []*big.Rat, err error) + func (C *CSForKeyTest) ConstraintsNum() uint64 + func (C *CSForKeyTest) GetPairing() crypto.Pairing + func (C *CSForKeyTest) GetSignalByID(nowid int) (id, reoffset int, prefix string, value crypto.FieldElement) + func (C *CSForKeyTest) InputNum() (privateInput, publicInput int) + func (C *CSForKeyTest) Marshal() []byte + func (C *CSForKeyTest) Next(pos *int) (index int, a, b, c map[int]crypto.FieldElement) + func (C *CSForKeyTest) OutputNum() int + func (C *CSForKeyTest) SignalNum() int + func (C *CSForKeyTest) String() string + func (C *CSForKeyTest) Unmarshal(bytes []byte) ([]byte, error) v0.0.12 Jul 6, 2022 v0.0.11 Jul 5, 2022 Changes in this version + func Assert(f func() bool) + func CloseAssert() + func GetBasicLogger(writer io.Writer) crypto.Logger + func GetBasicLoggerWithLevel(writer io.Writer, level int) crypto.Logger + func GetCurve101(fft bool) crypto.Pairing + func GetCurve257(fft bool) crypto.Pairing + func GetCurve97(fft bool) crypto.Pairing + func GetR1CSForTest(t *testing.T, L, R, O [][]crypto.FieldElement) crypto.R1CSIterator + func OpenAssert() + func PrintArray(in interface{}) string + type BigNumForTest struct + P big.Int + V *big.Int + func NewBigNum(P, V *big.Int) *BigNumForTest + func (b *BigNumForTest) Add(a1, a2 crypto.FieldElement) crypto.FieldElement + func (b *BigNumForTest) Copy() crypto.FieldElement + func (b *BigNumForTest) Div(a1, a2 crypto.FieldElement) crypto.FieldElement + func (b *BigNumForTest) Double(a crypto.FieldElement) crypto.FieldElement + func (b *BigNumForTest) Equal(element crypto.FieldElement) bool + func (b *BigNumForTest) Exp(element crypto.FieldElement, bytes []byte) crypto.FieldElement + func (b *BigNumForTest) From(in *big.Int) crypto.FieldElement + func (b *BigNumForTest) FromRegular(content []byte) crypto.FieldElement + func (b *BigNumForTest) GetModule(b2 *big.Int) + func (b *BigNumForTest) Inv(a crypto.FieldElement) crypto.FieldElement + func (b *BigNumForTest) IsNeg() bool + func (b *BigNumForTest) IsOne() bool + func (b *BigNumForTest) IsZero() bool + func (b *BigNumForTest) MarshalJSON() ([]byte, error) + func (b *BigNumForTest) MontBytes(bytes []byte) []byte + func (b *BigNumForTest) Mul(a1, a2 crypto.FieldElement) crypto.FieldElement + func (b *BigNumForTest) Neg(a crypto.FieldElement) crypto.FieldElement + func (b *BigNumForTest) Regular(bytes []byte) []byte + func (b *BigNumForTest) Set(element crypto.FieldElement) crypto.FieldElement + func (b *BigNumForTest) SetInt64(u int64) crypto.FieldElement + func (b *BigNumForTest) SetOne() crypto.FieldElement + func (b *BigNumForTest) SetRandom(reader io.Reader) crypto.FieldElement + func (b *BigNumForTest) SetUint64(u uint64) crypto.FieldElement + func (b *BigNumForTest) SetZero() crypto.FieldElement + func (b *BigNumForTest) Square(a crypto.FieldElement) crypto.FieldElement + func (b *BigNumForTest) String() string + func (b *BigNumForTest) Sub(a1, a2 crypto.FieldElement) crypto.FieldElement + func (b *BigNumForTest) ToBigInt(rat *big.Int) *big.Int + func (b *BigNumForTest) UnmarshalJSON(in []byte) error + type Curve struct + A *BigNumForTest + B *BigNumForTest + G2x *XBigNumForTest + G2y *XBigNumForTest + Gx *BigNumForTest + Gy *BigNumForTest + Module big.Int + Older big.Int + Square big.Int + SupportFFT bool + func (c *Curve) BatchScalarMultiplicationG1(scalars []*big.Int, ret []crypto.Point) + func (c *Curve) BatchScalarMultiplicationG2(scalars []*big.Int, ret []crypto.Point) + func (c *Curve) GetBase(position crypto.Position) crypto.Point + func (c *Curve) GetModule() *big.Int + func (c *Curve) GetRootOfUnity(u uint64) (crypto.FieldElement, uint64, error) + func (c *Curve) IsOnCurve(point crypto.Point) error + func (c *Curve) Marshal() []byte + func (c *Curve) Name() string + func (c *Curve) NewCurvePoint(scalar *big.Int) *CurvePoint + func (c *Curve) NewPoint(position crypto.Position) crypto.Point + func (c *Curve) NewScalar() crypto.FieldElement + func (c *Curve) NewTwistPoint(scalar *big.Int) *TwistPoint + func (c *Curve) Pair(point []crypto.Point, point2 []crypto.Point) crypto.Point + func (c *Curve) PairCheck(point []crypto.Point, point2 []crypto.Point) bool + func (c *Curve) PutScalar(_ crypto.FieldElement) + func (c *Curve) Unmarshal(data []byte) ([]byte, error) + type CurvePoint struct + C *Curve + Coef crypto.FieldElement + IsInf bool + X *BigNumForTest + Y *BigNumForTest + func (c *CurvePoint) Add(p1 crypto.Point, p2 crypto.Point) crypto.Point + func (c *CurvePoint) DLP() *BigNumForTest + func (c *CurvePoint) Double(p crypto.Point) crypto.Point + func (c *CurvePoint) GetPairing() crypto.Pairing + func (c *CurvePoint) GetPosition() crypto.Position + func (c *CurvePoint) IsInfinity() bool + func (c *CurvePoint) Marshal() []byte + func (c *CurvePoint) Neg(point crypto.Point) crypto.Point + func (c *CurvePoint) ScalarBaseMult(e *big.Int) crypto.Point + func (c *CurvePoint) ScalarMult(a crypto.Point, scalar *big.Int) crypto.Point + func (c *CurvePoint) Set(p crypto.Point) crypto.Point + func (c *CurvePoint) SetInfinity() + func (c *CurvePoint) Unmarshal(m []byte) ([]byte, error) + type R1csForTest struct + L []map[int]crypto.FieldElement + O []map[int]crypto.FieldElement + R []map[int]crypto.FieldElement + func (r *R1csForTest) ConstraintsNum() uint64 + func (r *R1csForTest) GetSignalByID(nowid int) (id, reoffset int, prefix string, value crypto.FieldElement) + func (r *R1csForTest) Next(pos *int) (index int, a, b, c map[int]crypto.FieldElement) + func (r *R1csForTest) NextVariable(buf []crypto.FieldElement) (int, []crypto.FieldElement) + type SuperLogger interface + SetEnableCaller func(enable bool) + type TwistPoint struct + C *Curve + IsInf bool + X *XBigNumForTest + Y *XBigNumForTest + func (t *TwistPoint) Add(p1 crypto.Point, p2 crypto.Point) crypto.Point + func (t *TwistPoint) Double(p crypto.Point) crypto.Point + func (t *TwistPoint) GetPairing() crypto.Pairing + func (t *TwistPoint) GetPosition() crypto.Position + func (t *TwistPoint) IsInfinity() bool + func (t *TwistPoint) Marshal() []byte + func (t *TwistPoint) Neg(point crypto.Point) crypto.Point + func (t *TwistPoint) ScalarBaseMult(e *big.Int) crypto.Point + func (t *TwistPoint) ScalarMult(a crypto.Point, scalar *big.Int) crypto.Point + func (t *TwistPoint) Set(p crypto.Point) crypto.Point + func (t *TwistPoint) SetInfinity() + func (t *TwistPoint) Unmarshal(m []byte) ([]byte, error) + type XBigNumForTest struct + IS big.Int + P big.Int + V *big.Int + Vi *big.Int + func NewXBigNum(P, I, V, Vi *big.Int) *XBigNumForTest + func (b *XBigNumForTest) Add(a1, a2 crypto.FieldElement) crypto.FieldElement + func (b *XBigNumForTest) Copy() crypto.FieldElement + func (b *XBigNumForTest) Div(a1, a2 crypto.FieldElement) crypto.FieldElement + func (b *XBigNumForTest) Double(a crypto.FieldElement) crypto.FieldElement + func (b *XBigNumForTest) Equal(element crypto.FieldElement) bool + func (b *XBigNumForTest) Exp(element crypto.FieldElement, bytes []byte) crypto.FieldElement + func (b *XBigNumForTest) From(in *big.Int) crypto.FieldElement + func (b *XBigNumForTest) FromRegular(content []byte) crypto.FieldElement + func (b *XBigNumForTest) GetModule(b2 *big.Int) + func (b *XBigNumForTest) Inv(a crypto.FieldElement) crypto.FieldElement + func (b *XBigNumForTest) IsNeg() bool + func (b *XBigNumForTest) IsOne() bool + func (b *XBigNumForTest) IsZero() bool + func (b *XBigNumForTest) MarshalJSON() ([]byte, error) + func (b *XBigNumForTest) MontBytes(res []byte) []byte + func (b *XBigNumForTest) Mul(a1, a2 crypto.FieldElement) crypto.FieldElement + func (b *XBigNumForTest) Neg(a crypto.FieldElement) crypto.FieldElement + func (b *XBigNumForTest) Regular(bytes []byte) []byte + func (b *XBigNumForTest) Set(element crypto.FieldElement) crypto.FieldElement + func (b *XBigNumForTest) SetInt64(u int64) crypto.FieldElement + func (b *XBigNumForTest) SetOne() crypto.FieldElement + func (b *XBigNumForTest) SetRandom(reader io.Reader) crypto.FieldElement + func (b *XBigNumForTest) SetUint64(u uint64) crypto.FieldElement + func (b *XBigNumForTest) SetZero() crypto.FieldElement + func (b *XBigNumForTest) Square(a crypto.FieldElement) crypto.FieldElement + func (b *XBigNumForTest) String() string + func (b *XBigNumForTest) Sub(a1, a2 crypto.FieldElement) crypto.FieldElement + func (b *XBigNumForTest) ToBigInt(rat *big.Int) *big.Int + func (b *XBigNumForTest) UnmarshalJSON(in []byte) error