kyber: go.dedis.ch/kyber/pairing Index | Files | Directories

package pairing

import "go.dedis.ch/kyber/pairing"

Index

Package Files

adapter.go pairing.go

type Suite Uses

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 Uses

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 Uses

func NewSuiteBn256() *SuiteBn256

NewSuiteBn256 makes a new BN256 suite

func (*SuiteBn256) Point Uses

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 Uses

func (s *SuiteBn256) PointLen() int

PointLen returns the length of a G2 point

func (*SuiteBn256) Scalar Uses

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

Scalar generates a scalar

func (*SuiteBn256) ScalarLen Uses

func (s *SuiteBn256) ScalarLen() int

ScalarLen returns the lenght of a scalar

func (*SuiteBn256) String Uses

func (s *SuiteBn256) String() string

String returns the name of the suite

Directories

PathSynopsis
bn256Package bn256 implements a particular bilinear group.

Package pairing imports 2 packages (graph). Updated 2019-11-04. Refresh now. Tools for package owners.