fields_bls24315

package
v0.0.0-...-ae8e47d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DivE12Hint = func(_ *big.Int, inputs []*big.Int, res []*big.Int) error {
	var a, b, c bls24315.E12

	a.C0.B0.A0.SetBigInt(inputs[0])
	a.C0.B0.A1.SetBigInt(inputs[1])
	a.C0.B1.A0.SetBigInt(inputs[2])
	a.C0.B1.A1.SetBigInt(inputs[3])
	a.C1.B0.A0.SetBigInt(inputs[4])
	a.C1.B0.A1.SetBigInt(inputs[5])
	a.C1.B1.A0.SetBigInt(inputs[6])
	a.C1.B1.A1.SetBigInt(inputs[7])
	a.C2.B0.A0.SetBigInt(inputs[8])
	a.C2.B0.A1.SetBigInt(inputs[9])
	a.C2.B1.A0.SetBigInt(inputs[10])
	a.C2.B1.A1.SetBigInt(inputs[11])

	b.C0.B0.A0.SetBigInt(inputs[12])
	b.C0.B0.A1.SetBigInt(inputs[13])
	b.C0.B1.A0.SetBigInt(inputs[14])
	b.C0.B1.A1.SetBigInt(inputs[15])
	b.C1.B0.A0.SetBigInt(inputs[16])
	b.C1.B0.A1.SetBigInt(inputs[17])
	b.C1.B1.A0.SetBigInt(inputs[18])
	b.C1.B1.A1.SetBigInt(inputs[19])
	b.C2.B0.A0.SetBigInt(inputs[20])
	b.C2.B0.A1.SetBigInt(inputs[21])
	b.C2.B1.A0.SetBigInt(inputs[22])
	b.C2.B1.A1.SetBigInt(inputs[23])

	c.Inverse(&b).Mul(&c, &a)

	c.C0.B0.A0.BigInt(res[0])
	c.C0.B0.A1.BigInt(res[1])
	c.C0.B1.A0.BigInt(res[2])
	c.C0.B1.A1.BigInt(res[3])
	c.C1.B0.A0.BigInt(res[4])
	c.C1.B0.A1.BigInt(res[5])
	c.C1.B1.A0.BigInt(res[6])
	c.C1.B1.A1.BigInt(res[7])
	c.C2.B0.A0.BigInt(res[8])
	c.C2.B0.A1.BigInt(res[9])
	c.C2.B1.A0.BigInt(res[10])
	c.C2.B1.A1.BigInt(res[11])

	return nil
}
View Source
var DivE24Hint = func(_ *big.Int, inputs []*big.Int, res []*big.Int) error {
	var a, b, c bls24315.E24

	a.D0.C0.B0.A0.SetBigInt(inputs[0])
	a.D0.C0.B0.A1.SetBigInt(inputs[1])
	a.D0.C0.B1.A0.SetBigInt(inputs[2])
	a.D0.C0.B1.A1.SetBigInt(inputs[3])
	a.D0.C1.B0.A0.SetBigInt(inputs[4])
	a.D0.C1.B0.A1.SetBigInt(inputs[5])
	a.D0.C1.B1.A0.SetBigInt(inputs[6])
	a.D0.C1.B1.A1.SetBigInt(inputs[7])
	a.D0.C2.B0.A0.SetBigInt(inputs[8])
	a.D0.C2.B0.A1.SetBigInt(inputs[9])
	a.D0.C2.B1.A0.SetBigInt(inputs[10])
	a.D0.C2.B1.A1.SetBigInt(inputs[11])
	a.D1.C0.B0.A0.SetBigInt(inputs[12])
	a.D1.C0.B0.A1.SetBigInt(inputs[13])
	a.D1.C0.B1.A0.SetBigInt(inputs[14])
	a.D1.C0.B1.A1.SetBigInt(inputs[15])
	a.D1.C1.B0.A0.SetBigInt(inputs[16])
	a.D1.C1.B0.A1.SetBigInt(inputs[17])
	a.D1.C1.B1.A0.SetBigInt(inputs[18])
	a.D1.C1.B1.A1.SetBigInt(inputs[19])
	a.D1.C2.B0.A0.SetBigInt(inputs[20])
	a.D1.C2.B0.A1.SetBigInt(inputs[21])
	a.D1.C2.B1.A0.SetBigInt(inputs[22])
	a.D1.C2.B1.A1.SetBigInt(inputs[23])

	b.D0.C0.B0.A0.SetBigInt(inputs[24])
	b.D0.C0.B0.A1.SetBigInt(inputs[25])
	b.D0.C0.B1.A0.SetBigInt(inputs[26])
	b.D0.C0.B1.A1.SetBigInt(inputs[27])
	b.D0.C1.B0.A0.SetBigInt(inputs[28])
	b.D0.C1.B0.A1.SetBigInt(inputs[29])
	b.D0.C1.B1.A0.SetBigInt(inputs[30])
	b.D0.C1.B1.A1.SetBigInt(inputs[31])
	b.D0.C2.B0.A0.SetBigInt(inputs[32])
	b.D0.C2.B0.A1.SetBigInt(inputs[33])
	b.D0.C2.B1.A0.SetBigInt(inputs[34])
	b.D0.C2.B1.A1.SetBigInt(inputs[35])
	b.D1.C0.B0.A0.SetBigInt(inputs[36])
	b.D1.C0.B0.A1.SetBigInt(inputs[37])
	b.D1.C0.B1.A0.SetBigInt(inputs[38])
	b.D1.C0.B1.A1.SetBigInt(inputs[39])
	b.D1.C1.B0.A0.SetBigInt(inputs[40])
	b.D1.C1.B0.A1.SetBigInt(inputs[41])
	b.D1.C1.B1.A0.SetBigInt(inputs[42])
	b.D1.C1.B1.A1.SetBigInt(inputs[43])
	b.D1.C2.B0.A0.SetBigInt(inputs[44])
	b.D1.C2.B0.A1.SetBigInt(inputs[45])
	b.D1.C2.B1.A0.SetBigInt(inputs[46])
	b.D1.C2.B1.A1.SetBigInt(inputs[47])

	c.Inverse(&b).Mul(&c, &a)

	c.D0.C0.B0.A0.BigInt(res[0])
	c.D0.C0.B0.A1.BigInt(res[1])
	c.D0.C0.B1.A0.BigInt(res[2])
	c.D0.C0.B1.A1.BigInt(res[3])
	c.D0.C1.B0.A0.BigInt(res[4])
	c.D0.C1.B0.A1.BigInt(res[5])
	c.D0.C1.B1.A0.BigInt(res[6])
	c.D0.C1.B1.A1.BigInt(res[7])
	c.D0.C2.B0.A0.BigInt(res[8])
	c.D0.C2.B0.A1.BigInt(res[9])
	c.D0.C2.B1.A0.BigInt(res[10])
	c.D0.C2.B1.A1.BigInt(res[11])
	c.D1.C0.B0.A0.BigInt(res[12])
	c.D1.C0.B0.A1.BigInt(res[13])
	c.D1.C0.B1.A0.BigInt(res[14])
	c.D1.C0.B1.A1.BigInt(res[15])
	c.D1.C1.B0.A0.BigInt(res[16])
	c.D1.C1.B0.A1.BigInt(res[17])
	c.D1.C1.B1.A0.BigInt(res[18])
	c.D1.C1.B1.A1.BigInt(res[19])
	c.D1.C2.B0.A0.BigInt(res[20])
	c.D1.C2.B0.A1.BigInt(res[21])
	c.D1.C2.B1.A0.BigInt(res[22])
	c.D1.C2.B1.A1.BigInt(res[23])

	return nil
}
View Source
var DivE2Hint = func(_ *big.Int, inputs []*big.Int, res []*big.Int) error {
	var a, b, c bls24315.E2

	a.A0.SetBigInt(inputs[0])
	a.A1.SetBigInt(inputs[1])
	b.A0.SetBigInt(inputs[2])
	b.A1.SetBigInt(inputs[3])

	c.Inverse(&b).Mul(&c, &a)

	c.A0.BigInt(res[0])
	c.A1.BigInt(res[1])

	return nil
}
View Source
var DivE4Hint = func(_ *big.Int, inputs []*big.Int, res []*big.Int) error {
	var a, b, c bls24315.E4

	a.B0.A0.SetBigInt(inputs[0])
	a.B0.A1.SetBigInt(inputs[1])
	a.B1.A0.SetBigInt(inputs[2])
	a.B1.A1.SetBigInt(inputs[3])
	b.B0.A0.SetBigInt(inputs[4])
	b.B0.A1.SetBigInt(inputs[5])
	b.B1.A0.SetBigInt(inputs[6])
	b.B1.A1.SetBigInt(inputs[7])

	c.Inverse(&b).Mul(&c, &a)

	c.B0.A0.BigInt(res[0])
	c.B0.A1.BigInt(res[1])
	c.B1.A0.BigInt(res[2])
	c.B1.A1.BigInt(res[3])

	return nil
}
View Source
var InverseE12Hint = func(_ *big.Int, inputs []*big.Int, res []*big.Int) error {
	var a, c bls24315.E12

	a.C0.B0.A0.SetBigInt(inputs[0])
	a.C0.B0.A1.SetBigInt(inputs[1])
	a.C0.B1.A0.SetBigInt(inputs[2])
	a.C0.B1.A1.SetBigInt(inputs[3])
	a.C1.B0.A0.SetBigInt(inputs[4])
	a.C1.B0.A1.SetBigInt(inputs[5])
	a.C1.B1.A0.SetBigInt(inputs[6])
	a.C1.B1.A1.SetBigInt(inputs[7])
	a.C2.B0.A0.SetBigInt(inputs[8])
	a.C2.B0.A1.SetBigInt(inputs[9])
	a.C2.B1.A0.SetBigInt(inputs[10])
	a.C2.B1.A1.SetBigInt(inputs[11])

	c.Inverse(&a)

	c.C0.B0.A0.BigInt(res[0])
	c.C0.B0.A1.BigInt(res[1])
	c.C0.B1.A0.BigInt(res[2])
	c.C0.B1.A1.BigInt(res[3])
	c.C1.B0.A0.BigInt(res[4])
	c.C1.B0.A1.BigInt(res[5])
	c.C1.B1.A0.BigInt(res[6])
	c.C1.B1.A1.BigInt(res[7])
	c.C2.B0.A0.BigInt(res[8])
	c.C2.B0.A1.BigInt(res[9])
	c.C2.B1.A0.BigInt(res[10])
	c.C2.B1.A1.BigInt(res[11])

	return nil
}
View Source
var InverseE24Hint = func(_ *big.Int, inputs []*big.Int, res []*big.Int) error {
	var a, c bls24315.E24

	a.D0.C0.B0.A0.SetBigInt(inputs[0])
	a.D0.C0.B0.A1.SetBigInt(inputs[1])
	a.D0.C0.B1.A0.SetBigInt(inputs[2])
	a.D0.C0.B1.A1.SetBigInt(inputs[3])
	a.D0.C1.B0.A0.SetBigInt(inputs[4])
	a.D0.C1.B0.A1.SetBigInt(inputs[5])
	a.D0.C1.B1.A0.SetBigInt(inputs[6])
	a.D0.C1.B1.A1.SetBigInt(inputs[7])
	a.D0.C2.B0.A0.SetBigInt(inputs[8])
	a.D0.C2.B0.A1.SetBigInt(inputs[9])
	a.D0.C2.B1.A0.SetBigInt(inputs[10])
	a.D0.C2.B1.A1.SetBigInt(inputs[11])
	a.D1.C0.B0.A0.SetBigInt(inputs[12])
	a.D1.C0.B0.A1.SetBigInt(inputs[13])
	a.D1.C0.B1.A0.SetBigInt(inputs[14])
	a.D1.C0.B1.A1.SetBigInt(inputs[15])
	a.D1.C1.B0.A0.SetBigInt(inputs[16])
	a.D1.C1.B0.A1.SetBigInt(inputs[17])
	a.D1.C1.B1.A0.SetBigInt(inputs[18])
	a.D1.C1.B1.A1.SetBigInt(inputs[19])
	a.D1.C2.B0.A0.SetBigInt(inputs[20])
	a.D1.C2.B0.A1.SetBigInt(inputs[21])
	a.D1.C2.B1.A0.SetBigInt(inputs[22])
	a.D1.C2.B1.A1.SetBigInt(inputs[23])

	c.Inverse(&a)

	c.D0.C0.B0.A0.BigInt(res[0])
	c.D0.C0.B0.A1.BigInt(res[1])
	c.D0.C0.B1.A0.BigInt(res[2])
	c.D0.C0.B1.A1.BigInt(res[3])
	c.D0.C1.B0.A0.BigInt(res[4])
	c.D0.C1.B0.A1.BigInt(res[5])
	c.D0.C1.B1.A0.BigInt(res[6])
	c.D0.C1.B1.A1.BigInt(res[7])
	c.D0.C2.B0.A0.BigInt(res[8])
	c.D0.C2.B0.A1.BigInt(res[9])
	c.D0.C2.B1.A0.BigInt(res[10])
	c.D0.C2.B1.A1.BigInt(res[11])
	c.D1.C0.B0.A0.BigInt(res[12])
	c.D1.C0.B0.A1.BigInt(res[13])
	c.D1.C0.B1.A0.BigInt(res[14])
	c.D1.C0.B1.A1.BigInt(res[15])
	c.D1.C1.B0.A0.BigInt(res[16])
	c.D1.C1.B0.A1.BigInt(res[17])
	c.D1.C1.B1.A0.BigInt(res[18])
	c.D1.C1.B1.A1.BigInt(res[19])
	c.D1.C2.B0.A0.BigInt(res[20])
	c.D1.C2.B0.A1.BigInt(res[21])
	c.D1.C2.B1.A0.BigInt(res[22])
	c.D1.C2.B1.A1.BigInt(res[23])

	return nil
}
View Source
var InverseE2Hint = func(_ *big.Int, inputs []*big.Int, res []*big.Int) error {
	var a, c bls24315.E2

	a.A0.SetBigInt(inputs[0])
	a.A1.SetBigInt(inputs[1])

	c.Inverse(&a)

	c.A0.BigInt(res[0])
	c.A1.BigInt(res[1])

	return nil
}
View Source
var InverseE4Hint = func(_ *big.Int, inputs []*big.Int, res []*big.Int) error {
	var a, c bls24315.E4

	a.B0.A0.SetBigInt(inputs[0])
	a.B0.A1.SetBigInt(inputs[1])
	a.B1.A0.SetBigInt(inputs[2])
	a.B1.A1.SetBigInt(inputs[3])

	c.Inverse(&a)

	c.B0.A0.BigInt(res[0])
	c.B0.A1.BigInt(res[1])
	c.B1.A0.BigInt(res[2])
	c.B1.A1.BigInt(res[3])

	return nil
}

