vss

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deal

type Deal struct {
	// session id of the current protocol run
	SessionId []byte `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// private share of the deal
	Share *share.PrivateShare `protobuf:"bytes,2,opt,name=share,proto3" json:"share,omitempty"`
	// threshold of the secret sharing protocol run
	Threshold uint32 `protobuf:"varint,3,opt,name=threshold,proto3" json:"threshold,omitempty"`
	// commitments of the polynomial used to derive the share
	Commitments          []*crypto.Point `protobuf:"bytes,4,rep,name=commitments,proto3" json:"commitments,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

Deal holds the share created by a dealer for a round of a vss or dkg protocol It is always meant to be encrypted when on transit because it contains private information (the share).

func (*Deal) Descriptor

func (*Deal) Descriptor() ([]byte, []int)

func (*Deal) GetCommitments

func (m *Deal) GetCommitments() []*crypto.Point

func (*Deal) GetSessionId

func (m *Deal) GetSessionId() []byte

func (*Deal) GetShare

func (m *Deal) GetShare() *share.PrivateShare

func (*Deal) GetThreshold

func (m *Deal) GetThreshold() uint32

func (*Deal) ProtoMessage

func (*Deal) ProtoMessage()

func (*Deal) Reset

func (m *Deal) Reset()

func (*Deal) String

func (m *Deal) String() string

func (*Deal) XXX_DiscardUnknown added in v0.3.7

func (m *Deal) XXX_DiscardUnknown()

func (*Deal) XXX_Marshal added in v0.3.7

func (m *Deal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Deal) XXX_Merge added in v0.3.7

func (dst *Deal) XXX_Merge(src proto.Message)

func (*Deal) XXX_Size added in v0.3.7

func (m *Deal) XXX_Size() int

func (*Deal) XXX_Unmarshal added in v0.3.7

func (m *Deal) XXX_Unmarshal(b []byte) error

type EncryptedDeal

type EncryptedDeal struct {
	// ephemereal diffie hellman key
	Dhkey []byte `protobuf:"bytes,1,opt,name=dhkey,proto3" json:"dhkey,omitempty"`
	// schnorr signature over the dhkey by the longterm key of the dealer
	Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	// nonce used in the generation of the ephemereal key
	Nonce []byte `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// cipher of the deal marshalled by protobuf2. TODO: marshal in a
	// more explicit and easier way.
	Cipher               []byte   `protobuf:"bytes,4,opt,name=cipher,proto3" json:"cipher,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

EncryptedDeal holds a share encrypted towards the share holder's longterm public key..

func (*EncryptedDeal) Descriptor

func (*EncryptedDeal) Descriptor() ([]byte, []int)

func (*EncryptedDeal) GetCipher

func (m *EncryptedDeal) GetCipher() []byte

func (*EncryptedDeal) GetDhkey

func (m *EncryptedDeal) GetDhkey() []byte

func (*EncryptedDeal) GetNonce

func (m *EncryptedDeal) GetNonce() []byte

func (*EncryptedDeal) GetSignature

func (m *EncryptedDeal) GetSignature() []byte

func (*EncryptedDeal) ProtoMessage

func (*EncryptedDeal) ProtoMessage()

func (*EncryptedDeal) Reset

func (m *EncryptedDeal) Reset()

func (*EncryptedDeal) String

func (m *EncryptedDeal) String() string

func (*EncryptedDeal) XXX_DiscardUnknown added in v0.3.7

func (m *EncryptedDeal) XXX_DiscardUnknown()

func (*EncryptedDeal) XXX_Marshal added in v0.3.7

func (m *EncryptedDeal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EncryptedDeal) XXX_Merge added in v0.3.7

func (dst *EncryptedDeal) XXX_Merge(src proto.Message)

func (*EncryptedDeal) XXX_Size added in v0.3.7

func (m *EncryptedDeal) XXX_Size() int

func (*EncryptedDeal) XXX_Unmarshal added in v0.3.7

func (m *EncryptedDeal) XXX_Unmarshal(b []byte) error

type Justification

type Justification struct {
	// session id of the current run
	SessionId []byte `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// index of the issuer of this justification
	Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
	// plaintext deal that the complaint response points to
	Deal *Deal `protobuf:"bytes,3,opt,name=deal,proto3" json:"deal,omitempty"`
	// signature over the whole packet
	Signature            []byte   `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Justification enables a dealer to justify that it did not cheat in case some nodes complain about their received deal. It is NOT YET in production use though.

func (*Justification) Descriptor

func (*Justification) Descriptor() ([]byte, []int)

func (*Justification) GetDeal

func (m *Justification) GetDeal() *Deal

func (*Justification) GetIndex

func (m *Justification) GetIndex() uint32

func (*Justification) GetSessionId

func (m *Justification) GetSessionId() []byte

func (*Justification) GetSignature

func (m *Justification) GetSignature() []byte

func (*Justification) ProtoMessage

func (*Justification) ProtoMessage()

func (*Justification) Reset

func (m *Justification) Reset()

func (*Justification) String

func (m *Justification) String() string

func (*Justification) XXX_DiscardUnknown added in v0.3.7

func (m *Justification) XXX_DiscardUnknown()

func (*Justification) XXX_Marshal added in v0.3.7

func (m *Justification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Justification) XXX_Merge added in v0.3.7

func (dst *Justification) XXX_Merge(src proto.Message)

func (*Justification) XXX_Size added in v0.3.7

func (m *Justification) XXX_Size() int

func (*Justification) XXX_Unmarshal added in v0.3.7

func (m *Justification) XXX_Unmarshal(b []byte) error

type Response

type Response struct {
	// session id of the
	SessionId []byte `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// index of the verifier issuing the response
	Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
	// status of the response. false = complaint, true = approval
	Status bool `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"`
	// signature over the packet using the longterm's key of the participant at
	// the given index
	Signature            []byte   `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Response is the response of a participant after having received an encrypted deal. It is meant to be broadcasted to every participants.

func (*Response) Descriptor

func (*Response) Descriptor() ([]byte, []int)

func (*Response) GetIndex

func (m *Response) GetIndex() uint32

func (*Response) GetSessionId

func (m *Response) GetSessionId() []byte

func (*Response) GetSignature

func (m *Response) GetSignature() []byte

func (*Response) GetStatus

func (m *Response) GetStatus() bool

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

func (*Response) XXX_DiscardUnknown added in v0.3.7

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal added in v0.3.7

func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Response) XXX_Merge added in v0.3.7

func (dst *Response) XXX_Merge(src proto.Message)

func (*Response) XXX_Size added in v0.3.7

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal added in v0.3.7

func (m *Response) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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