Documentation
¶
Overview ¶
converter implements some routines to go back and forth from a protobuf point and scalar to a kyber Point and Scalar interface.
Package crypto is a generated protocol buffer package.
It is generated from these files:
crypto/element.proto
It has these top-level messages:
Point Scalar
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GroupID_name = map[int32]string{
0: "Ed25519",
21: "BN256_G1",
22: "BN256_G2",
23: "BN256_GT",
}
View Source
var GroupID_value = map[string]int32{
"Ed25519": 0,
"BN256_G1": 21,
"BN256_G2": 22,
"BN256_GT": 23,
}
Functions ¶
func ProtoToKyberPoint ¶
func ProtoToKyberPoint(p *ProtobufPoint) (kyber.Point, error)
func ProtoToKyberScalar ¶
func ProtoToKyberScalar(p *ProtobufScalar) (kyber.Scalar, error)
Types ¶
type GroupID ¶
type GroupID int32
GroupID is an enumeration holding all possible groups that can be marshalled / unmarshalled, supported by the kyber library
func (GroupID) EnumDescriptor ¶
type Point ¶
type Point struct { Gid GroupID `protobuf:"varint,1,opt,name=gid,enum=element.GroupID" json:"gid,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` }
Point represents a point on a curve,i.e. a public key, a commitment etc It is parametrized by its group.
func (*Point) Descriptor ¶
func (*Point) ProtoMessage ¶
func (*Point) ProtoMessage()
type ProtobufPoint ¶
type ProtobufPoint = Point
func KyberToProtoPoint ¶
func KyberToProtoPoint(p kyber.Point) (*ProtobufPoint, error)
type ProtobufScalar ¶
type ProtobufScalar = Scalar
func KyberToProtoScalar ¶
func KyberToProtoScalar(s kyber.Scalar) (*ProtobufScalar, error)
type Scalar ¶
type Scalar struct { Gid GroupID `protobuf:"varint,1,opt,name=gid,enum=element.GroupID" json:"gid,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` }
Scalar represents a scalar on the field attached to the group. It is parametrized by the group using this field (1-1 mapping).
func (*Scalar) Descriptor ¶
func (*Scalar) ProtoMessage ¶
func (*Scalar) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.