Documentation ¶
Index ¶
Constants ¶
const CurveFp254BNb = bls.CurveFp254BNb
CurveFp254BNb -- 254 bit curve
const CurveFp382_1 = bls.CurveFp382_1
CurveFp382_1 -- 382 bit curve 1
const CurveFp382_2 = bls.CurveFp382_2
CurveFp382_2 -- 382 bit curve 2
const Fp254_G1_Base_Seed = "Fp254_G1_Base_Seed"
const Fp254_G1_Base_Str = "" /* 131-byte string literal not displayed */
const Fp254_G2_Base_Seed = "Fp254_G2_Base_Seed"
const Fp254_G2_Base_Str = "" /* 260-byte string literal not displayed */
const Fp382_1_G1_Base_Seed = "Fp382_1_G1_Base_Seed"
const Fp382_1_G1_Base_Str = "" /* 195-byte string literal not displayed */
const Fp382_1_G2_Base_Seed = "Fp382_1_G2_Base_Seed"
const Fp382_1_G2_Base_Str = "" /* 391-byte string literal not displayed */
const Fp382_2_G1_Base_Seed = "Fp382_2_G1_Base_Seed"
const Fp382_2_G1_Base_Str = "" /* 194-byte string literal not displayed */
const Fp382_2_G2_Base_Seed = "Fp382_2_G2_Base_Seed"
const Fp382_2_G2_Base_Str = "" /* 388-byte string literal not displayed */
Variables ¶
var ErrVarTime = errors.New("no constant time implementation available")
Functions ¶
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 ¶
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) GT ¶
func (p *Pairing) GT() PairingGroup
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.