Functions

This section is empty.

Types

type E12

type E12 struct {
	C0, C1, C2 E4
}

E12 element in a quadratic extension

func NewFp12Zero

func NewFp12Zero(api frontend.API) *E12

NewFp12Zero creates a new

func (*E12) Add

func (e *E12) Add(api frontend.API, e1, e2 E12) *E12

Add creates a fp12elmt from fp elmts

func (*E12) AssertIsEqual

func (e *E12) AssertIsEqual(api frontend.API, other E12)

AssertIsEqual constraint self to be equal to other into the given constraint system

func (*E12) Assign

func (e *E12) Assign(a *bls24315.E12)

Assign a value to self (witness assignment)

func (*E12) DivUnchecked

func (e *E12) DivUnchecked(api frontend.API, e1, e2 E12) *E12

DivUnchecked e12 elmts

func (*E12) Inverse

func (e *E12) Inverse(api frontend.API, e1 E12) *E12

Inverse e12 elmts

func (*E12) Mul

func (e *E12) Mul(api frontend.API, e1, e2 E12) *E12

Mul creates a fp12elmt from fp elmts icube is the imaginary elmt to the cube

func (*E12) MulBy01

func (e *E12) MulBy01(api frontend.API, c0, c1 E4) *E12

MulBy01 multiplication by sparse element (c0,c1,0)

