Evidence integrity and signatures
Integrity answers whether the admitted payload matches its canonical representation. A signature can additionally bind that payload to a key-custody boundary. Neither property proves the observation is semantically true.
Figure 1. Trust checks are layered at admission; source correctness and response authority stay outside the evaluator.
Three different trust questions
| Question | Mechanism | Residual risk |
|---|---|---|
| Was the payload changed? | Canonical JSON and SHA-256 evidence hash. | A malicious producer can hash false data. |
| Did an authorized key approve it? | Signature verification and key identity. | A compromised key or verifier may approve false data. |
| Is the observation relevant and correct? | Contract binding, source governance and independent review. | Semantic correctness cannot be inferred from cryptography alone. |
Canonical evidence payload
The provenance layer serializes a stable evidence payload before hashing or signing. Stable canonicalization avoids different byte representations for the same logical fields.
canonical payload → SHA-256 digest → compare supplied integrity hash → verify optional signature → record verification metadata → evaluate only under enabled engine requirements
MappingEvidenceAdapter computes the expected integrity hash and records whether the supplied hash matches. AssuranceEngine(require_integrity=True) turns an unverified hash into UNKNOWN.
Verification boundaries
| Class | Use | Boundary |
|---|---|---|
HMACKeyring | Deterministic local or test signing and verification. | Secret material exists in the local process. |
ProcessSignatureVerifier | One-shot JSON-lines verification by a separately owned process. | The library receives only a boolean; this is not itself an HSM. |
HTTPSignatureVerifier | Remote KMS-compatible verification over HTTPS. | Key custody and provider audit storage remain external. |
QuorumSignatureVerifier | Require a conservative threshold of providers. | Any explicit negative result wins. |
FailoverSignatureVerifier | Tolerate selected provider errors without accepting explicit invalidity. | Policy must define strict versus degraded operation. |
Enable the full policy deliberately
adapter = MappingEvidenceAdapter(
keyring=verifier,
require_signature=True,
)
engine = AssuranceEngine(
require_integrity=True,
require_signature=True,
require_provenance=True,
)Adapter verification metadata and engine strictness are separate. Configuring a verifier without requiring its result does not create a high-assurance policy.
Threats and controls
| Threat | Control | Still required |
|---|---|---|
| Payload alteration | Canonical digest and integrity comparison. | Protected digest source or signature. |
| Unknown signing key | Key id lookup and active-key policy. | Rotation and revocation governance. |
| Verifier outage | Fail closed; retain diagnostics. | Availability design and escalation. |
| Stale positive provider | Explicit negative precedence in failover/quorum. | Fresh revocation and provider-status evidence. |
| Signed but false observation | None at the cryptographic layer. | Source validation, independence and semantic review. |