eddsa

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: BSD-3-Clause Imports: 3 Imported by: 13 modules, 8 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package eddsa implements EdDSA signature, suitable for OpenPGP, as specified in https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-13.7

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sign

func Sign(priv *PrivateKey, message []byte) (r, s []byte, err error)

func Validate

func Validate(priv *PrivateKey) error

func Verify

func Verify(pub *PublicKey, message, r, s []byte) bool

Types

type PrivateKey

type PrivateKey struct {
	PublicKey
	D []byte
}

func GenerateKey

func GenerateKey(rand io.Reader, c ecc.EdDSACurve) (priv *PrivateKey, err error)

func NewPrivateKey

func NewPrivateKey(key PublicKey) *PrivateKey

func (*PrivateKey) MarshalByteSecret

func (sk *PrivateKey) MarshalByteSecret() []byte

func (*PrivateKey) UnmarshalByteSecret

func (sk *PrivateKey) UnmarshalByteSecret(d []byte) error

type PublicKey

type PublicKey struct {
	X []byte
	// contains filtered or unexported fields
}

func NewPublicKey

func NewPublicKey(curve ecc.EdDSACurve) *PublicKey

func (*PublicKey) GetCurve

func (pk *PublicKey) GetCurve() ecc.EdDSACurve

func (*PublicKey) MarshalPoint

func (pk *PublicKey) MarshalPoint() []byte

func (*PublicKey) UnmarshalPoint

func (pk *PublicKey) UnmarshalPoint(x []byte) error

Jump to

Keyboard shortcuts

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