Documentation
¶
Index ¶
- type E12
- func (e *E12) Add(api frontend.API, e1, e2 E12) *E12
- func (e *E12) Assign(a *bls12377.E12)
- func (e *E12) Conjugate(api frontend.API, e1 E12) *E12
- func (e *E12) CyclotomicSquare(api frontend.API, x E12) *E12
- func (e *E12) CyclotomicSquareCompressed(api frontend.API, x E12) *E12
- func (e *E12) Decompress(api frontend.API, x E12) *E12
- func (e *E12) Expt(api frontend.API, e1 E12, exponent uint64) *E12
- func (e *E12) Frobenius(api frontend.API, e1 E12) *E12
- func (e *E12) FrobeniusCube(api frontend.API, e1 E12) *E12
- func (e *E12) FrobeniusSquare(api frontend.API, e1 E12) *E12
- func (e *E12) Inverse(api frontend.API, e1 E12) *E12
- func (e *E12) Mul(api frontend.API, e1, e2 E12) *E12
- func (e *E12) MulBy034(api frontend.API, c3, c4 E2) *E12
- func (e *E12) MustBeEqual(api frontend.API, other E12)
- func (e *E12) Neg(api frontend.API, e1 E12) *E12
- func (e *E12) Select(api frontend.API, b frontend.Variable, r1, r2 E12) *E12
- func (e *E12) SetOne(api frontend.API) *E12
- func (e *E12) Square(api frontend.API, x E12) *E12
- func (e *E12) Sub(api frontend.API, e1, e2 E12) *E12
- type E2
- func (e *E2) Add(api frontend.API, e1, e2 E2) *E2
- func (e *E2) Assign(a *bls12377.E2)
- func (e *E2) Conjugate(api frontend.API, e1 E2) *E2
- func (e *E2) Double(api frontend.API, e1 E2) *E2
- func (e *E2) Inverse(api frontend.API, e1 E2) *E2
- func (e *E2) Mul(api frontend.API, e1, e2 E2) *E2
- func (e *E2) MulByFp(api frontend.API, e1 E2, c interface{}) *E2
- func (e *E2) MulByNonResidue(api frontend.API, e1 E2) *E2
- func (e *E2) MustBeEqual(api frontend.API, other E2)
- func (e *E2) Neg(api frontend.API, e1 E2) *E2
- func (e *E2) SetOne(api frontend.API) *E2
- func (e *E2) Square(api frontend.API, x E2) *E2
- func (e *E2) Sub(api frontend.API, e1, e2 E2) *E2
- type E6
- func (e *E6) Add(api frontend.API, e1, e2 E6) *E6
- func (e *E6) Assign(a *bls12377.E6)
- func (e *E6) Inverse(api frontend.API, e1 E6) *E6
- func (e *E6) Mul(api frontend.API, e1, e2 E6) *E6
- func (e *E6) MulBy01(api frontend.API, c0, c1 E2) *E6
- func (e *E6) MulByE2(api frontend.API, e1 E6, e2 E2) *E6
- func (e *E6) MulByFp2(api frontend.API, e1 E6, e2 E2) *E6
- func (e *E6) MulByNonResidue(api frontend.API, e1 E6) *E6
- func (e *E6) MustBeEqual(api frontend.API, other E6)
- func (e *E6) Neg(api frontend.API, e1 E6) *E6
- func (e *E6) Square(api frontend.API, x E6) *E6
- func (e *E6) Sub(api frontend.API, 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) Assign ¶
func (e *E12) Assign(a *bls12377.E12)
Assign a value to self (witness assignment)
func (*E12) Conjugate ¶
func (e *E12) Conjugate(api frontend.API, e1 E12) *E12
Conjugate applies Frob**6 (conjugation over Fp6)
func (*E12) CyclotomicSquare ¶
func (e *E12) CyclotomicSquare(api frontend.API, x E12) *E12
Granger-Scott's cyclotomic square squares a Fp12 elt in the cyclotomic group https://eprint.iacr.org/2009/565.pdf, 3.2
func (*E12) CyclotomicSquareCompressed ¶
func (e *E12) CyclotomicSquareCompressed(api frontend.API, x E12) *E12
Karabina's compressed cyclotomic square https://eprint.iacr.org/2010/542.pdf Th. 3.2 with minor modifications to fit our tower
func (*E12) Decompress ¶
func (e *E12) Decompress(api frontend.API, x E12) *E12
Decompress Karabina's cyclotomic square result
func (*E12) Expt ¶
func (e *E12) Expt(api frontend.API, e1 E12, exponent uint64) *E12
Expt compute e1**exponent, where the exponent is hardcoded This function is only used for the final expo of the pairing for bls12377, so the exponent is supposed to be hardcoded and on 64 bits.
func (*E12) Frobenius ¶
func (e *E12) Frobenius(api frontend.API, e1 E12) *E12
Frobenius applies frob to an fp12 elmt
func (*E12) FrobeniusCube ¶
func (e *E12) FrobeniusCube(api frontend.API, e1 E12) *E12
FrobeniusCube applies frob**2 to an fp12 elmt
func (*E12) FrobeniusSquare ¶
func (e *E12) FrobeniusSquare(api frontend.API, e1 E12) *E12
FrobeniusSquare applies frob**2 to an fp12 elmt
func (*E12) Inverse ¶
func (e *E12) Inverse(api frontend.API, e1 E12) *E12
Inverse inverse an elmt in Fp12
func (*E12) Mul ¶
func (e *E12) Mul(api frontend.API, e1, e2 E12) *E12
Mul multiplies 2 elmts in Fp12
func (*E12) MulBy034 ¶
func (e *E12) MulBy034(api frontend.API, c3, c4 E2) *E12
MulBy034 multiplication by sparse element
func (*E12) MustBeEqual ¶
func (e *E12) MustBeEqual(api frontend.API, other E12)
MustBeEqual constraint self to be equal to other into the given constraint system
func (*E12) Select ¶
func (e *E12) Select(api frontend.API, b frontend.Variable, r1, r2 E12) *E12
Select sets e to r1 if b=1, r2 otherwise
func (*E12) SetOne ¶
func (e *E12) SetOne(api frontend.API) *E12
SetOne returns a newly allocated element equal to 1
type E2 ¶
type E2 struct {
A0, A1 frontend.Variable
}
E2 element in a quadratic extension
func (*E2) Conjugate ¶
func (e *E2) Conjugate(api frontend.API, e1 E2) *E2
Conjugate conjugation of an e2 elmt
func (*E2) MulByFp ¶
func (e *E2) MulByFp(api frontend.API, e1 E2, c interface{}) *E2
MulByFp multiplies an fp2 elmt by an fp elmt
func (*E2) MulByNonResidue ¶
func (e *E2) MulByNonResidue(api frontend.API, e1 E2) *E2
MulByNonResidue multiplies an fp2 elmt by the imaginary elmt ext.uSquare is the square of the imaginary root
func (*E2) MustBeEqual ¶
func (e *E2) MustBeEqual(api frontend.API, 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(api frontend.API, e1, e2 E6) *E6
Add creates a fp6elmt from fp elmts
func (*E6) Mul ¶
func (e *E6) Mul(api frontend.API, e1, e2 E6) *E6
Mul creates a fp6elmt from fp elmts icube is the imaginary elmt to the cube
func (*E6) MulBy01 ¶
func (e *E6) MulBy01(api frontend.API, c0, c1 E2) *E6
MulBy01 multiplication by sparse element (c0,c1,0)
func (*E6) MulByE2 ¶
func (e *E6) MulByE2(api frontend.API, e1 E6, e2 E2) *E6
MulByE2 multiplies an element in E6 by an element in E2
func (*E6) MulByFp2 ¶
func (e *E6) MulByFp2(api frontend.API, e1 E6, e2 E2) *E6
MulByFp2 creates a fp6elmt from fp elmts icube is the imaginary elmt to the cube
func (*E6) MulByNonResidue ¶
func (e *E6) MulByNonResidue(api frontend.API, e1 E6) *E6
MulByNonResidue multiplies e by the imaginary elmt of Fp6 (noted a+bV+cV where V**3 in F²)
func (*E6) MustBeEqual ¶
func (e *E6) MustBeEqual(api frontend.API, other E6)
MustBeEqual constraint self to be equal to other into the given constraint system