pairing

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2019 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Suite

type Suite interface {
	G1() kyber.Group
	G2() kyber.Group
	GT() kyber.Group
	Pair(p1, p2 kyber.Point) kyber.Point
	kyber.Encoding
	kyber.HashFactory
	kyber.XOFFactory
	kyber.Random
}

Suite interface represents a triplet of elliptic curve groups (G₁, G₂ and GT) such that there exists a function e(g₁ˣ,g₂ʸ)=gTˣʸ (where gₓ is a generator of the respective group) which is called a pairing.

type SuiteBn256

type SuiteBn256 struct {
	Suite
	kyber.Group
}

SuiteBn256 is an adapter that implements the suites.Suite interface so that bn256 can be used as a common suite to generate key pairs for instance but still preserves the properties of the pairing (e.g. the Pair function).

It's important to note that the Point function will generate a point compatible with public keys only (group G2) where the signature must be used as a point from the group G1.

func NewSuiteBn256

func NewSuiteBn256() *SuiteBn256

NewSuiteBn256 makes a new BN256 suite

func (*SuiteBn256) Point

func (s *SuiteBn256) Point() kyber.Point

Point generates a point from the G2 group that can only be used for public keys

func (*SuiteBn256) PointLen

func (s *SuiteBn256) PointLen() int

PointLen returns the length of a G2 point

func (*SuiteBn256) Scalar

func (s *SuiteBn256) Scalar() kyber.Scalar

Scalar generates a scalar

func (*SuiteBn256) ScalarLen

func (s *SuiteBn256) ScalarLen() int

ScalarLen returns the lenght of a scalar

func (*SuiteBn256) String

func (s *SuiteBn256) String() string

String returns the name of the suite

Directories

Path Synopsis
Package bn256 implements a particular bilinear group.
Package bn256 implements a particular bilinear group.

Jump to

Keyboard shortcuts

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