Skip to main content

Crate crypto

Crate crypto 

Source
Expand description

Cryptographic signing for Heddle states and attestations.

Modules§

pop
Bearer-token proof-of-possession signing.

Structs§

Basis
Exact tree evaluated and how it relates to a merge target.
CheckDescriptor
Check identity, command, and resolved inputs.
CiVerdictBody
The complete conclusion-bearing content of a CI verdict.
Ed25519Signer
Ed25519 signer.
Execution
Runner, timing, and attestation metadata.
FailureDetail
Failure details suitable for routing a repair attempt.
LogRef
Pointer to a finalized log blob.
Outcome
Terminal outcome of a check.
P256Signer
P-256 (ECDSA) signer.
Repro
Exact local reproduction recipe.
SignedVerdict
A rich CI verdict body plus its provenance-bound signature.
StateRef
Reference to the immutable source state described by the body.

Enums§

BasisKind
Branch-versus-speculative-merge discriminator.
CheckClass
Whether a check gates a merge or only contributes advisory context.
Conclusion
Exhaustive terminal check conclusions.
FailureClass
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 one Signer constructor.
SignatureStatus
Signature verification result.
SignedVerdictError
Errors returned while creating or verifying a signed CI verdict.
SignerError
Error type for signer operations.
SignerKind
What kind of principal signed a verdict.
StateSignatureError
Error type for state signature operations.

Constants§

CI_VERDICT_BODY_SCHEMA_VERSION
Current canonical CiVerdictBody schema version.
CI_VERDICT_DOMAIN
NUL-terminated domain separator for the v2 CI-verdict signing scheme.
SIGNED_VERDICT_FORMAT_VERSION
Current serialized SignedVerdict format version.

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.
load_signer
Load a signer from a key file. When algorithm is None, the PEM header (or raw-seed shape) selects the backend via [pem_loader::load_signer_from_pem].
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 with SignerError::InsecureKeyPermissions when 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 Signer spine.
state_signature_from_signer
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