Expand description
Cryptographic signing for Heddle states and attestations, plus the versioned AEAD envelope used by confidential-runtime profiles (ADR 0051).
Modules§
- original_
boundary_ acceptance - Signature verification for explicit current acceptance of unchanged work. A verified signature is not current permission or historical authorization.
- pop
- Bearer-token proof-of-possession signing.
- thread_
authority_ admission - Executor-signed testimony with one fixed canonical format, without API or storage dependencies. Neither a signature nor its carried key creates trust.
- thread_
genesis_ admission - Executor-signed testimony with one fixed canonical format, without API or storage dependencies. Neither a signature nor its carried key creates trust.
- thread_
operation - Portable Thread operation signatures, independent of storage and transport. Verification proves the publisher and exact bytes. The receiving host must still authorize the Thread/facet and validate accepted causal parents.
- thread_
ownership_ claim - Both parties sign the same canonical ownership statement. A courier signature is never substituted for either the current local owner or account acceptor.
- thread_
ownership_ resolution - The immutable local owner chooses a surviving claim and the recipient independently accepts it with current account authority. Admission checks that authority and the complete stored conflict/frontier separately.
Structs§
- Aead
Ciphertext - Random-nonce AES-256-GCM ciphertext plus the pad bucket used.
- Basis
- Exact tree evaluated and how it relates to a merge target.
- Check
Descriptor - Check identity, command, and resolved inputs.
- CiVerdict
Body - The complete conclusion-bearing content of a CI verdict.
- Dek
- 32-byte data-encryption key. Zeroized on drop.
- Ed25519
Signer - Ed25519 signer.
- Execution
- Runner, timing, and attestation metadata.
- Failure
Detail - Failure details suitable for routing a repair attempt.
- LogRef
- Pointer to a finalized log blob.
- Outcome
- Terminal outcome of a check.
- P256
Signer - P-256 (ECDSA) signer.
- Repro
- Exact local reproduction recipe.
- Signed
Verdict - A rich CI verdict body plus its provenance-bound signature.
- Software
Recipient Secret - Exportable X25519 recipient secret. Explicit weaker-custody fallback.
- State
Ref - Reference to the immutable source state described by the body.
- Wrapped
Dek - DEK wrapped to one X25519 recipient.
Enums§
- Aead
Error - Basis
Kind - Branch-versus-speculative-merge discriminator.
- Check
Class - Whether a check gates a merge or only contributes advisory context.
- Conclusion
- Exhaustive terminal check conclusions.
- Failure
Class - Broad class of a check failure.
- PemKind
- The wire format inferred from a PEM blob’s BEGIN line, or
Raw*when the input is just hex/base64 seed bytes with no PEM wrapper. Each variant maps to exactly oneSignerconstructor. - Signature
Status - Signature verification result.
- Signed
Verdict Error - Errors returned while creating or verifying a signed CI verdict.
- Signer
Error - Error type for signer operations.
- Signer
Kind - What kind of principal signed a verdict.
- State
Signature Error - Error type for state signature operations.
Constants§
- AEAD_
AES256_ GCM_ V1 - Version tag stored with ciphertext so algorithms can rotate.
- CI_
VERDICT_ BODY_ SCHEMA_ VERSION - Current canonical
CiVerdictBodyschema version. - CI_
VERDICT_ DOMAIN - NUL-terminated domain separator for the v2 CI-verdict signing scheme.
- PAD_
BUCKETS - Length-prefix + pad buckets. Ciphertext length otherwise tracks plaintext.
- SIGNED_
VERDICT_ FORMAT_ VERSION - Current serialized
SignedVerdictformat version. - WRAP_
HKDF_ INFO - Domain for HKDF used when wrapping a DEK to an X25519 recipient.
Traits§
- Signer
- Trait for cryptographic signers.
Functions§
- ci_
verdict_ signing_ payload - Build the canonical bytes signed by a
SignedVerdict. - classify_
pem - Classify a PEM/raw-key blob by its header (or shape, for unwrapped seed material). Pure function — no I/O, no allocation beyond what the input trim implies.
- decrypt_
padded - encrypt_
padded - Encrypt
plaintextunderdekwith a fresh random nonce.aadbinds the ciphertext to a slot/profile so it cannot be replayed onto another record. - load_
signer - Load a signer from a key file. When
algorithmisNone, the PEM header (or raw-seed shape) selects the backend via [pem_loader::load_signer_from_pem]. - pad_
bucket_ for - Choose the pad bucket for a plaintext length (including the 4-byte prefix).
- public_
key_ bytes - reject_
group_ or_ world_ readable_ key - Reject a private-key file whose permissions expose it to group/world
readers. The single source of the
0600-or-stricter rule: the key-file signer loader (load_signer) and the auto-signing identity loader (repo::identity) both call this so the threshold lives in one place. On unix, errors withSignerError::InsecureKeyPermissionswhen any of the group/world bits (0o077) are set; a no-op on platforms without a unix permission model. Propagates I/O errors (e.g.NotFound) from the stat. - signature_
bytes - signed_
verdict_ from_ signer - Sign a rich CI verdict with Heddle’s shared
Signerspine. - state_
signature_ from_ signer - unwrap_
dek - verify_
payload_ signature - Verify a detached signature over an arbitrary payload. Used by
non-state-signature flows (e.g.
ReviewSignature) that already have a canonical byte payload built upstream. - verify_
state_ signature - Verify a state’s signature.
- verify_
state_ signature_ bytes - wrap_
dek - Wrap
dektorecipient_publicwith an ephemeral X25519 key.aadbinds the wrap to its recipient/profile/slot/version so a wrap cannot be transplanted onto another record.