Documentation ¶
Index ¶
- Variables
- type Curve
- func (c *Curve) FExp(a *Gt) *Gt
- func (c *Curve) HashToG1(data []byte) *G1
- func (c *Curve) HashToZr(data []byte) *Zr
- func (c *Curve) ModAdd(a, b, m *Zr) *Zr
- func (c *Curve) ModMul(a1, b1, m *Zr) *Zr
- func (c *Curve) ModNeg(a1, m *Zr) *Zr
- func (c *Curve) ModSub(a, b, m *Zr) *Zr
- func (c *Curve) NewG1() *G1
- func (c *Curve) NewG1FromBytes(b []byte) (p *G1, err error)
- func (c *Curve) NewG2() *G2
- func (c *Curve) NewG2FromBytes(b []byte) (p *G2, err error)
- func (c *Curve) NewGtFromBytes(b []byte) (p *Gt, err error)
- func (c *Curve) NewRandomZr(rng io.Reader) *Zr
- func (c *Curve) NewZrFromBytes(b []byte) *Zr
- func (c *Curve) NewZrFromInt(i int64) *Zr
- func (c *Curve) Pairing(a *G2, b *G1) *Gt
- func (c *Curve) Pairing2(p *G2, q *G1, r *G2, s *G1) *Gt
- func (c *Curve) Rand() (io.Reader, error)
- type CurveID
- type G1
- func (g *G1) Add(a *G1)
- func (g *G1) Bytes() []byte
- func (g *G1) Clone(a *G1)
- func (g *G1) Copy() *G1
- func (g *G1) Equals(a *G1) bool
- func (g *G1) IsInfinity() bool
- func (g *G1) MarshalJSON() ([]byte, error)
- func (g *G1) Mul(a *Zr) *G1
- func (g *G1) Mul2(e *Zr, Q *G1, f *Zr) *G1
- func (g *G1) String() string
- func (g *G1) Sub(a *G1)
- func (g *G1) UnmarshalJSON(raw []byte) error
- type G2
- func (g *G2) Add(a *G2)
- func (g *G2) Affine()
- func (g *G2) Bytes() []byte
- func (g *G2) Clone(a *G2)
- func (g *G2) Copy() *G2
- func (g *G2) Equals(a *G2) bool
- func (g *G2) MarshalJSON() ([]byte, error)
- func (g *G2) Mul(a *Zr) *G2
- func (g *G2) String() string
- func (g *G2) Sub(a *G2)
- func (g *G2) UnmarshalJSON(raw []byte) error
- type Gt
- type Zr
- func (z *Zr) Bytes() []byte
- func (z *Zr) Clone(a *Zr)
- func (z *Zr) Copy() *Zr
- func (z *Zr) Equals(a *Zr) bool
- func (z *Zr) Int() (int64, error)
- func (z *Zr) InvModP(a *Zr)
- func (z *Zr) MarshalJSON() ([]byte, error)
- func (z *Zr) Mod(a *Zr)
- func (z *Zr) Plus(a *Zr) *Zr
- func (z *Zr) PowMod(a *Zr) *Zr
- func (z *Zr) String() string
- func (z *Zr) UnmarshalJSON(raw []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Curves []*Curve = []*Curve{ { GenG1: &G1{g1: (&amcl.Fp256bn{}).GenG1(), curveID: FP256BN_AMCL}, GenG2: &G2{g2: (&amcl.Fp256bn{}).GenG2(), curveID: FP256BN_AMCL}, GenGt: &Gt{gt: (&amcl.Fp256bn{}).GenGt(), curveID: FP256BN_AMCL}, GroupOrder: &Zr{zr: (&amcl.Fp256bn{}).GroupOrder(), curveID: FP256BN_AMCL}, FieldBytes: (&amcl.Fp256bn{}).FieldBytes(), // contains filtered or unexported fields }, { GenG1: &G1{g1: (&gurvy.Bn254{}).GenG1(), curveID: BN254}, GenG2: &G2{g2: (&gurvy.Bn254{}).GenG2(), curveID: BN254}, GenGt: &Gt{gt: (&gurvy.Bn254{}).GenGt(), curveID: BN254}, GroupOrder: &Zr{zr: (&gurvy.Bn254{}).GroupOrder(), curveID: BN254}, FieldBytes: (&gurvy.Bn254{}).FieldBytes(), // contains filtered or unexported fields }, { GenG1: &G1{g1: (&amcl.Fp256Miraclbn{}).GenG1(), curveID: FP256BN_AMCL_MIRACL}, GenG2: &G2{g2: (&amcl.Fp256Miraclbn{}).GenG2(), curveID: FP256BN_AMCL_MIRACL}, GenGt: &Gt{gt: (&amcl.Fp256Miraclbn{}).GenGt(), curveID: FP256BN_AMCL_MIRACL}, GroupOrder: &Zr{zr: (&amcl.Fp256Miraclbn{}).GroupOrder(), curveID: FP256BN_AMCL_MIRACL}, FieldBytes: (&amcl.Fp256Miraclbn{}).FieldBytes(), // contains filtered or unexported fields }, }
Functions ¶
This section is empty.
Types ¶
type Curve ¶
type Curve struct { GenG1 *G1 GenG2 *G2 GenGt *Gt GroupOrder *Zr FieldBytes int // contains filtered or unexported fields }
func (*Curve) NewZrFromBytes ¶
func (*Curve) NewZrFromInt ¶
type G1 ¶
type G1 struct {
// contains filtered or unexported fields
}
func (*G1) IsInfinity ¶
func (*G1) MarshalJSON ¶
func (*G1) UnmarshalJSON ¶
type G2 ¶
type G2 struct {
// contains filtered or unexported fields
}
func (*G2) MarshalJSON ¶
func (*G2) UnmarshalJSON ¶
type Gt ¶
type Gt struct {
// contains filtered or unexported fields
}
func (*Gt) MarshalJSON ¶
func (*Gt) UnmarshalJSON ¶
type Zr ¶
type Zr struct {
// contains filtered or unexported fields
}
func (*Zr) MarshalJSON ¶
func (*Zr) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.