ecdsa

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2025 License: MIT Imports: 9 Imported by: 1

Documentation

Overview

Package ecdsa implements the spec-k256 curve signature.

Index

Constants

View Source
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

func New

func New() modules.CryptoBase

New returns a new instance of the ECDSA CryptoBase implementation.

Types

type Signature

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

Signature is an ECDSA signature.

func RestoreSignature added in v0.3.0

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

RestoreSignature restores an existing signature. It should not be used to create new signatures, use Sign instead.

func (Signature) R

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

R returns the r value of the signature.

func (Signature) S

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

S returns the s value of the signature.

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

ToBytes 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