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 ¶
- Variables
- func DecodeHexKyberPoint(group kyber.Group, dataHex string) (kyber.Point, error)
- func DecodeHexKyberPoints(group kyber.Group, dataHex []string) ([]kyber.Point, error)
- func DecodeHexKyberScalar(group kyber.Group, dataHex string) (kyber.Scalar, error)
- func DefaultEd25519Suite() suites.Suite
- type DKShare
- func DKShareFromBytes(buf []byte, edSuite suites.Suite, blsSuite Suite, ...) (DKShare, error)
- func NewDKShare(index uint16, n uint16, t uint16, nodePrivKey *cryptolib.PrivateKey, ...) (DKShare, error)
- func NewDKSharePublic(sharedAddress iotago.Address, n uint16, t uint16, ...) DKShare
- func NewEmptyDKShare(nodePrivKey *cryptolib.PrivateKey, edSuite suites.Suite, blsSuite Suite) DKShare
- type SecretShare
- type Suite
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DecodeHexKyberPoint ¶ added in v1.0.3
func DecodeHexKyberPoints ¶ added in v1.0.3
func DecodeHexKyberScalar ¶ added in v1.0.3
func DefaultEd25519Suite ¶ added in v0.3.0
Types ¶
type DKShare ¶
type DKShare interface { json.Marshaler json.Unmarshaler // // Schnorr based crypto (for L1 signatures). // // BLS based crypto (for randomness only.) // // For tests only. }
DKShare stands for the information stored on a node as a result of the DKG procedure.
func DKShareFromBytes ¶ added in v0.1.0
func DKShareFromBytes(buf []byte, edSuite suites.Suite, blsSuite Suite, nodePrivKey *cryptolib.PrivateKey) (DKShare, error)
DKShareFromBytes reads DKShare from bytes.
func NewDKShare ¶ added in v0.1.0
func NewDKShare( index uint16, n uint16, t uint16, nodePrivKey *cryptolib.PrivateKey, nodePubKeys []*cryptolib.PublicKey, edSuite suites.Suite, edSharedPublic kyber.Point, edPublicCommits []kyber.Point, edPublicShares []kyber.Point, edPrivateShare kyber.Scalar, blsSuite Suite, blsThreshold uint16, blsSharedPublic kyber.Point, blsPublicCommits []kyber.Point, blsPublicShares []kyber.Point, blsPrivateShare kyber.Scalar, ) (DKShare, error)
NewDKShare creates new share of the key.
func NewDKSharePublic ¶ added in v0.3.0
func NewDKSharePublic( sharedAddress iotago.Address, n uint16, t uint16, nodePrivKey *cryptolib.PrivateKey, nodePubKeys []*cryptolib.PublicKey, edSuite suites.Suite, edSharedPublic kyber.Point, edPublicShares []kyber.Point, blsSuite Suite, blsThreshold uint16, blsSharedPublic kyber.Point, blsPublicShares []kyber.Point, ) DKShare
NewDKSharePublic creates a DKShare containing only the publicly accessible information.
func NewEmptyDKShare ¶ added in v1.0.3
type SecretShare ¶ added in v0.3.0
type SecretShare interface {}
It also covers the dss.SecretShare.
func NewDistKeyShare ¶ added in v1.0.3
func NewDistKeyShare(priShare *share.PriShare, commitments []kyber.Point, nodeCount, threshold int) SecretShare
Click to show internal directories.
Click to hide internal directories.