ecdsa

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2021 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrHashMismatch = fmt.Errorf("Certificate hash does not match block hash")
View Source
var ErrPartialDuplicate = fmt.Errorf("Cannot add more than one signature per replica")

Functions

Types

type PartialCert

type PartialCert struct {
	// contains filtered or unexported fields
}

func NewPartialCert

func NewPartialCert(signature *Signature, hash hotstuff.Hash) *PartialCert

func (PartialCert) BlockHash

func (cert PartialCert) BlockHash() hotstuff.Hash

BlockHash returns the hash of the block that was signed

func (PartialCert) Signature

func (cert PartialCert) Signature() hotstuff.Signature

Signature returns the signature

func (PartialCert) String

func (cert PartialCert) String() string

func (PartialCert) ToBytes

func (cert PartialCert) ToBytes() []byte

type PrivateKey

type PrivateKey struct {
	*ecdsa.PrivateKey
}

func (PrivateKey) PublicKey

func (pk PrivateKey) PublicKey() hotstuff.PublicKey

type QuorumCert

type QuorumCert struct {
	// contains filtered or unexported fields
}

func NewQuorumCert

func NewQuorumCert(signatures map[hotstuff.ID]*Signature, hash hotstuff.Hash) *QuorumCert

func (QuorumCert) BlockHash

func (qc QuorumCert) BlockHash() hotstuff.Hash

BlockHash returns the hash of the block for which the certificate was created

func (QuorumCert) Signatures

func (qc QuorumCert) Signatures() map[hotstuff.ID]*Signature

func (QuorumCert) String

func (qc QuorumCert) String() string

func (QuorumCert) ToBytes

func (qc QuorumCert) ToBytes() []byte

type Signature

type Signature struct {
	// contains filtered or unexported fields
}

func NewSignature

func NewSignature(r, s *big.Int, signer hotstuff.ID) *Signature

func (Signature) R

func (sig Signature) R() *big.Int

func (Signature) S

func (sig Signature) S() *big.Int

func (Signature) Signer

func (sig Signature) Signer() hotstuff.ID

Signer returns the ID of the replica that generated the signature.

func (Signature) ToBytes

func (sig Signature) ToBytes() []byte

RawBytes returns a raw byte string representation of the signature

Jump to

Keyboard shortcuts

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