attest

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package attest signs and verifies compliance-evidence digests. It is stdlib-only (ed25519, ECDSA P-256, or ML-DSA (FIPS 204), PKCS#8 keys), adding authenticity on top of the integrity digest the evidence document already carries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fingerprint

func Fingerprint(sig Signature) string

Fingerprint is a short sha256 of the signing public key, for trust display.

func Verify

func Verify(payload []byte, sig Signature) error

Verify checks sig over payload using the public key embedded in sig.

Types

type Signature

type Signature struct {
	Alg       string `json:"alg"`
	Value     string `json:"value"`
	PublicKey string `json:"publicKey"`
}

Signature is a detached signature over an evidence digest, carrying the public key (SPKI DER) so it is self-verifying against a trusted fingerprint.

type Signer

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

Signer holds a parsed private key and its algorithm.

func LoadSigner

func LoadSigner(pemPath string) (*Signer, error)

LoadSigner reads a PKCS#8 PEM private key (ed25519, ECDSA P-256, or ML-DSA).

func (*Signer) Sign

func (s *Signer) Sign(payload []byte) (Signature, error)

Sign returns a detached signature over payload.

Jump to

Keyboard shortcuts

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