g2

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	G2BASE_LIMBS int = 24
)

Variables

This section is empty.

Functions

func G2AffineFromMontgomery

func G2AffineFromMontgomery(points core.HostOrDeviceSlice) runtime.EIcicleError

func G2AffineToMontgomery

func G2AffineToMontgomery(points core.HostOrDeviceSlice) runtime.EIcicleError

func G2GenerateAffinePoints

func G2GenerateAffinePoints(size int) core.HostSlice[G2Affine]

func G2GenerateProjectivePoints

func G2GenerateProjectivePoints(size int) core.HostSlice[G2Projective]

func G2GetDefaultMSMConfig

func G2GetDefaultMSMConfig() core.MSMConfig

func G2PrecomputeBases

func G2PrecomputeBases(bases core.HostOrDeviceSlice, cfg *core.MSMConfig, outputBases core.DeviceSlice) runtime.EIcicleError

func G2ProjectiveFromMontgomery

func G2ProjectiveFromMontgomery(points core.HostOrDeviceSlice) runtime.EIcicleError

func G2ProjectiveToMontgomery

func G2ProjectiveToMontgomery(points core.HostOrDeviceSlice) runtime.EIcicleError

Types

type G2Affine

type G2Affine struct {
	X, Y G2BaseField
}

func G2AffineFromProjective

func G2AffineFromProjective(p *G2Projective) G2Affine

func (G2Affine) AsPointer

func (a G2Affine) AsPointer() *uint32

func (*G2Affine) FromLimbs

func (a *G2Affine) FromLimbs(x, y []uint32) G2Affine

func (G2Affine) Size

func (a G2Affine) Size() int

func (G2Affine) ToProjective

func (a G2Affine) ToProjective() G2Projective

func (*G2Affine) Zero

func (a *G2Affine) Zero() G2Affine

type G2BaseField

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

func (G2BaseField) AsPointer

func (f G2BaseField) AsPointer() *uint32

func (*G2BaseField) FromBytesLittleEndian

func (f *G2BaseField) FromBytesLittleEndian(bytes []byte) G2BaseField

func (*G2BaseField) FromLimbs

func (f *G2BaseField) FromLimbs(limbs []uint32) G2BaseField

func (*G2BaseField) FromUint32

func (f *G2BaseField) FromUint32(v uint32) G2BaseField

func (G2BaseField) GetLimbs

func (f G2BaseField) GetLimbs() []uint32

func (G2BaseField) Len

func (f G2BaseField) Len() int

func (*G2BaseField) One

func (f *G2BaseField) One() G2BaseField

func (G2BaseField) Size

func (f G2BaseField) Size() int

func (G2BaseField) ToBytesLittleEndian

func (f G2BaseField) ToBytesLittleEndian() []byte

func (*G2BaseField) Zero

func (f *G2BaseField) Zero() G2BaseField

type G2Projective

type G2Projective struct {
	X, Y, Z G2BaseField
}

func (G2Projective) AsPointer

func (p G2Projective) AsPointer() *uint32

func (*G2Projective) FromAffine

func (p *G2Projective) FromAffine(a G2Affine) G2Projective

func (*G2Projective) FromLimbs

func (p *G2Projective) FromLimbs(x, y, z []uint32) G2Projective

func (G2Projective) ProjectiveEq

func (p G2Projective) ProjectiveEq(p2 *G2Projective) bool

func (G2Projective) Size

func (p G2Projective) Size() int

func (*G2Projective) ToAffine

func (p *G2Projective) ToAffine() G2Affine

func (*G2Projective) Zero

func (p *G2Projective) Zero() G2Projective

Jump to

Keyboard shortcuts

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