generator

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateBaseFields

func GenerateBaseFields(conf CurveConfig) error

GenerateBaseFields generates the base field fr and fp

func GenerateDoc added in v0.3.0

func GenerateDoc(conf CurveConfig) error

GenerateDoc generates package level doc

func GenerateFq12over6over2

func GenerateFq12over6over2(conf CurveConfig) error

GenerateFq12over6over2 generates a tower 2->6->12 over fp

func GenerateMultiExpHelpers added in v0.3.0

func GenerateMultiExpHelpers(conf CurveConfig) error

GenerateMultiExpHelpers generates multi exp helpers functions

func GeneratePairingTests added in v0.3.0

func GeneratePairingTests(conf CurveConfig) error

GeneratePairingTests generates elliptic curve arithmetic

func GeneratePoint

func GeneratePoint(_conf CurveConfig, coordType, pointName string) error

GeneratePoint generates elliptic curve arithmetic

Types

type CurveConfig

type CurveConfig struct {
	CurveName        string
	RTorsion         string
	RBitLen          int
	FpModulus        string
	OutputDir        string
	GLV              bool  // scalar mulitplication using GLV
	CofactorCleaning bool  // flag telling if the Cofactor cleaning is available
	CRange           []int // multiexp bucket method: generate inner methods (with const arrays) for each c
	PMod4            int   // 3 or 1
}

CurveConfig describes parameters of the curve useful for the templates

func NewCurveConfig added in v0.3.0

func NewCurveConfig(name, rTorsion, fpModulus string, glv bool, cc bool) CurveConfig

NewCurveConfig returns a struct initialized with the parameters needed for template generation (internal use in gurvy)

Jump to

Keyboard shortcuts

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