func (*E12) MulByE4

func (e *E12) MulByE4(api frontend.API, e1 E12, e2 E4) *E12

MulByE4 multiplies an element in E12 by an element in E4

func (*E12) MulByFp2

func (e *E12) MulByFp2(api frontend.API, e1 E12, e2 E4) *E12

MulByFp2 creates a fp12elmt from fp elmts icube is the imaginary elmt to the cube

func (*E12) MulByNonResidue

func (e *E12) MulByNonResidue(api frontend.API, e1 E12) *E12

MulByNonResidue multiplies e by the imaginary elmt of Fp12 (noted a+bV+cV where V**3 in F²)

func (*E12) Neg

func (e *E12) Neg(api frontend.API, e1 E12) *E12

Neg negates an Fp12 elmt

func (*E12) SetOne

func (e *E12) SetOne() *E12

SetOne returns a newly allocated element equal to 1

func (*E12) SetZero

func (e *E12) SetZero() *E12

SetZero returns a newly allocated element equal to 0

func (*E12) Square

func (e *E12) Square(api frontend.API, x E12) *E12

Square sets z to the E12 product of x,x, returns e

func (*E12) Sub

func (e *E12) Sub(api frontend.API, e1, e2 E12) *E12

Sub creates a fp12elmt from fp elmts

