pbc

package
v0.0.0-...-8c4653d Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2017 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const CurveFp254BNb = bls.CurveFp254BNb

CurveFp254BNb -- 254 bit curve

View Source
const CurveFp382_1 = bls.CurveFp382_1

CurveFp382_1 -- 382 bit curve 1

View Source
const CurveFp382_2 = bls.CurveFp382_2

CurveFp382_2 -- 382 bit curve 2

View Source
const Fp254_G1_Base_Seed = "Fp254_G1_Base_Seed"
View Source
const Fp254_G1_Base_Str = "" /* 131-byte string literal not displayed */
View Source
const Fp254_G2_Base_Seed = "Fp254_G2_Base_Seed"
View Source
const Fp254_G2_Base_Str = "" /* 260-byte string literal not displayed */
View Source
const Fp382_1_G1_Base_Seed = "Fp382_1_G1_Base_Seed"
View Source
const Fp382_1_G1_Base_Str = "" /* 195-byte string literal not displayed */
View Source
const Fp382_1_G2_Base_Seed = "Fp382_1_G2_Base_Seed"
View Source
const Fp382_1_G2_Base_Str = "" /* 391-byte string literal not displayed */
View Source
const Fp382_2_G1_Base_Seed = "Fp382_2_G1_Base_Seed"
View Source
const Fp382_2_G1_Base_Str = "" /* 194-byte string literal not displayed */
View Source
const Fp382_2_G2_Base_Seed = "Fp382_2_G2_Base_Seed"
View Source
const Fp382_2_G2_Base_Str = "" /* 388-byte string literal not displayed */

Variables

View Source
var ErrVarTime = errors.New("no constant time implementation available")

Functions

func Curve

func Curve(name string) int

func NewScalar

func NewScalar() abstract.Scalar

NewScalar returns a non initialized abstract.Scalar implementation to use with PBC groups.

Types

type Pairing

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

A Pairing object represents a pairing-based cryptography environment, consisting of two source groups G1 and G2 and a target group GT. All of these groups support the standard Group API operations. In addition, the GT group supports the new Pairing operation, via the PointGT extension to the Point interface. The input groups G1 and G2 may be identical or different, as indicated by the Symmetric() method.

func NewPairing

func NewPairing(curve int) *Pairing

NewPairing returns a new initialized curve. XXX It is currently UNDEFINED to declare multiple pairing since the C lib uses a global variable underneath.

func NewPairingFp254BNb

func NewPairingFp254BNb() *Pairing

func NewPairingFp382_1

func NewPairingFp382_1() *Pairing

func NewPairingFp382_2

func NewPairingFp382_2() *Pairing

func (*Pairing) Cipher

func (p *Pairing) Cipher(key []byte, options ...interface{}) abstract.Cipher

func (*Pairing) G1

func (p *Pairing) G1() abstract.Suite

func (*Pairing) G2

func (p *Pairing) G2() abstract.Suite

func (*Pairing) GT

func (p *Pairing) GT() PairingGroup

func (*Pairing) Hash

func (p *Pairing) Hash() hash.Hash

type PairingGroup

type PairingGroup interface {
	abstract.Suite // Standard Group operations

	PointGT() PointGT // Create new pairing-capable Point
}

Group interface extension to create pairing-capable points.

type PairingSuite

type PairingSuite interface {
	G1() abstract.Group
	G2() abstract.Group
	GT() PairingGroup
}

PairingSuite represents the basic functionalities needed to use pairing based cryptography.

type PointGT

type PointGT interface {
	abstract.Point // Standard Point operations

	// Compute the pairing of two points p1 and p2,
	// which must be in the associated groups G1 and G2 respectively.
	Pairing(p1, p2 abstract.Point) abstract.Point
}

Point interface extension for a point in a pairing target group (GT), which supports the Pairing operation.

Jump to

Keyboard shortcuts

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