Formal Verification + Interop Bridges¶
Formal Verification (Tamarin Prover)¶
Parts of the GenesisMesh trust protocol are modelled in Tamarin Prover — a symbolic security analysis tool for multi-party protocols. Tamarin reasons over every possible protocol run against a network attacker who can read, block, reorder, replay and inject messages, and either proves a property holds or produces a concrete counterexample trace. Cryptography is treated as perfect, so these models test protocol logic — missing bindings, replays, ordering flaws — not primitive strength.
Scope and status¶
Two models are checked in. Results below were produced with tamarin-prover 1.12.0 / Maude 3.5.1:
Model |
Theory |
Lemmas |
Status |
|---|---|---|---|
|
|
5 |
5/5 verified (0.36s) |
|
|
3 |
1 verified, 1 falsified, 1 undecided |
These models describe the protocol pipeline as of v0.26–v0.30. They have not been re-validated against the current release, and protocol behaviour has changed since they were written. Treat them as evidence about the protocol design at that revision, not as a proof about the code shipping today. See Known gaps below.
The core model captures:
Agreement (Offer/Counter/Accept)
→ Authorization (BoundaryDecision)
→ Execution (ExecutionEvidence)
Core protocol lemmas (gm_protocol.spthy)¶
Lemma |
Property |
|---|---|
|
Every BoundaryDecision is causally downstream of an AgreementRecord |
|
Every ExecutionEvidence record is causally downstream of a BoundaryDecision |
|
An agreement requires both offerer and responder to have acted |
|
No delegation can exist without a root agreement |
|
Each execution has a unique, non-repeatable evidence_id |
Peer risk-signal lemmas (peer_risk_signal.spthy)¶
Lemma |
Property |
|---|---|
|
Every emitted signal value is one of the defined lattice values ( |
|
Every recorded sudden drop is followed by an anomaly detection — an adversary causing a large negative delta cannot suppress the detector indefinitely |
|
Anomalies raised at two distinct sovereigns each require that sovereign to have independently observed the drop — one event cannot “tunnel” into simultaneous alarms |
Running the proofs¶
Proof checking requires Tamarin Prover to be installed locally:
tamarin-prover --prove ops/tamarin/gm_protocol.spthy
tamarin-prover --prove ops/tamarin/risk_signal/peer_risk_signal.spthy
The Python harness wraps both models:
python -m pytest genesis_mesh/tests/test_tamarin_proofs.py \
genesis_mesh/tests/test_risk_signal_tamarin.py -v
That harness runs two kinds of test:
Structural checks — the model files exist, parse as the expected theory, and declare the expected lemmas and rules. These always run.
Proof checks — invoke
tamarin-prover --prove. These areskipif-guarded and skip when the tool is not installed.
CI does not prove the lemmas. The CI workflow does not install
tamarin-prover, so only the structural checks execute there; the proof tests are reported as skipped. Running the proofs is currently a manual, local step.
Known gaps¶
peer_risk_signal.spthydoes not currently prove. Run against tamarin-prover 1.12.0:signal_boundedverifies, butanomaly_detection_responsiveis falsified (counterexample found in 6 steps) andno_single_source_cascadedoes not terminate within 3 GB of heap. Tamarin also reports two wellformedness failures —rule InitSignalhas unbound variablesC, S, and some rule variables are not derivable from their premises, which permits unintended pattern matching. The unbound variables are the likely cause of the falsification, meaning this is probably a modelling defect rather than a protocol weakness — but that has not been demonstrated, and the model should not be cited as evidence until it is repaired and re-proved.The models target the v0.26–v0.30 pipeline and have not been updated for the current release. Protocol behaviour has since changed — notably invocation-token binding, delegation-chain continuity, and treaty scope semantics — so the models should be reviewed before being cited as evidence about current behaviour.
The header comment inside
gm_protocol.spthylists two lemma names (scope_boundedness_is_structural,non_repudiation) that do not match the lemmas the file actually declares. The tables above reflect the declared lemmas, which are authoritative.Proofs are not enforced continuously. Until CI installs
tamarin-prover, a change that invalidates a lemma will not be caught automatically.
Interop Bridges¶
GenesisMesh records can be converted to common external formats for integration with heterogeneous ecosystems.
SPIFFE Bridge (trust interop to-spiffe)¶
Maps an AgreementRecord to a SPIFFE SVID-like JSON. The GM signatures are
preserved as extensions.
genesis-mesh trust interop to-spiffe \
--agreement agreement.json \
--output svid.json
{
"spiffe_id": "spiffe://org-a/3b7e9f12-...",
"trust_domain": "org-a",
"capabilities": ["transactions.read"],
"gm_signatures": [...]
}
W3C Verifiable Credential Bridge (trust interop to-vc)¶
Maps an AgreementRecord or TrustEvidence to a W3C VC.
# From an AgreementRecord
genesis-mesh trust interop to-vc \
--agreement agreement.json \
--output agreement-vc.json
# From TrustEvidence
genesis-mesh trust interop to-vc \
--evidence trust-evidence.json \
--output evidence-vc.json
The VC follows the https://www.w3.org/2018/credentials/v1 context.
GM signatures are in proof._gm_signatures.
JOSE/JWT Bridge (trust interop to-jwt)¶
Encodes a BoundaryDecision as a signed EdDSA JWT (RFC 8037).
genesis-mesh trust interop to-jwt \
--decision decision.json \
--signing-key keys/bridge.key --key-id bridge-2026 \
--output decision.jwt
Standard JWT claims are populated from the decision:
jti→decision_idiss→operator_sovereign_idexp→decision_valid_untilgm:authorized,gm:agreement_id,gm:gate_resultsin thegm:namespace
The JWT can be verified by any JOSE library that supports alg: EdDSA with
crv: Ed25519 (RFC 8037 OKP key type).
Bridge invariants¶
Bridges are lossy by design: not all GM fields map to external formats.
All output carries
_gm_bridge_sourceso consumers know provenance.Reverse mappings (
svid_to_agreement_fields,vc_to_trust_evidence_fields) return best-effort dicts, never re-signed GM records.JWT verification requires the original Ed25519 public key.