Documentation ¶
Index ¶
- Constants
- type E3
- func (z *E3) Add(x, y *E3) *E3
- func (z *E3) Clone() *E3
- func (z *E3) Conjugate(x *E3) *E3
- func (z *E3) Double(x *E3) *E3
- func (z *E3) Equal(x *E3) bool
- func (z *E3) FromMont() *E3
- func (z *E3) Inverse(x *E3) *E3
- func (z *E3) IsZero() bool
- func (z *E3) Mul(x, y *E3) *E3
- func (z *E3) MulAssign(x *E3) *E3
- func (z *E3) MulBy01(c0, c1 *fp.Element) *E3
- func (z *E3) MulBy1(c1 *fp.Element) *E3
- func (z *E3) MulByElement(x *E3, y *fp.Element) *E3
- func (z *E3) MulByNonResidue(x *E3) *E3
- func (z *E3) Neg(x *E3) *E3
- func (z *E3) Set(x *E3) *E3
- func (z *E3) SetOne() *E3
- func (z *E3) SetRandom() (*E3, error)
- func (z *E3) SetString(s1, s2, s3 string) *E3
- func (z *E3) SetZero() *E3
- func (z *E3) Square(x *E3) *E3
- func (z *E3) String() string
- func (z *E3) Sub(x, y *E3) *E3
- func (z *E3) ToMont() *E3
- type E6
- func (z *E6) Add(x, y *E6) *E6
- func (z *E6) Bytes() (r [SizeOfGT]byte)
- func (z *E6) Conjugate(x *E6) *E6
- func (z *E6) CyclotomicSquare(x *E6) *E6
- func (z *E6) CyclotomicSquareCompressed(x *E6) *E6
- func (z *E6) Decompress(x *E6) *E6
- func (z *E6) Double(x *E6) *E6
- func (z *E6) Equal(x *E6) bool
- func (z *E6) Exp(x *E6, e big.Int) *E6
- func (z *E6) Expt(x *E6) *E6
- func (z *E6) Frobenius(x *E6) *E6
- func (z *E6) FromMont() *E6
- func (z *E6) Inverse(x *E6) *E6
- func (z *E6) InverseUnitary(x *E6) *E6
- func (z *E6) IsInSubGroup() bool
- func (z *E6) Mul(x, y *E6) *E6
- func (z *E6) MulBy014(c0, c1, c4 *fp.Element) *E6
- func (z *E6) Set(x *E6) *E6
- func (z *E6) SetBytes(e []byte) error
- func (z *E6) SetOne() *E6
- func (z *E6) SetRandom() (*E6, error)
- func (z *E6) SetString(s0, s1, s2, s3, s4, s5 string) *E6
- func (z *E6) Square(x *E6) *E6
- func (z *E6) String() string
- func (z *E6) Sub(x, y *E6) *E6
- func (z *E6) ToMont() *E6
Constants ¶
const SizeOfGT = sizeOfFp * 6
SizeOfGT represents the size in bytes that a GT element need in binary form
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type E3 ¶
E3 is a degree-three finite field extension of fp2
func (*E3) Equal ¶
Equal returns true if z equals x, fasle otherwise TODO can this be deleted? Should be able to use == operator instead
func (*E3) MulByElement ¶
MulByElement multiplies an element in E3 by an element in fp
func (*E3) MulByNonResidue ¶
MulByNonResidue mul x by (0,1,0)
type E6 ¶
type E6 struct {
B0, B1 E3
}
E6 is a degree two finite field extension of fp3
func (*E6) Bytes ¶
Bytes returns the regular (non montgomery) value of z as a big-endian byte array. z.C1.B2.A1 | z.C1.B2.A0 | z.C1.B1.A1 | ...
func (*E6) CyclotomicSquare ¶
Granger-Scott's cyclotomic square https://eprint.iacr.org/2009/565.pdf, 3.2
func (*E6) CyclotomicSquareCompressed ¶ added in v0.5.1
Karabina's compressed cyclotomic square https://eprint.iacr.org/2010/542.pdf Th. 3.2 with minor modifications to fit our tower
func (*E6) Decompress ¶ added in v0.5.1
Decompress Karabina's cyclotomic square result
func (*E6) InverseUnitary ¶
InverseUnitary inverse a unitary element
func (*E6) IsInSubGroup ¶
IsInSubGroup ensures GT/E6 is in correct sugroup
func (*E6) SetBytes ¶
SetBytes interprets e as the bytes of a big-endian GT sets z to that value (in Montgomery form), and returns z. z.C1.B2.A1 | z.C1.B2.A0 | z.C1.B1.A1 | ...