bls12381

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2020 License: MPL-2.0 Imports: 15 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Domain = []byte("BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_")

Domain comes from the ciphersuite used by the RFC of this name compatible with the paired library > v18

Functions

func NewBLS12381Suite

func NewBLS12381Suite(seed []byte) vss.Suite

func NewGroupG1

func NewGroupG1() kyber.Group

func NewGroupG2

func NewGroupG2() kyber.Group

func NewGroupGT

func NewGroupGT() kyber.Group

func NewKyberScalar

func NewKyberScalar() kyber.Scalar

Types

type GroupChecker

type GroupChecker interface {
	kyber.Point
	IsInCorrectGroup() bool
}

GroupChecker allows to verify if a Point is in the correct group or not. For curves which don't have a prime order, we need to only consider the points lying in the subgroup of prime order. That check returns true if the point is correct or not.

type Suite

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

func (*Suite) G1

func (s *Suite) G1() kyber.Group

func (*Suite) G2

func (s *Suite) G2() kyber.Group

func (*Suite) GT

func (s *Suite) GT() kyber.Group

func (*Suite) Hash

func (s *Suite) Hash() hash.Hash

Hash returns a newly instantiated sha256 hash function.

func (*Suite) New

func (s *Suite) New(t reflect.Type) interface{}

New implements the kyber.Encoding interface.

func (*Suite) Pair

func (s *Suite) Pair(p1, p2 kyber.Point) kyber.Point

func (*Suite) Point

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

func (*Suite) PointLen

func (s *Suite) PointLen() int

func (*Suite) RandomStream

func (s *Suite) RandomStream() cipher.Stream

RandomStream returns a cipher.Stream which corresponds to a key stream from crypto/rand.

func (*Suite) Read

func (s *Suite) Read(r io.Reader, objs ...interface{}) error

Read is the default implementation of kyber.Encoding interface Read.

func (*Suite) Scalar

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

func (*Suite) ScalarLen

func (s *Suite) ScalarLen() int

func (*Suite) String

func (s *Suite) String() string

func (*Suite) ValidatePairing

func (s *Suite) ValidatePairing(p1, p2, p3, p4 kyber.Point) bool

ValidatePairing implements the `pairing.Suite` interface

func (*Suite) Write

func (s *Suite) Write(w io.Writer, objs ...interface{}) error

Write is the default implementation of kyber.Encoding interface Write.

func (*Suite) XOF

func (s *Suite) XOF(seed []byte) kyber.XOF

XOF returns a newlly instantiated blake2xb XOF function.

Jump to

Keyboard shortcuts

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