idemix

package
v1.5.6-beta2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 4 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// DefaultIdemixCurve is the curve picked by Fabric-CA at default
	DefaultIdemixCurve = "amcl.Fp256bn"
)

Variables

View Source
var (

	// Curves lists all idemix curves that can be picked by Fabric-CA
	Curves = CurveIDs{FP256BN, Gurvy, FP256BNMiracl}
)

Functions

func CurveByID

func CurveByID(id CurveID) *math.Curve

CurveByID returns the Mathlib curve that corresponds to the given CurveID

func InstanceForCurve

func InstanceForCurve(id CurveID) *idemix.Idemix

InstanceForCurve returns an Idemix instance that uses the given CurveID

Types

type CurveID

type CurveID uint8

CurveID defines the index of the possible idemix curves

const (
	// Undefined is used to indicate that no curve has been defined
	Undefined CurveID = iota
	// FP256BN is an AMCL implementation of BN256 and its corresponding finite field
	FP256BN
	// Gurvy is an implementation of gnark-crypto of BN254 and its corresponding finite field
	Gurvy
	// FP256BNMiracl is another AMCL implementation of BN256 and its corresponding finite field
	FP256BNMiracl
)

type CurveIDs

type CurveIDs []CurveID

CurveIDs defines a collection of CurveIDs

func (CurveIDs) ByID

func (cids CurveIDs) ByID(curveID CurveID) string

ByID returns the name of the given CurveID or an empty string

func (CurveIDs) ByName

func (cids CurveIDs) ByName(name string) CurveID

ByName returns CurveID with the corresponding name, or Undefined

func (CurveIDs) Names

func (cids CurveIDs) Names() []string

Names returns the names of the curves according to their order

Jump to

Keyboard shortcuts

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