Skip to main content

Module signing

Module signing 

Source
Expand description

Audit-event signatures (SPEC §3.5, v0.7).

The signer signs the event’s attestation bytes — canonicalize(view sans signature sans this_event_hash) || prev_event_hash — which are exactly the bytes an unsigned event would hash. The signature is then attached and this_event_hash is computed over the view including it. Two properties follow: the chain commits to the signature (stripping it is hash-detectable without keys), and the signature commits to the event’s content and its chain position (prev hash is inside the signed bytes).

Consequence: signatures are applied at append time or never.

v0.x permits exactly one algorithm, ed25519 — deterministic, so signed fixtures are byte-reproducible and vector-testable.

Structs§

Ed25519EventSigner
An Ed25519 event signer.

Enums§

SignatureError
Errors from signing and signature verification.

Constants§

SIGNATURE_ALG
The only signature algorithm permitted in v0.x.

Functions§

attestation_bytes
The bytes a signature covers: canonical(view sans signature sans this_event_hash) || prev_event_hash.
verify_chain_signatures
Verify signatures across a chain. Returns how many events carried valid signatures. Unsigned events are permitted unless require_all; a present-but-invalid signature always errors.
verify_event_signature
Verify a single signed event against a key_id -> PEM public key map.