sign

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifyCommandSignature

func VerifyCommandSignature(command *iscv1.Command) bool

VerifyCommandSignature verifies that a command has a valid signature.

Types

type Signer

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

Signer handles signing commands using an Ed25519 private key.

func NewSigner

func NewSigner(privateKeySeed string, rngSeed int64) (Signer, error)

NewSigner creates a new Signer instance from a hex-encoded Ed25519 private key.

The private key seed must be a valid 32-byte seed encoded as a hex string. This is used to derive the full Ed25519 private key for signing operations. The rng seed is used for deterministic salt generation with math/rand.

func (*Signer) GetSignerAddress

func (s *Signer) GetSignerAddress() ed25519.PublicKey

func (*Signer) SignCommand

func (s *Signer) SignCommand(commandBody *iscv1.CommandBody, mode iscv1.AuthInfo_AuthMode) (*iscv1.Command, error)

SignCommand signs a command body to produce a signed command that can be verified.

Jump to

Keyboard shortcuts

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