type E2

type E2 struct {
	A0, A1 frontend.Variable
}

E2 element in a quadratic extension

func (*E2) Add

func (e *E2) Add(api frontend.API, e1, e2 E2) *E2

Add e2 elmts

func (*E2) AssertIsEqual

func (e *E2) AssertIsEqual(api frontend.API, other E2)

AssertIsEqual constraint self to be equal to other into the given constraint system

func (*E2) Assign

func (e *E2) Assign(a *bls24315.E2)

Assign a value to self (witness assignment)

func (*E2) Conjugate

func (e *E2) Conjugate(api frontend.API, e1 E2) *E2

Conjugate conjugation of an e2 elmt

func (*E2) DivUnchecked

func (e *E2) DivUnchecked(api frontend.API, e1, e2 E2) *E2

DivUnchecked e2 elmts

func (*E2) Double

func (e *E2) Double(api frontend.API, e1 E2) *E2

Double e2 elmt

func (*E2) Inverse

func (e *E2) Inverse(api frontend.API, e1 E2) *E2

Inverse e2 elmts

func (*E2) Mul

func (e *E2) Mul(api frontend.API, e1, e2 E2) *E2

Mul e2 elmts: 5C

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) Neg

func (e *E2) Neg(api frontend.API, e1 E2) *E2

