ed25519

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package ed25519 implements ED25519 digital signature generation and verification with streaming support. It provides ED25519 operations using the standard ED25519 algorithm with support for high-performance digital signatures and verification.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStreamSigner

func NewStreamSigner(w io.Writer, kp *keypair.Ed25519KeyPair) io.WriteCloser

NewStreamSigner creates a new streaming ED25519 signer.

func NewStreamVerifier

func NewStreamVerifier(r io.Reader, kp *keypair.Ed25519KeyPair) io.WriteCloser

NewStreamVerifier creates a new streaming ED25519 verifier.

Types

type KeyPairError

type KeyPairError struct {
	Err error
}

func (KeyPairError) Error

func (e KeyPairError) Error() string

type NilKeyPairError

type NilKeyPairError struct {
}

func (NilKeyPairError) Error

func (e NilKeyPairError) Error() string

type NoSignatureError

type NoSignatureError struct {
}

func (NoSignatureError) Error

func (e NoSignatureError) Error() string

type PrivateKeyUnsetError

type PrivateKeyUnsetError struct {
}

func (PrivateKeyUnsetError) Error

func (k PrivateKeyUnsetError) Error() string

type PublicKeyUnsetError

type PublicKeyUnsetError struct {
}

func (PublicKeyUnsetError) Error

func (k PublicKeyUnsetError) Error() string

Error returns a formatted error message indicating that the key is not set. The message provides guidance to use the SetKey() method to resolve the issue.

type ReadError

type ReadError struct {
	Err error
}

func (ReadError) Error

func (e ReadError) Error() string

type SignError

type SignError struct {
	Err error
}

func (SignError) Error

func (e SignError) Error() string

type StdSigner

type StdSigner struct {
	Error error // Error field for storing signature errors
	// contains filtered or unexported fields
}

StdSigner represents a standard ED25519 signer.

func NewStdSigner

func NewStdSigner(kp *keypair.Ed25519KeyPair) *StdSigner

NewStdSigner creates a new standard ED25519 signer.

func (*StdSigner) Sign

func (s *StdSigner) Sign(src []byte) (sign []byte, err error)

Sign generates a signature for the given data using the ED25519 private key

type StdVerifier

type StdVerifier struct {
	Error error // Error field for storing verification errors
	// contains filtered or unexported fields
}

StdVerifier represents a standard ED25519 verifier.

func NewStdVerifier

func NewStdVerifier(kp *keypair.Ed25519KeyPair) *StdVerifier

NewStdVerifier creates a new standard ED25519 verifier.

func (*StdVerifier) Verify

func (v *StdVerifier) Verify(src, sign []byte) (valid bool, err error)

Verify verifies the signature for the given data using the ED25519 public key.

type StreamSigner

type StreamSigner struct {
	Error error // Error field for storing signature errors
	// contains filtered or unexported fields
}

StreamSigner represents a streaming ED25519 signer that processes data in chunks.

func (*StreamSigner) Close

func (s *StreamSigner) Close() error

Close generates the signature and writes it to the underlying writer.

func (*StreamSigner) Sign

func (s *StreamSigner) Sign(data []byte) (signature []byte, err error)

Sign generates a signature for the given data.

func (*StreamSigner) Write

func (s *StreamSigner) Write(p []byte) (n int, err error)

Write accumulates data for signing using efficient buffer management.

type StreamVerifier

type StreamVerifier struct {
	Error error // Error field for storing verification errors
	// contains filtered or unexported fields
}

StreamVerifier represents a streaming ED25519 verifier that processes data in chunks.

func (*StreamVerifier) Close

func (v *StreamVerifier) Close() error

Close performs the final verification.

func (*StreamVerifier) Verify

func (v *StreamVerifier) Verify(data, signature []byte) (valid bool, err error)

Verify verifies the signature for the given data.

func (*StreamVerifier) Write

func (v *StreamVerifier) Write(p []byte) (n int, err error)

Write accumulates data for verification using efficient buffer management.

type VerifyError

type VerifyError struct {
	Err error
}

func (VerifyError) Error

func (e VerifyError) Error() string

Source Files

  • ed25519.go
  • errors.go

Jump to

Keyboard shortcuts

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