signing

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	ID     string
	Signer Signer
}

Key is a configured SignerService signing identity.

type Signer

type Signer interface {
	// PubKey returns the public key in the canonical encoding for Scheme.
	PubKey() []byte
	// Scheme reports the Algorithm this key signs under.
	Scheme() config.Algorithm
	// Sign signs payload under Scheme and returns the raw signature bytes.
	Sign(ctx context.Context, payload []byte) ([]byte, error)
	// Close contains any logic that should be called on cleanup.
	Close() error
}

Signer is the capability every SignerService key provides: it describes itself (public key + signature scheme) and signs a payload under that scheme. The per-scheme payload/signature conventions (e.g. ECDSA_SECP256K1 takes a 32-byte digest and returns 65-byte r‖s‖v) are documented on the SignatureScheme enum in the proto.

Directories

Path Synopsis
Package awskms implements a signing key backed by an AWS KMS asymmetric key.
Package awskms implements a signing key backed by an AWS KMS asymmetric key.
Package file implements file-backed signing keys read from disk into process memory.
Package file implements file-backed signing keys read from disk into process memory.
Package pkcs11 implements a signing key backed by a PKCS#11 token or HSM.
Package pkcs11 implements a signing key backed by a PKCS#11 token or HSM.
pkcs11test
Package pkcs11test provides SoftHSM2-backed helpers for exercising the PKCS#11 signer in tests.
Package pkcs11test provides SoftHSM2-backed helpers for exercising the PKCS#11 signer in tests.

Jump to

Keyboard shortcuts

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