Documentation ¶
Overview ¶
Package tcrypto stands for Threshold Cryptography. It provides a structure for storing a distributed key share and several high level functions to work with it.
Distributed key shares are usually generated using a DKG procedure. See the `dkg` package for the generation part. This package provides a way to use them.
Index ¶
- type DKShare
- func (s *DKShare) Bytes() []byte
- func (s *DKShare) Read(r io.Reader) error
- func (s *DKShare) RecoverFullSignature(sigShares [][]byte, data []byte) (*bls.SignatureWithPublicKey, error)
- func (s *DKShare) SignShare(data []byte) (tbls.SigShare, error)
- func (s *DKShare) VerifyMasterSignature(data, signature []byte) error
- func (s *DKShare) VerifyOwnSigShare(data []byte, sigshare tbls.SigShare) error
- func (s *DKShare) VerifySigShare(data []byte, sigshare tbls.SigShare) error
- func (s *DKShare) Write(w io.Writer) error
- type Suite
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DKShare ¶
type DKShare struct { // contains filtered or unexported fields }
DKShare stands for the information stored on a node as a result of the DKG procedure.
func DKShareFromBytes ¶ added in v0.1.0
DKShareFromBytes reads DKShare from bytes.
func NewDKShare ¶ added in v0.1.0
func NewDKShare( index uint16, n uint16, t uint16, sharedPublic kyber.Point, publicCommits []kyber.Point, publicShares []kyber.Point, privateShare kyber.Scalar, ) (*DKShare, error)
NewDKShare creates new share of the key.
func (*DKShare) RecoverFullSignature ¶
func (s *DKShare) RecoverFullSignature(sigShares [][]byte, data []byte) (*bls.SignatureWithPublicKey, error)
RecoverFullSignature generates (recovers) master signature from partial sigshares. returns signature as defined in the value Tangle
func (*DKShare) SignShare ¶
SignShare signs the data with the own key share. returns SigShare, which contains signature and the index
func (*DKShare) VerifyMasterSignature ¶
VerifyMasterSignature checks signature against master public key NOTE: Not used.
func (*DKShare) VerifyOwnSigShare ¶
VerifyOwnSigShare is only used for assertions NOTE: Not used.
func (*DKShare) VerifySigShare ¶
VerifySigShare verifies the signature of a particular share.