Documentation ¶
Index ¶
- func CommitteeSize(totalNodeCount int64, failedTotalNodesPercentage int64, failureChance big.Rat) int
- func Exp(x kyber.Scalar, exponent int) kyber.Scalar
- func IsNodeInConfig(id int32, expectedPubKey []byte, nodes committee.Nodes) (int, error)
- func ReconstructShare(x2y Index2Share) kyber.Point
- func SelectCommittee(config committee.Config, seed []byte, size int) []int32
- func VerifyConfig(config committee.Config) error
- func VerifyDecShare(pk, d, e kyber.Point, proof SerializedProof) error
- type Body
- type Commitment
- type CommitteeSelection
- func (cs *CommitteeSelection) GenerateKeyPair(rand io.Reader) (committee.PublicKey, committee.PrivateKey, error)
- func (cs *CommitteeSelection) Initialize(ID int32, privateKey committee.PrivateKey, nodes committee.Nodes) error
- func (cs *CommitteeSelection) Process(state committee.State, input committee.Input) (committee.Feedback, committee.State, error)
- func (cs *CommitteeSelection) VerifyCommitment(commitment committee.Commitment) error
- func (cs *CommitteeSelection) VerifyReconShare(share committee.ReconShare) error
- type CommitteeSelector
- type DLEQ
- type DLEQBatch
- type Header
- type Index2Share
- type PVSS
- type SSS
- type SerializedCommitment
- type SerializedProof
- type SerializedProofs
- type Source2Points
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommitteeSize ¶
func IsNodeInConfig ¶
IsNodeInConfig returns whether the given node is in the config.
func ReconstructShare ¶
func ReconstructShare(x2y Index2Share) kyber.Point
func VerifyConfig ¶
func VerifyDecShare ¶
func VerifyDecShare(pk, d, e kyber.Point, proof SerializedProof) error
Types ¶
type Body ¶
type Body struct {
Commitments []committee.Commitment
}
type Commitment ¶
type Commitment struct { From int32 Commitments []kyber.Point // f+1 commitments Proofs SerializedProofs }
func (Commitment) ToRawForm ¶
func (cmt Commitment) ToRawForm(from int32) (committee.Commitment, error)
type CommitteeSelection ¶
type CommitteeSelection struct { SelectCommittee CommitteeSelector Logger committee.Logger // contains filtered or unexported fields }
func (*CommitteeSelection) GenerateKeyPair ¶
func (cs *CommitteeSelection) GenerateKeyPair(rand io.Reader) (committee.PublicKey, committee.PrivateKey, error)
func (*CommitteeSelection) Initialize ¶
func (cs *CommitteeSelection) Initialize(ID int32, privateKey committee.PrivateKey, nodes committee.Nodes) error
func (*CommitteeSelection) VerifyCommitment ¶
func (cs *CommitteeSelection) VerifyCommitment(commitment committee.Commitment) error
func (*CommitteeSelection) VerifyReconShare ¶
func (cs *CommitteeSelection) VerifyReconShare(share committee.ReconShare) error
type DLEQ ¶
type DLEQ struct {
G1, H1, G2, H2 kyber.Point
// contains filtered or unexported fields
}
DLEQ is a NIZK that proves/verifies there exists some scalar α such that: ∃ α | g₁^{α} = h₁ ∧ g₁^{α} = h₂
func (DLEQ) Prove ¶
func (dleq DLEQ) Prove(alpha kyber.Scalar) (SerializedProof, error)
func (DLEQ) Verify ¶
func (dleq DLEQ) Verify(proof SerializedProof) error
type DLEQBatch ¶
type DLEQBatch []DLEQ
func (DLEQBatch) Prove ¶
func (dleqs DLEQBatch) Prove(alphas []kyber.Scalar) (SerializedProofs, error)
func (DLEQBatch) Verify ¶
func (dleqs DLEQBatch) Verify(proofs []SerializedProof) error
type Index2Share ¶
type Index2Share map[int64]kyber.Point
Index2Share maps an index in [1, n] to its share
type PVSS ¶
type PVSS struct { Commitments []kyber.Point // g^{α_i} for i from 0 to f EncryptedEvaluations []kyber.Point // {pk_i}^{p(i)} for i from 1 to n Proofs SerializedProofs }
func (PVSS) VerifyCommit ¶
type SerializedCommitment ¶
type SerializedCommitment struct { Commitments [][]byte }
func (*SerializedCommitment) FromBytes ¶
func (scm *SerializedCommitment) FromBytes(bytes []byte) error
func (SerializedCommitment) ToBytes ¶
func (scm SerializedCommitment) ToBytes() ([]byte, error)
type SerializedProof ¶
func DecryptShare ¶
func DecryptShare(pk kyber.Point, privateKey kyber.Scalar, e kyber.Point) (kyber.Point, SerializedProof, error)
func (*SerializedProof) Initialize ¶
func (sp *SerializedProof) Initialize(bytes []byte) error
func (SerializedProof) ToBytes ¶
func (sp SerializedProof) ToBytes() ([]byte, error)
type SerializedProofs ¶
type SerializedProofs struct {
Proofs []SerializedProof
}
func (*SerializedProofs) Initialize ¶
func (sps *SerializedProofs) Initialize(bytes []byte) error
func (SerializedProofs) ToBytes ¶
func (sps SerializedProofs) ToBytes() ([]byte, error)
type Source2Points ¶
type Source2Points map[int32]kyber.Point
Source2Points defines curve points indexed by their source
func (Source2Points) SortedPoints ¶
func (c2s Source2Points) SortedPoints() []kyber.Point
SortedShares returns the points sorted by their sources
Click to show internal directories.
Click to hide internal directories.