Crypto & keys¶
Signing¶
approvo.crypto.signer.Signer ¶
Bases: Protocol
Produces detached signatures. algorithm is a scheme id.
approvo.crypto.signer.Ed25519Signer ¶
In-process Ed25519 signer backed by a raw 32-byte seed.
Keys and trust¶
approvo.crypto.keys.KeyRef
dataclass
¶
approvo.crypto.keys.KeyDirectory ¶
keyid -> KeyRef. The verifier's trust root.
approvo.crypto.keys.keyid_for ¶
Key id = SHA-256 of the scheme's canonical public bytes.
DSSE envelopes¶
approvo.crypto.envelope.wrap ¶
Canonicalize payload and sign it with every (synchronous) signer.
approvo.crypto.envelope.unwrap_payload ¶
Decode the payload without verifying. Callers must verify separately.
approvo.crypto.envelope.pae ¶
DSSE v1 Pre-Authentication Encoding.
Verification¶
approvo.crypto.verifier.verify_envelope ¶
Owner ids with a valid signature on envelope as of at_time.
Kept for the common case and for existing callers/tests. For the
decision-authorisation rule (per-person key or an authorised
decision-issuer key) use :func:decision_authorized.
Canonical serialization¶
approvo.canonical.canonical_bytes ¶
Serialize obj to its unique canonical byte form.
approvo.canonical.canonical_hash ¶
Return sha256:<hex> of the canonical bytes of obj.
approvo.canonical.NotCanonicalizable ¶
Bases: TypeError
Raised when a value cannot be canonically serialized.
Time¶
approvo.clock.SystemClock ¶
approvo.clock.FixedClock ¶
Deterministic clock for tests.