Documentation ¶
Index ¶
- type E12
- func (e *E12) Add(cs *frontend.ConstraintSystem, e1, e2 *E12) *E12
- func (e *E12) Assign(a *bls377.E12)
- func (e *E12) Conjugate(cs *frontend.ConstraintSystem, e1 *E12) *E12
- func (e *E12) ConjugateFp12(cs *frontend.ConstraintSystem, e1 *E12) *E12
- func (e *E12) FinalExpoBLS(cs *frontend.ConstraintSystem, e1 *E12, genT uint64, ext Extension) *E12
- func (e *E12) FixedExponentiation(cs *frontend.ConstraintSystem, e1 *E12, exponent uint64, ext Extension) *E12
- func (e *E12) Frobenius(cs *frontend.ConstraintSystem, e1 *E12, ext Extension) *E12
- func (e *E12) FrobeniusCube(cs *frontend.ConstraintSystem, e1 *E12, ext Extension) *E12
- func (e *E12) FrobeniusSquare(cs *frontend.ConstraintSystem, e1 *E12, ext Extension) *E12
- func (e *E12) Inverse(cs *frontend.ConstraintSystem, e1 *E12, ext Extension) *E12
- func (e *E12) Mul(cs *frontend.ConstraintSystem, e1, e2 *E12, ext Extension) *E12
- func (e *E12) MulByV(cs *frontend.ConstraintSystem, e1 *E12, e2 *E2, ext Extension) *E12
- func (e *E12) MulByV2W(cs *frontend.ConstraintSystem, e1 *E12, e2 *E2, ext Extension) *E12
- func (e *E12) MulByVW(cs *frontend.ConstraintSystem, e1 *E12, e2 *E2, ext Extension) *E12
- func (e *E12) MustBeEqual(cs *frontend.ConstraintSystem, other E12)
- func (e *E12) Neg(cs *frontend.ConstraintSystem, e1 *E12) *E12
- func (e *E12) Select(cs *frontend.ConstraintSystem, b frontend.Variable, r1, r2 *E12) *E12
- func (e *E12) SetOne(cs *frontend.ConstraintSystem) *E12
- func (e *E12) Sub(cs *frontend.ConstraintSystem, e1, e2 *E12) *E12
- type E2
- func (e *E2) Add(cs *frontend.ConstraintSystem, e1, e2 *E2) *E2
- func (e *E2) Assign(a *bls377.E2)
- func (e *E2) Conjugate(cs *frontend.ConstraintSystem, e1 *E2) *E2
- func (e *E2) Inverse(cs *frontend.ConstraintSystem, e1 *E2, ext Extension) *E2
- func (e *E2) Mul(cs *frontend.ConstraintSystem, e1, e2 *E2, ext Extension) *E2
- func (e *E2) MulByFp(cs *frontend.ConstraintSystem, e1 *E2, c interface{}) *E2
- func (e *E2) MulByIm(cs *frontend.ConstraintSystem, e1 *E2, ext Extension) *E2
- func (e *E2) MustBeEqual(cs *frontend.ConstraintSystem, other E2)
- func (e *E2) Neg(cs *frontend.ConstraintSystem, e1 *E2) *E2
- func (e *E2) Sub(cs *frontend.ConstraintSystem, e1, e2 *E2) *E2
- type E6
- func (e *E6) Add(cs *frontend.ConstraintSystem, e1, e2 *E6) *E6
- func (e *E6) Assign(a *bls377.E6)
- func (e *E6) Inverse(cs *frontend.ConstraintSystem, e1 *E6, ext Extension) *E6
- func (e *E6) Mul(cs *frontend.ConstraintSystem, e1, e2 *E6, ext Extension) *E6
- func (e *E6) MulByFp2(cs *frontend.ConstraintSystem, e1 *E6, e2 *E2, ext Extension) *E6
- func (e *E6) MulByNonResidue(cs *frontend.ConstraintSystem, e1 *E6, ext Extension) *E6
- func (e *E6) MustBeEqual(cs *frontend.ConstraintSystem, other E6)
- func (e *E6) Neg(cs *frontend.ConstraintSystem, e1 *E6) *E6
- func (e *E6) Sub(cs *frontend.ConstraintSystem, e1, e2 *E6) *E6
- type Extension
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type E12 ¶
type E12 struct {
C0, C1 E6
}
E12 element in a quadratic extension
func (*E12) Add ¶
func (e *E12) Add(cs *frontend.ConstraintSystem, e1, e2 *E12) *E12
Add adds 2 elmts in Fp12
func (*E12) Conjugate ¶
func (e *E12) Conjugate(cs *frontend.ConstraintSystem, e1 *E12) *E12
Conjugate applies Frob**6 (conjugation over Fp6)
func (*E12) ConjugateFp12 ¶
func (e *E12) ConjugateFp12(cs *frontend.ConstraintSystem, e1 *E12) *E12
ConjugateFp12 conjugates an Fp12 elmt (applies Frob**6)
func (*E12) FinalExpoBLS ¶
FinalExpoBLS final exponentation for curves of the bls family (t is the parameter used to generate the curve)
func (*E12) FixedExponentiation ¶
func (e *E12) FixedExponentiation(cs *frontend.ConstraintSystem, e1 *E12, exponent uint64, ext Extension) *E12
FixedExponentiation compute e1**exponent, where the exponent is hardcoded This function is only used for the final expo of the pairing for bls377, so the exponent is supposed to be hardcoded and on 64 bits.
func (*E12) FrobeniusCube ¶
FrobeniusCube applies frob**2 to an fp12 elmt
func (*E12) FrobeniusSquare ¶
FrobeniusSquare applies frob**2 to an fp12 elmt
func (*E12) MulByV ¶
MulByV multiplies an e12 elmt by an elmt of the form a*V (Fp6=Fp2(V), Fp12 = Fp6(W))
func (*E12) MulByV2W ¶
MulByV2W multiplies an e12 elmt by an elmt of the form a*V**2W (Fp6=Fp2(V), Fp12 = Fp6(W))
func (*E12) MulByVW ¶
MulByVW multiplies an e12 elmt by an elmt of the form a*VW (Fp6=Fp2(V), Fp12 = Fp6(W))
func (*E12) MustBeEqual ¶
func (e *E12) MustBeEqual(cs *frontend.ConstraintSystem, other E12)
MustBeEqual constraint self to be equal to other into the given constraint system
func (*E12) Neg ¶
func (e *E12) Neg(cs *frontend.ConstraintSystem, e1 *E12) *E12
Neg negates an Fp6elmt
type E2 ¶
E2 element in a quadratic extension
func (*E2) Conjugate ¶
func (e *E2) Conjugate(cs *frontend.ConstraintSystem, e1 *E2) *E2
Conjugate conjugation of an e2 elmt
func (*E2) MulByFp ¶
func (e *E2) MulByFp(cs *frontend.ConstraintSystem, e1 *E2, c interface{}) *E2
MulByFp multiplies an fp2 elmt by an fp elmt
func (*E2) MulByIm ¶
MulByIm multiplies an fp2 elmt by the imaginary elmt ext.uSquare is the square of the imaginary root
func (*E2) MustBeEqual ¶
func (e *E2) MustBeEqual(cs *frontend.ConstraintSystem, other E2)
MustBeEqual constraint self to be equal to other into the given constraint system
type E6 ¶
type E6 struct {
B0, B1, B2 E2
}
E6 element in a quadratic extension
func (*E6) Add ¶
func (e *E6) Add(cs *frontend.ConstraintSystem, e1, e2 *E6) *E6
Add creates a fp6elmt from fp elmts
func (*E6) MulByFp2 ¶
MulByFp2 creates a fp6elmt from fp elmts icube is the imaginary elmt to the cube
func (*E6) MulByNonResidue ¶
MulByNonResidue multiplies e by the imaginary elmt of Fp6 (noted a+bV+cV where V**3 in F^2)
func (*E6) MustBeEqual ¶
func (e *E6) MustBeEqual(cs *frontend.ConstraintSystem, other E6)
MustBeEqual constraint self to be equal to other into the given constraint system
type Extension ¶
type Extension struct {
// contains filtered or unexported fields
}
Extension stores the non residue elmt for an extension of type Fp->Fp2->Fp6->Fp12 (Fp2 = Fp(u), Fp6 = Fp2(v), Fp12 = Fp6(w))
func GetBLS377ExtensionFp12 ¶
func GetBLS377ExtensionFp12(cs *frontend.ConstraintSystem) Extension
GetBLS377ExtensionFp12 get extension field parameters for bls377