Neg negates a e2 elmt

func (*E2) Select

func (e *E2) Select(api frontend.API, b frontend.Variable, r1, r2 E2) *E2

Select sets e to r1 if b=1, r2 otherwise

func (*E2) SetOne

func (e *E2) SetOne() *E2

SetOne returns a newly allocated element equal to 1

func (*E2) SetZero

func (e *E2) SetZero() *E2

SetZero returns a newly allocated element equal to 0

func (*E2) Square

func (e *E2) Square(api frontend.API, x E2) *E2

Square e2 elt

func (*E2) Sub

func (e *E2) Sub(api frontend.API, e1, e2 E2) *E2

Sub e2 elmts

type E24

type E24 struct {
	D0, D1 E12
}

E24 element in a quadratic extension

func (*E24) Add

func (e *E24) Add(api frontend.API, e1, e2 E24) *E24

Add adds 2 elmts in Fp24

func (*E24) AssertIsEqual

func (e *E24) AssertIsEqual(api frontend.API, other E24)

AssertIsEqual constraint self to be equal to other into the given constraint system

func (*E24) Assign

func (e *E24) Assign(a *bls24315.E24)

Assign a value to self (witness assignment)

func (*E24) Conjugate

func (e *E24) Conjugate(api frontend.API, e1 E24) *E24

Conjugate applies Frob**6 (conjugation over Fp6)

func (*E24) CyclotomicSquare

func (e *E24) CyclotomicSquare(api frontend.API, x E24) *E24

Granger-Scott's cyclotomic square squares a Fp24 elt in the cyclotomic group https://eprint.iacr.org/2009/565.pdf, 3.2

func (*E24) CyclotomicSquareCompressed

func (e *E24) CyclotomicSquareCompressed(api frontend.API, x E24) *E24

Karabina's compressed cyclotomic square https://eprint.iacr.org/2010/542.pdf

func (*E24) Decompress

func (e *E24) Decompress(api frontend.API, x E24) *E24

Decompress Karabina's cyclotomic square result

func (*E24) DivUnchecked

func (e *E24) DivUnchecked(api frontend.API, e1, e2 E24) *E24

DivUnchecked e24 elmts

func (*E24) Expt

func (e *E24) Expt(api frontend.API, x E24, exponent uint64) *E24

Expt compute e1**exponent, where the exponent is hardcoded This function is only used for the final expo of the pairing for bls24315, so the exponent is supposed to be hardcoded and on 32 bits.

func (*E24) Frobenius

func (e *E24) Frobenius(api frontend.API, x E24) *E24

Frobenius applies frob to an fp24 elmt

func (*E24) FrobeniusQuad

func (e *E24) FrobeniusQuad(api frontend.API, x E24) *E24

