eddsa

package
v0.0.0-...-7cc9995 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package eddsa implements the ed25519 curve signature.

Index

Constants

View Source
const (
	// PrivateKeyFileType is the PEM type for a private key.
	PrivateKeyFileType = "EDDSA PRIVATE KEY"
	// PublicKeyFileType is the PEM type for a public key.
	PublicKeyFileType = "EDDSA PUBLIC KEY"
)

Variables

This section is empty.

Functions

func New

func New() modules.CryptoBase

New returns a new instance of the EDDSA CryptoBase implementation.

Types

type Signature

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

Signature is an EDDSA signature.

func RestoreSignature

func RestoreSignature(sign []byte, signer consbench.ID) *Signature

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

func (Signature) Signer

func (sig Signature) Signer() consbench.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