Documentation ¶
Overview ¶
Package drand is a generated protocol buffer package.
It is generated from these files:
drand/beacon.proto drand/client.proto
It has these top-level messages:
BeaconRequest BeaconResponse PublicRandRequest PublicRandResponse PrivateRandRequest PrivateRandResponse ECIESObject
Index ¶
- func RegisterBeaconServer(s *grpc.Server, srv BeaconServer)
- func RegisterRandomnessServer(s *grpc.Server, srv RandomnessServer)
- type BeaconClient
- type BeaconRequest
- type BeaconResponse
- type BeaconServer
- type ECIESObject
- type PrivateRandRequest
- type PrivateRandResponse
- type PublicRandRequest
- type PublicRandResponse
- func (*PublicRandResponse) Descriptor() ([]byte, []int)
- func (m *PublicRandResponse) GetPreviousRand() []byte
- func (m *PublicRandResponse) GetRandomness() []byte
- func (m *PublicRandResponse) GetRound() uint64
- func (*PublicRandResponse) ProtoMessage()
- func (m *PublicRandResponse) Reset()
- func (m *PublicRandResponse) String() string
- type RandomnessClient
- type RandomnessServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterBeaconServer ¶
func RegisterBeaconServer(s *grpc.Server, srv BeaconServer)
func RegisterRandomnessServer ¶
func RegisterRandomnessServer(s *grpc.Server, srv RandomnessServer)
Types ¶
type BeaconClient ¶
type BeaconClient interface {
NewBeacon(ctx context.Context, in *BeaconRequest, opts ...grpc.CallOption) (*BeaconResponse, error)
}
func NewBeaconClient ¶
func NewBeaconClient(cc *grpc.ClientConn) BeaconClient
type BeaconRequest ¶
type BeaconRequest struct { Round uint64 `protobuf:"varint,1,opt,name=round" json:"round,omitempty"` PreviousRand []byte `protobuf:"bytes,2,opt,name=previous_rand,json=previousRand,proto3" json:"previous_rand,omitempty"` PartialRand []byte `protobuf:"bytes,3,opt,name=partial_rand,json=partialRand,proto3" json:"partial_rand,omitempty"` }
BeaconRequest holds a link to a previous signature, a timestamp and the partial signature for this beacon. All participants send and collects many of theses partial beacon packets to recreate locally one beacon
func (*BeaconRequest) Descriptor ¶
func (*BeaconRequest) Descriptor() ([]byte, []int)
func (*BeaconRequest) GetPartialRand ¶
func (m *BeaconRequest) GetPartialRand() []byte
func (*BeaconRequest) GetPreviousRand ¶
func (m *BeaconRequest) GetPreviousRand() []byte
func (*BeaconRequest) GetRound ¶
func (m *BeaconRequest) GetRound() uint64
func (*BeaconRequest) ProtoMessage ¶
func (*BeaconRequest) ProtoMessage()
func (*BeaconRequest) Reset ¶
func (m *BeaconRequest) Reset()
func (*BeaconRequest) String ¶
func (m *BeaconRequest) String() string
type BeaconResponse ¶
type BeaconResponse struct {
PartialRand []byte `protobuf:"bytes,1,opt,name=partial_rand,json=partialRand,proto3" json:"partial_rand,omitempty"`
}
func (*BeaconResponse) Descriptor ¶
func (*BeaconResponse) Descriptor() ([]byte, []int)
func (*BeaconResponse) GetPartialRand ¶
func (m *BeaconResponse) GetPartialRand() []byte
func (*BeaconResponse) ProtoMessage ¶
func (*BeaconResponse) ProtoMessage()
func (*BeaconResponse) Reset ¶
func (m *BeaconResponse) Reset()
func (*BeaconResponse) String ¶
func (m *BeaconResponse) String() string
type BeaconServer ¶
type BeaconServer interface {
NewBeacon(context.Context, *BeaconRequest) (*BeaconResponse, error)
}
type ECIESObject ¶
type ECIESObject struct { Ephemeral *element.Point `protobuf:"bytes,1,opt,name=ephemeral" json:"ephemeral,omitempty"` Ciphertext []byte `protobuf:"bytes,2,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"` Nonce []byte `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"` }
func (*ECIESObject) Descriptor ¶
func (*ECIESObject) Descriptor() ([]byte, []int)
func (*ECIESObject) GetCiphertext ¶
func (m *ECIESObject) GetCiphertext() []byte
func (*ECIESObject) GetEphemeral ¶
func (m *ECIESObject) GetEphemeral() *element.Point
func (*ECIESObject) GetNonce ¶
func (m *ECIESObject) GetNonce() []byte
func (*ECIESObject) ProtoMessage ¶
func (*ECIESObject) ProtoMessage()
func (*ECIESObject) Reset ¶
func (m *ECIESObject) Reset()
func (*ECIESObject) String ¶
func (m *ECIESObject) String() string
type PrivateRandRequest ¶
type PrivateRandRequest struct { // Request must contains a public key towards which to encrypt the private // randomness. Request *ECIESObject `protobuf:"bytes,1,opt,name=request" json:"request,omitempty"` }
PrivateRandRequest is the message to send when requesting a private random value.
func (*PrivateRandRequest) Descriptor ¶
func (*PrivateRandRequest) Descriptor() ([]byte, []int)
func (*PrivateRandRequest) GetRequest ¶
func (m *PrivateRandRequest) GetRequest() *ECIESObject
func (*PrivateRandRequest) ProtoMessage ¶
func (*PrivateRandRequest) ProtoMessage()
func (*PrivateRandRequest) Reset ¶
func (m *PrivateRandRequest) Reset()
func (*PrivateRandRequest) String ¶
func (m *PrivateRandRequest) String() string
type PrivateRandResponse ¶
type PrivateRandResponse struct { // Response contains the private randomness encrypted towards the client's // request key. Response *ECIESObject `protobuf:"bytes,1,opt,name=response" json:"response,omitempty"` }
func (*PrivateRandResponse) Descriptor ¶
func (*PrivateRandResponse) Descriptor() ([]byte, []int)
func (*PrivateRandResponse) GetResponse ¶
func (m *PrivateRandResponse) GetResponse() *ECIESObject
func (*PrivateRandResponse) ProtoMessage ¶
func (*PrivateRandResponse) ProtoMessage()
func (*PrivateRandResponse) Reset ¶
func (m *PrivateRandResponse) Reset()
func (*PrivateRandResponse) String ¶
func (m *PrivateRandResponse) String() string
type PublicRandRequest ¶
type PublicRandRequest struct { // round uniquely identifies a beacon. If round == 0, then the response will // contain the last. // XXX better ways to do that... Round uint64 `protobuf:"varint,1,opt,name=round" json:"round,omitempty"` }
PublicRandRequest requests a public random value that has been generated in a unbiasable way and verifiable.
func (*PublicRandRequest) Descriptor ¶
func (*PublicRandRequest) Descriptor() ([]byte, []int)
func (*PublicRandRequest) GetRound ¶
func (m *PublicRandRequest) GetRound() uint64
func (*PublicRandRequest) ProtoMessage ¶
func (*PublicRandRequest) ProtoMessage()
func (*PublicRandRequest) Reset ¶
func (m *PublicRandRequest) Reset()
func (*PublicRandRequest) String ¶
func (m *PublicRandRequest) String() string
type PublicRandResponse ¶
type PublicRandResponse struct { Round uint64 `protobuf:"varint,1,opt,name=round" json:"round,omitempty"` PreviousRand []byte `protobuf:"bytes,2,opt,name=previous_rand,json=previousRand,proto3" json:"previous_rand,omitempty"` Randomness []byte `protobuf:"bytes,3,opt,name=randomness,proto3" json:"randomness,omitempty"` }
PublicRandResponse holds a signature which is the random value. It can be verified thanks to the distributed public key of the nodes that have ran the DKG protocol and is unbiasable. The randomness can be verified using the BLS verification routine with the message "round || previous_rand".
func (*PublicRandResponse) Descriptor ¶
func (*PublicRandResponse) Descriptor() ([]byte, []int)
func (*PublicRandResponse) GetPreviousRand ¶
func (m *PublicRandResponse) GetPreviousRand() []byte
func (*PublicRandResponse) GetRandomness ¶
func (m *PublicRandResponse) GetRandomness() []byte
func (*PublicRandResponse) GetRound ¶
func (m *PublicRandResponse) GetRound() uint64
func (*PublicRandResponse) ProtoMessage ¶
func (*PublicRandResponse) ProtoMessage()
func (*PublicRandResponse) Reset ¶
func (m *PublicRandResponse) Reset()
func (*PublicRandResponse) String ¶
func (m *PublicRandResponse) String() string
type RandomnessClient ¶
type RandomnessClient interface { Public(ctx context.Context, in *PublicRandRequest, opts ...grpc.CallOption) (*PublicRandResponse, error) Private(ctx context.Context, in *PrivateRandRequest, opts ...grpc.CallOption) (*PrivateRandResponse, error) }
func NewRandomnessClient ¶
func NewRandomnessClient(cc *grpc.ClientConn) RandomnessClient
type RandomnessServer ¶
type RandomnessServer interface { Public(context.Context, *PublicRandRequest) (*PublicRandResponse, error) Private(context.Context, *PrivateRandRequest) (*PrivateRandResponse, error) }