Expand description
Cryptographic signing for Heddle states.
Structs§
- Ed25519
Signer - Ed25519 signer.
- P256
Signer - P-256 (ECDSA) signer.
- RsaSigner
- RSA signer.
Enums§
- 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.
- Signer
Error - Error type for signer operations.
- State
Signature Error - Error type for state signature operations.
Traits§
- Signer
- Trait for cryptographic signers.
- State
Signing Ext
Functions§
- 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
algorithmisNone, 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 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 - 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