Documentation ¶
Overview ¶
Package sw (short weierstrass)
Index ¶
- func DoubleAndAddStep(api frontend.API, p1, p2 *G2Affine, ext fields_bls24315.Extension) (G2Affine, LineEvaluation, LineEvaluation)
- func DoubleStep(api frontend.API, p1 *G2Affine, ext fields_bls24315.Extension) (G2Affine, LineEvaluation)
- func MillerLoop(api frontend.API, P G1Affine, Q G2Affine, res *fields_bls24315.E24, ...) *fields_bls24315.E24
- func TripleMillerLoop(api frontend.API, P [3]G1Affine, Q [3]G2Affine, res *fields_bls24315.E24, ...) *fields_bls24315.E24
- type G1Affine
- func (p *G1Affine) AddAssign(api frontend.API, p1 G1Affine) *G1Affine
- func (p *G1Affine) Assign(p1 *bls24315.G1Affine)
- func (p *G1Affine) Double(api frontend.API, p1 G1Affine) *G1Affine
- func (p *G1Affine) DoubleAndAdd(api frontend.API, p1, p2 *G1Affine) *G1Affine
- func (p *G1Affine) FromJac(api frontend.API, p1 G1Jac) *G1Affine
- func (p *G1Affine) MustBeEqual(api frontend.API, other G1Affine)
- func (p *G1Affine) Neg(api frontend.API, p1 G1Affine) *G1Affine
- func (P *G1Affine) ScalarMul(api frontend.API, Q G1Affine, s interface{}) *G1Affine
- func (p *G1Affine) Select(api frontend.API, b frontend.Variable, p1, p2 G1Affine) *G1Affine
- type G1Jac
- type G2Affine
- func (p *G2Affine) AddAssign(api frontend.API, p1 *G2Affine, ext fields_bls24315.Extension) *G2Affine
- func (p *G2Affine) Assign(p1 *bls24315.G2Affine)
- func (p *G2Affine) Double(api frontend.API, p1 *G2Affine, ext fields_bls24315.Extension) *G2Affine
- func (p *G2Affine) DoubleAndAdd(api frontend.API, p1, p2 *G2Affine, ext fields_bls24315.Extension) *G2Affine
- func (p *G2Affine) MustBeEqual(api frontend.API, other G2Affine)
- func (p *G2Affine) Neg(api frontend.API, p1 *G2Affine) *G2Affine
- type G2Jac
- func (p *G2Jac) AddAssign(api frontend.API, p1 *G2Jac, ext fields_bls24315.Extension) *G2Jac
- func (p *G2Jac) Assign(p1 *bls24315.G2Jac)
- func (p *G2Jac) Double(api frontend.API, p1 *G2Jac, ext fields_bls24315.Extension) *G2Jac
- func (p *G2Jac) MustBeEqual(api frontend.API, other G2Jac)
- func (p *G2Jac) Neg(api frontend.API, p1 *G2Jac) *G2Jac
- func (p *G2Jac) ToProj(api frontend.API, p1 *G2Jac, ext fields_bls24315.Extension) *G2Jac
- type G2Proj
- type LineEvaluation
- type PairingContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoubleAndAddStep ¶
func DoubleAndAddStep(api frontend.API, p1, p2 *G2Affine, ext fields_bls24315.Extension) (G2Affine, LineEvaluation, LineEvaluation)
DoubleAndAddStep
func DoubleStep ¶
func DoubleStep(api frontend.API, p1 *G2Affine, ext fields_bls24315.Extension) (G2Affine, LineEvaluation)
func MillerLoop ¶
func MillerLoop(api frontend.API, P G1Affine, Q G2Affine, res *fields_bls24315.E24, pairingInfo PairingContext) *fields_bls24315.E24
MillerLoop computes the miller loop
func TripleMillerLoop ¶
func TripleMillerLoop(api frontend.API, P [3]G1Affine, Q [3]G2Affine, res *fields_bls24315.E24, pairingInfo PairingContext) *fields_bls24315.E24
TripleMillerLoop computes the product of three miller loops
Types ¶
type G1Affine ¶
G1Affine point in affine coords
func (*G1Affine) AddAssign ¶
AddAssign adds p1 to p using the affine formulas with division, and return p
func (*G1Affine) DoubleAndAdd ¶
DoubleAndAdd computes 2*p1+p in affine coords
func (*G1Affine) MustBeEqual ¶
MustBeEqual constraint self to be equal to other into the given constraint system
type G1Jac ¶
G1Jac point in Jacobian coords
func (*G1Jac) DoubleAssign ¶
DoubleAssign doubles the receiver point in jacobian coords and returns it
func (*G1Jac) MustBeEqual ¶
MustBeEqual constraint self to be equal to other into the given constraint system
type G2Affine ¶
type G2Affine struct {
X, Y fields_bls24315.E4
}
G2Affine point in affine coords
func (*G2Affine) AddAssign ¶
func (p *G2Affine) AddAssign(api frontend.API, p1 *G2Affine, ext fields_bls24315.Extension) *G2Affine
AddAssign add p1 to p and return p
func (*G2Affine) Double ¶
Double compute 2*p1, assign the result to p and return it Only for curve with j invariant 0 (a=0).
func (*G2Affine) DoubleAndAdd ¶
func (p *G2Affine) DoubleAndAdd(api frontend.API, p1, p2 *G2Affine, ext fields_bls24315.Extension) *G2Affine
DoubleAndAdd computes 2*p1+p2 in affine coords
func (*G2Affine) MustBeEqual ¶
MustBeEqual constraint self to be equal to other into the given constraint system
type G2Jac ¶
type G2Jac struct {
X, Y, Z fields_bls24315.E4
}
G2Jac point in Jacobian coords
func (*G2Jac) MustBeEqual ¶
MustBeEqual constraint self to be equal to other into the given constraint system
type G2Proj ¶
type G2Proj struct {
X, Y, Z fields_bls24315.E4
}
type LineEvaluation ¶
type LineEvaluation struct {
R0, R1 fields_bls24315.E4
}
LineEvaluation represents a sparse Fp12 Elmt (result of the line evaluation)
type PairingContext ¶
type PairingContext struct { AteLoop uint64 // stores the ate loop Extension fields_bls24315.Extension BTwistCoeff fields_bls24315.E4 }
PairingContext contains useful info about the pairing