FrobeniusQuad applies frob**4 to an fp24 elmt

func (*E24) FrobeniusSquare

func (e *E24) FrobeniusSquare(api frontend.API, x E24) *E24

FrobeniusSquare applies frob**2 to an fp24 elmt

func (*E24) Inverse

func (e *E24) Inverse(api frontend.API, e1 E24) *E24

Inverse e24 elmts

func (*E24) Mul

func (e *E24) Mul(api frontend.API, e1, e2 E24) *E24

Mul multiplies 2 elmts in Fp24

func (*E24) Mul034By034

func (e *E24) Mul034By034(api frontend.API, d3, d4, c3, c4 E4) *E24

Mul034By034 multiplication of sparse element (1,0,0,c3,c4,0) by sparse element (1,0,0,d3,d4,0)

func (*E24) MulBy034

func (e *E24) MulBy034(api frontend.API, c3, c4 E4) *E24

MulBy034 multiplication by sparse element

func (*E24) Neg

func (e *E24) Neg(api frontend.API, e1 E24) *E24

Neg negates an Fp6elmt

func (*E24) SetOne

func (e *E24) SetOne() *E24

SetOne returns a newly allocated element equal to 1

func (*E24) SetZero

func (e *E24) SetZero() *E24

SetZero returns a newly allocated element equal to 0

func (*E24) Square

func (e *E24) Square(api frontend.API, x E24) *E24

Square squares an element in Fp24

func (*E24) Sub

func (e *E24) Sub(api frontend.API, e1, e2 E24) *E24

Sub substracts 2 elmts in Fp24

type E4

type E4 struct {
	B0, B1 E2
}

E4 element in a quadratic extension

func NewFp4Zero

func NewFp4Zero(api frontend.API) *E4

NewFp4Zero creates a new

func (*E4) Add

func (e *E4) Add(api frontend.API, e1, e2 E4) *E4

Add e4 elmts

func (*E4) AssertIsEqual

func (e *E4) AssertIsEqual(api frontend.API, other E4)

AssertIsEqual constraint self to be equal to other into the given constraint system

func (*E4) Assign

func (e *E4) Assign(a *bls24315.E4)

Assign a value to self (witness assignment)

func (*E4) Conjugate

func (e *E4) Conjugate(api frontend.API, e1 E4) *E4

Conjugate conjugation of an e4 elmt

func (*E4) DivUnchecked

func (e *E4) DivUnchecked(api frontend.API, e1, e2 E4) *E4

DivUnchecked e4 elmts

func (*E4) Double

func (e *E4) Double(api frontend.API, e1 E4) *E4

Double e4 elmt

func (*E4) Inverse

func (e *E4) Inverse(api frontend.API, e1 E4) *E4

Inverse e4 elmts

func (*E4) Mul

func (e *E4) Mul(api frontend.API, e1, e2 E4) *E4

Mul e4 elmts: 5C

func (*E4) MulByFp

func (e *E4) MulByFp(api frontend.API, e1 E4, c interface{}) *E4

MulByFp multiplies an e4 elmt by an fp elmt

func (*E4) MulByNonResidue

func (e *E4) MulByNonResidue(api frontend.API, e1 E4) *E4

MulByNonResidue multiplies an e4 elmt by the imaginary elmt ext.uSquare is the square of the imaginary root

func (*E4) Neg

func (e *E4) Neg(api frontend.API, e1 E4) *E4

Neg negates a e4 elmt

func (*E4) Select

func (e *E4) Select(api frontend.API, b frontend.Variable, r1, r2 E4) *E4

Select sets e to r1 if b=1, r2 otherwise

func (*E4) SetOne

func (e *E4) SetOne() *E4

SetOne returns a newly allocated element equal to 1

func (*E4) SetZero

func (e *E4) SetZero() *E4

SetZero returns a newly allocated element equal to 0

func (*E4) Square

func (e *E4) Square(api frontend.API, x E4) *E4

Square e4 elt

func (*E4) Sub

func (e *E4) Sub(api frontend.API, e1, e2 E4) *E4

Sub e4 elmts

type Extension

type Extension struct {
	// contains filtered or unexported fields
}

Extension stores the non residue elmt for an extension of type Fp->Fp2->Fp4->Fp12->Fp24 (Fp2 = Fp(u), Fp4 = Fp2(v), Fp12 = Fp4(w), Fp24 = Fp6(i))

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL