fields_bw6761

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package fields_bw6761 implements the fields arithmetic of the Fp6 tower used to compute the pairing over the BW6-761 curve.

𝔽p³[u] = 𝔽p/u³+4
𝔽p⁶[v] = 𝔽p²/v²-u

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHints

func GetHints() []solver.Hint

GetHints returns all hint functions used in the package.

Types

type E6

type E6 struct {
	A0, A1, A2, A3, A4, A5 baseEl
}

func FromE6

func FromE6(a *bw6761.E6) E6

type Ext6

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

func NewExt6

func NewExt6(api frontend.API) *Ext6

func (Ext6) Add

func (e Ext6) Add(x, y *E6) *E6

func (Ext6) AssertIsEqual

func (e Ext6) AssertIsEqual(a, b *E6)

func (Ext6) Conjugate

func (e Ext6) Conjugate(x *E6) *E6

func (Ext6) Copy

func (e Ext6) Copy(x *E6) *E6

func (Ext6) CyclotomicSquareKarabina12345

func (e Ext6) CyclotomicSquareKarabina12345(x *E6) *E6

Karabina's compressed cyclotomic square SQR12345 https://eprint.iacr.org/2010/542.pdf Sec. 5.6 with minor modifications to fit our tower

func (Ext6) DecompressKarabina12345

func (e Ext6) DecompressKarabina12345(x *E6) *E6

DecompressKarabina12345 decompresses Karabina's cyclotomic square result SQR12345

func (Ext6) DivUnchecked

func (e Ext6) DivUnchecked(x, y *E6) *E6

func (Ext6) Double

func (e Ext6) Double(x *E6) *E6

func (Ext6) ExpC1

func (e Ext6) ExpC1(z *E6) *E6

ExpC1 set z to z^C1 in E6 and return z ht, hy = 13, 9 C1 = (ht+hy)/2 = 11

func (Ext6) ExpC2

func (e Ext6) ExpC2(z *E6) *E6

ExpC2 set z to z^C2 in E6 and return z ht, hy = 13, 9 C2 = (ht**2+3*hy**2)/4 = 103

func (Ext6) ExpX0Minus1

func (e Ext6) ExpX0Minus1(z *E6) *E6

ExpX0Minus1 set z to z^{x₀-1} in E6 and return z x₀-1 = 9586122913090633728

func (Ext6) ExpX0Minus1Square

func (e Ext6) ExpX0Minus1Square(z *E6) *E6

ExpX0Minus1Square set z to z^{(x₀-1)²} in E6 and return z (x₀-1)² = 91893752504881257682351033800651177984

func (Ext6) ExpX0Plus1

func (e Ext6) ExpX0Plus1(z *E6) *E6

ExpX0Plus1 set z to z^(x₀+1) in E6 and return z x₀+1 = 9586122913090633730

func (Ext6) ExptMinus1Div3

func (e Ext6) ExptMinus1Div3(z *E6) *E6

ExpX0Minus1Div3 set z to z^(x₀-1)/3 in E6 and return z (x₀-1)/3 = 3195374304363544576

func (Ext6) Frobenius

func (e Ext6) Frobenius(x *E6) *E6

Frobenius set z in E6 to Frobenius(x), return z

func (Ext6) Inverse

func (e Ext6) Inverse(x *E6) *E6

func (Ext6) Mul

func (e Ext6) Mul(x, y *E6) *E6

func (Ext6) Mul023By023 added in v1.1.0

func (e Ext6) Mul023By023(d0, d1, c0, c1 *baseEl) [5]*baseEl
Mul023By023 multiplies two E6 sparse element of the form:

E6{A0: c0, A1: 0, A2: c1, A3: 1,  A4: 0,  A5: 0}

and

E6{A0: c0, A1: 0, A2: c1, A3: 1,  A4: 0,  A5: 0}

func (*Ext6) MulBy023 added in v1.1.0

func (e *Ext6) MulBy023(z *E6, c0, c1 *baseEl) *E6

MulBy023 multiplies z by an E6 sparse element of the form

E6{A0: c0, A1: 0, A2: c1, A3: 1,  A4: 0,  A5: 0}

func (*Ext6) MulBy02345 added in v1.1.0

func (e *Ext6) MulBy02345(z *E6, x [5]*baseEl) *E6

MulBy02345 multiplies z by an E6 sparse element of the form

E6{A0: y0, A1: 0, A2: y1, A3: y2, A4: y3, A5: y4},
}

func (Ext6) MulByConstElement added in v1.1.0

func (e Ext6) MulByConstElement(x *E6, y *big.Int) *E6

func (Ext6) MulByElement added in v1.1.0

func (e Ext6) MulByElement(x *E6, y *baseEl) *E6

func (Ext6) Neg added in v1.1.0

func (e Ext6) Neg(x *E6) *E6

func (Ext6) One

func (e Ext6) One() *E6

func (Ext6) Reduce

func (e Ext6) Reduce(x *E6) *E6

func (Ext6) Select

func (e Ext6) Select(selector frontend.Variable, z1, z0 *E6) *E6

func (Ext6) Square

func (e Ext6) Square(x *E6) *E6

func (Ext6) Sub

func (e Ext6) Sub(x, y *E6) *E6

func (Ext6) Zero

func (e Ext6) Zero() *E6

Jump to

Keyboard shortcuts

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