Documentation ¶
Index ¶
- func DefaultDomainG1() []byte
- func DefaultDomainG2() []byte
- func NewBLS12381Suite() pairing.Suite
- func NewBLS12381SuiteWithDST(DomainG1, DomainG2 []byte) pairing.Suite
- func NewGroupG1(dst ...byte) kyber.Group
- func NewGroupG2(dst ...byte) kyber.Group
- func NewGroupGT() kyber.Group
- func NewKyberScalar() kyber.Scalar
- type GroupChecker
- type KyberG1
- func (k *KyberG1) Add(a, b kyber.Point) kyber.Point
- func (k *KyberG1) Base() kyber.Point
- func (k *KyberG1) Clone() kyber.Point
- func (k *KyberG1) Data() ([]byte, error)
- func (k *KyberG1) Embed(data []byte, rand cipher.Stream) kyber.Point
- func (k *KyberG1) EmbedLen() int
- func (k *KyberG1) Equal(k2 kyber.Point) bool
- func (k *KyberG1) Hash(m []byte) kyber.Point
- func (k *KyberG1) IsInCorrectGroup() bool
- func (k *KyberG1) MarshalBinary() ([]byte, error)
- func (k *KyberG1) MarshalSize() int
- func (k *KyberG1) MarshalTo(w io.Writer) (int, error)
- func (k *KyberG1) Mul(s kyber.Scalar, q kyber.Point) kyber.Point
- func (k *KyberG1) Neg(a kyber.Point) kyber.Point
- func (k *KyberG1) Null() kyber.Point
- func (k *KyberG1) Pick(rand cipher.Stream) kyber.Point
- func (k *KyberG1) Set(q kyber.Point) kyber.Point
- func (k *KyberG1) String() string
- func (k *KyberG1) Sub(a, b kyber.Point) kyber.Point
- func (k *KyberG1) UnmarshalBinary(buff []byte) error
- func (k *KyberG1) UnmarshalFrom(r io.Reader) (int, error)
- type KyberG2
- func (k *KyberG2) Add(a, b kyber.Point) kyber.Point
- func (k *KyberG2) Base() kyber.Point
- func (k *KyberG2) Clone() kyber.Point
- func (k *KyberG2) Data() ([]byte, error)
- func (k *KyberG2) Embed(data []byte, rand cipher.Stream) kyber.Point
- func (k *KyberG2) EmbedLen() int
- func (k *KyberG2) Equal(k2 kyber.Point) bool
- func (k *KyberG2) Hash(m []byte) kyber.Point
- func (k *KyberG2) IsInCorrectGroup() bool
- func (k *KyberG2) MarshalBinary() ([]byte, error)
- func (k *KyberG2) MarshalSize() int
- func (k *KyberG2) MarshalTo(w io.Writer) (int, error)
- func (k *KyberG2) Mul(s kyber.Scalar, q kyber.Point) kyber.Point
- func (k *KyberG2) Neg(a kyber.Point) kyber.Point
- func (k *KyberG2) Null() kyber.Point
- func (k *KyberG2) Pick(rand cipher.Stream) kyber.Point
- func (k *KyberG2) Set(q kyber.Point) kyber.Point
- func (k *KyberG2) String() string
- func (k *KyberG2) Sub(a, b kyber.Point) kyber.Point
- func (k *KyberG2) UnmarshalBinary(buff []byte) error
- func (k *KyberG2) UnmarshalFrom(r io.Reader) (int, error)
- type KyberGT
- func (k *KyberGT) Add(a, b kyber.Point) kyber.Point
- func (k *KyberGT) Base() kyber.Point
- func (k *KyberGT) Clone() kyber.Point
- func (k *KyberGT) Data() ([]byte, error)
- func (k *KyberGT) Embed(data []byte, rand cipher.Stream) kyber.Point
- func (k *KyberGT) EmbedLen() int
- func (k *KyberGT) Equal(kk kyber.Point) bool
- func (k *KyberGT) MarshalBinary() ([]byte, error)
- func (k *KyberGT) MarshalSize() int
- func (k *KyberGT) MarshalTo(w io.Writer) (int, error)
- func (k *KyberGT) Mul(s kyber.Scalar, q kyber.Point) kyber.Point
- func (k *KyberGT) Neg(q kyber.Point) kyber.Point
- func (k *KyberGT) Null() kyber.Point
- func (k *KyberGT) Pick(rand cipher.Stream) kyber.Point
- func (k *KyberGT) Set(q kyber.Point) kyber.Point
- func (k *KyberGT) String() string
- func (k *KyberGT) Sub(a, b kyber.Point) kyber.Point
- func (k *KyberGT) UnmarshalBinary(buf []byte) error
- func (k *KyberGT) UnmarshalFrom(r io.Reader) (int, error)
- type Suite
- func (s *Suite) G1() kyber.Group
- func (s *Suite) G2() kyber.Group
- func (s *Suite) GT() kyber.Group
- func (s *Suite) Hash() hash.Hash
- func (s *Suite) New(t reflect.Type) interface{}
- func (s *Suite) Pair(p1, p2 kyber.Point) kyber.Point
- func (s *Suite) RandomStream() cipher.Stream
- func (s *Suite) Read(r io.Reader, objs ...interface{}) error
- func (s *Suite) SetDomainG1(dst []byte)
- func (s *Suite) SetDomainG2(dst []byte)
- func (s *Suite) ValidatePairing(p1, p2, p3, p4 kyber.Point) bool
- func (s *Suite) Write(w io.Writer, objs ...interface{}) error
- func (s *Suite) XOF(seed []byte) kyber.XOF
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDomainG1 ¶ added in v0.3.0
func DefaultDomainG1() []byte
func DefaultDomainG2 ¶ added in v0.3.0
func DefaultDomainG2() []byte
func NewBLS12381Suite ¶
NewBLS12381Suite is the same as calling NewBLS12381SuiteWithDST(nil, nil): it uses the default domain separation tags for its Hash To Curve functions.
func NewBLS12381SuiteWithDST ¶ added in v0.3.0
NewBLS12381SuiteWithDST allows you to set your own domain separation tags to be used by the Hash To Curve functions. Since the DST shouldn't be 0 len, if you provide nil or a 0 len byte array, it will use the RFC default values.
func NewGroupG1 ¶
func NewGroupG2 ¶
func NewGroupGT ¶
func NewKyberScalar ¶
Types ¶
type GroupChecker ¶
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 KyberG1 ¶
type KyberG1 struct { kyber.Point kyber.HashablePoint // contains filtered or unexported fields }
KyberG1 is a kyber.Point holding a G1 point on BLS12-381 curve
func NullKyberG1 ¶
func (*KyberG1) IsInCorrectGroup ¶
func (*KyberG1) MarshalBinary ¶
MarshalBinary returns a compressed point, without any domain separation tag information
func (*KyberG1) MarshalSize ¶
func (*KyberG1) MarshalTo ¶
MarshalTo writes a compressed point to the Writer, without any domain separation tag information
func (*KyberG1) UnmarshalBinary ¶
UnmarshalBinary populates the point from a compressed point representation.
type KyberG2 ¶
type KyberG2 struct {
// contains filtered or unexported fields
}
KyberG2 is a kyber.Point holding a G2 point on BLS12-381 curve
func NullKyberG2 ¶
func (*KyberG2) IsInCorrectGroup ¶
func (*KyberG2) MarshalBinary ¶
MarshalBinary returns a compressed point, without any domain separation tag information
func (*KyberG2) MarshalSize ¶
func (*KyberG2) MarshalTo ¶
MarshalTo writes a compressed point to the Writer, without any domain separation tag information
func (*KyberG2) UnmarshalBinary ¶
UnmarshalBinary populates the point from a compressed point representation.
type KyberGT ¶
type KyberGT struct {
// contains filtered or unexported fields
}
func (*KyberGT) MarshalBinary ¶
func (*KyberGT) MarshalSize ¶
func (*KyberGT) UnmarshalBinary ¶
type Suite ¶
type Suite struct {
// contains filtered or unexported fields
}
func (*Suite) RandomStream ¶
RandomStream returns a cipher.Stream which corresponds to a key stream from crypto/rand.
func (*Suite) SetDomainG1 ¶ added in v0.3.0
func (*Suite) SetDomainG2 ¶ added in v0.3.0
func (*Suite) ValidatePairing ¶
ValidatePairing implements the `pairing.Suite` interface