Documentation
¶
Overview ¶
Package ecdsa provides a crypto implementation for HotStuff using Go's 'crypto/ecdsa' package.
Index ¶
Constants ¶
const ( // PrivateKeyFileType is the PEM type for a private key. PrivateKeyFileType = "ECDSA PRIVATE KEY" // PublicKeyFileType is the PEM type for a public key. PublicKeyFileType = "ECDSA PUBLIC KEY" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Signature ¶
type Signature struct {
// contains filtered or unexported fields
}
Signature is an ECDSA signature
func RestoreSignature ¶ added in v0.3.0
RestoreSignature restores an existing signature. It should not be used to create new signatures, use Sign instead.
type ThresholdSignature ¶ added in v0.3.0
ThresholdSignature is a set of (partial) signatures that form a valid threshold signature when there are a quorum of valid (partial) signatures.
func RestoreThresholdSignature ¶ added in v0.3.0
func RestoreThresholdSignature(signatures []*Signature) ThresholdSignature
RestoreThresholdSignature should only be used to restore an existing threshold signature from a set of signatures. To create a new verifiable threshold signature, use CreateThresholdSignature instead.
func (ThresholdSignature) Add ¶ added in v0.3.0
func (sig ThresholdSignature) Add(id hotstuff.ID)
Add adds an ID to the set.
func (ThresholdSignature) Contains ¶ added in v0.3.0
func (sig ThresholdSignature) Contains(id hotstuff.ID) bool
Contains returns true if the set contains the ID.
func (ThresholdSignature) ForEach ¶ added in v0.3.0
func (sig ThresholdSignature) ForEach(f func(hotstuff.ID))
ForEach calls f for each ID in the set.
func (ThresholdSignature) Participants ¶ added in v0.3.0
func (sig ThresholdSignature) Participants() consensus.IDSet
Participants returns the IDs of replicas who participated in the threshold signature.
func (ThresholdSignature) ToBytes ¶ added in v0.3.0
func (sig ThresholdSignature) ToBytes() []byte
ToBytes returns the object as bytes.