Seedelf-Wallet

The session model (54b, two keys since 55g)

A symbolic model of protocol.md §3 to §6, §19 and §21, as built (§16), in Tamarin 1.12.0: first contact with the static DH, the Double Ratchet with skipped keys, the reader’s rule on a cid, continuations, the verified reveal, and Messages’ own key with the certificate that binds it to a Seedelf. session.spthy is the model and check.sh proves it. Chunk 54’s 54b, and chunk 55’s 55g.

Two keys since 55g (chunk 55, protocol.md §21). Each principal has a messaging key x_m, which reads, writes and proves in Messages, and a Seedelf key x, which spends and, for Messages, only certifies. In every lemma RevLtk is a messaging key’s theft and RevSpend a Seedelf key’s, and x_A and x_B are each side’s messaging key. Before 55g the model had one key, which did both: every result dated before 2026-11-28 is that one-key model’s. x is in the two configurations with Seedelfs on chain, -D=REVEAL and -D=CERTIFICATE, and Messages’ only rule that takes it is the certificate’s maker. The other configurations’ rules never took it, and Tamarin reads their text as it did before (Two keys).

Two smaller models sit beside it. envelope.spthy puts the outer envelope around the messages: Phase 1’s v1 envelope (construction.md §4) alone, then first contact sealed to the reader’s identity re-randomized by the message’s outer scalar (protocol.md §4.1, §16.2), and the reader’s checks of every point its key touches: the envelope’s generator and ephemeral point, and F’s base and keys proofs (The outer envelope). unlinkability.spthy proves the bare envelope unlinkable by observational equivalence, and states the same of a reader’s answers to first messages, and since 55g that the certificate list doesn’t link one wallet’s Seedelfs by their keys (Unlinkability).

It checks the design, not the Rust: nothing here reads the crate. The vectors and the adversarial tests hold the code to §16, and the mutation pass did for the rules before call 16 (security.md, The session layer); this holds §16 to its claims.

./check.sh               # every lemma and pair, then each configuration's wellformedness checks
./check.sh m1_secret     # some runs, by name; a word that names nothing stops it
./check.sh FIRST         # one configuration's runs, by its flag
MODELS=envelope.spthy ./check.sh   # one model
LOGS=/tmp/m ./check.sh   # keep the logs, as <model>-<flag>-<name>.log

It needs Docker. The first run builds the image from Dockerfile: Tamarin 1.12.0 and Maude 3.5.1, each pinned by its release’s SHA-256, on a pinned Ubuntu 24.04. Every lemma then runs in its own container with no network and a memory cap (CAP), PAR at a time.

It’s heavy. A lemma takes from seconds to 36 minutes, but responder_keys2_secret takes about two hours (6,844 s on 2026-11-22) at 6.4 GB of GHC’s maximum residency, 15 GB in use under its 20 GB cap; skipped_agreement peaks at 3.4 GB live, six others between 2 and 2.4 GB, and the rest under 2 GB (each run’s peak by check.sh’s own measure). The whole run took an hour and 56 minutes at the defaults: run it when the machine is otherwise idle. Each run gets CAP of memory with no swap and CPUS cores, PAR at a time, so the defaults (4, 1 core, 8 GB) take at most 32 GB and 4 cores, and more while runs with their own caps run: up to 52 GB at the start, while responder_keys2_secret (20 GB) and the two designated-verifier traces (12 GB each) run, and 44 GB at the end, while answers_alike and its two controls (12 GB each) run. PAR=2 holds it to 32 GB, and PAR=1 to one run’s cap and a core. Tamarin’s runtime would take every core otherwise, and its heap is held under CAP, where GHC compacts in place instead of copying. Compacting is slow, so a run near its cap slows down rather than fails; a run with no result says why it stopped, out of time or of memory, and its peak heap in use by GHC’s log, which counts old garbage a minor collection doesn’t reach. Before call 16 the envelope model’s runs took 23 minutes of one core in all, none over 2.2 GB in use, and the unlinkability pairs a minute and a GB each. answers_alike and its two controls (call 16) get 12 GB and two hours from their // check.sh diff: lines, and run last; the two designated-verifier traces in -D=FIRST_ONE_ENVELOPE get the same from their // check.sh: lines, and run first. 55g’s twelve new and changed lemmas took 18 minutes of one core in all (2026-11-28), each under 2.2 GB of live heap but reader_key_forges_a_reveal. That one took 6.8 GB in 11 minutes, at the edge of 8 GB’s heap, so its own line gives it 12 GB, and it runs first. The first four runs then take 52 GB, as before.

What it shows

Each lemma is one claim of protocol.md, over any number of conversations, each as long as assumption 6 allows, every principal in both roles, and the compromises its configuration allows: an all-traces lemma holds in every trace, and a trace lemma finds the one it names.

Lemma Configuration Claim
keys1_secret to keys4_secret, keys4_secret_guarded, heal_keys_secret sessions Each root and chain key of the initiator’s, one step at a time ([reuse]; the guarded twin restates keys4’s claim)
responder_keys2_secret, responder_keys4_secret sessions The same for the responder’s keys in a session the initiator started ([reuse])
responder_accepted_the_initiators_f sessions The responder accepted the initiator’s own F, unless its key was stolen before it accepted, or her state ([reuse])
initiator_agreement_r1, _r2 sessions The initiator reads only replies the responder sent, with the same cid, R_A and R_B, unless the responder’s key was stolen before she read its first reply, or, for r2, her state before she read it ([reuse])
responder_agreement_m1, _m3, _m4 sessions The responder reads only what the holder of A’s key sent, in that session, unless that key or its own was stolen before it accepted, or, for m3 and m4, the holder’s state before the read
m1_secret sessions A first message is open to the reader’s key, and nothing else (§1.1)
m3_forward_secret, m4_forward_secret sessions After the first reply, only a theft before it, or the state, opens the initiator’s messages
m4_heals_after_a_reply_the_attacker_only_watched sessions After a stolen state, the next message is secret once a genuine reply is read, unless x_B was stolen before the first reply
r1_forward_secret, r2_forward_secret sessions The responder’s messages are forward-secret: only its key stolen before it accepted a first message, or the initiator’s state, opens them
static_dh_secret, static_dh_holds_r_a sessions The static DH, [x_R]A for A of P’s key, is secret unless one of the two keys was stolen first; so a session whose A is P’s key is accepted only if P started it, with that F ([reuse])
executable, m1_open_to_a_later_reader_key, initiator_state_opens_m3_and_r2, reader_key_before_the_reply_takes_over, reader_key_lets_anyone_pose_to_the_reader sessions Traces that must exist: a whole conversation, and each limit §1.1 states
responder_heal_keys_secret_with_its_state, r2_heals_after_the_responder_state, responder_state_opens_m3, responder_state_then_r2_reached -D=RESPONDER_STATE The responder’s stolen state opens m3, and its next reply heals; that the healing is reached, responder_state_then_r2_reached, is argued, not checked: its search didn’t finish (two hours, and half an hour with each of two other rankings)
m3_secret_after_a_genuine_reply sessions x_B stolen before the first reply, by an attacker who only watched it, doesn’t open the initiator’s next message, m3; only her state does
static_dh_secret_with_continuations, static_dh_holds_r_a_with_continuations -D=CONTINUATIONS The same static DH and hold on R_A with continuations about: a first message whose A is P’s key, fresh or a continuation, is accepted only if P sent it, with that F ([reuse])
responder_agreement_m1_with_continuations -D=CONTINUATIONS The reader reads only what the holder of A’s key sent, fresh or a continuation, unless that key or its own was stolen first
continuation_message_secret -D=CONTINUATIONS A continuation’s message is secret unless the old other side’s key is stolen
continues_only_from_the_old_other_side -D=CONTINUATIONS “Continues” shows only for a continuation the old other side started, unless its key or the reader’s was stolen first
continues_shown_to_the_old_responder, _initiator, reader_key_forges_continues -D=CONTINUATIONS “Continues” shows both ways, and the reader’s own key forges it
first_message_replays_without_the_cid_rule -D=NO_CID_RULE Without §5’s rule, a first message is read twice
reveal_only_from_the_seedelfs_owner -D=REVEAL “Verified ⟨Seedelf⟩” shows only if the Seedelf’s owner revealed it in this conversation, which it started with this reader, unless its messaging key or the reader’s was stolen first, or its Seedelf key (§19.5, §21.9)
reveal_verifies, reader_key_forges_a_reveal, owner_messaging_key_forges_a_reveal, spend_key_forges_a_reveal -D=REVEAL A reveal verifies, its Seedelf’s certificate included. The reader’s own messaging key forges one for any Seedelf with a good certificate, the owner’s messaging key one for its own Seedelf, and the owner’s Seedelf key one for its thief, which certifies a messaging key it holds: each excuse is needed
spend_key_secret_beside_the_reveal -D=REVEAL The Seedelf key stays secret, every messaging key stolen at any time, with the certificate’s maker, the reveal and its checks running: no rule gives it away (Two keys says what that does and doesn’t show)
writes_only_where_the_owner_certified -D=CERTIFICATE A writer writes to a Seedelf only at its owner’s messaging key, and only once its owner certified it, unless its Seedelf key was stolen first; its messaging key isn’t enough (§21.4, joint-security.md’s B′) ([reuse])
first_message_to_a_seedelf_secret -D=CERTIFICATE A first message to a Seedelf is open to its owner’s messaging key, or to its Seedelf key stolen before it was written, and to nothing else
spend_key_secret -D=CERTIFICATE The Seedelf key stays secret whatever Messages gives away, every messaging key included, with the certificate’s maker and every writer and reader running: no rule gives it away
first_contact_through_a_certificate, spend_key_redirects_a_first_message, owner_messaging_key_opens_a_first_message -D=CERTIFICATE Traces: a first message written through a certificate is read; the Seedelf key, stolen, certifies a messaging key its thief holds, and a writer writes to the thief, the owner’s messaging key safe; and the owner’s messaging key, stolen after, opens a first message: each excuse is needed
skipped_keys1_secret to _keys3_secret, skipped_static_dh_secret, skipped_static_dh_holds_r_a -D=SKIPPED The sessions’ helpers, proved again where the skipped keys are ([reuse])
skipped_key_opens_only_its_message -D=SKIPPED A kept skipped key, stolen, opens its own message and not the next on its chain
skipped_agreement, skipped_each_read_once -D=SKIPPED Both messages of a chain are read only as sent, in either order, and once each, unless the holder of A’s key or the reader’s was stolen before it accepted; here the kept key writes its message only with the reader’s own key stolen too (on the wire, assumption 2)
skipped_in_order, skipped_out_of_order, skipped_key_stolen_opens_its_message, skipped_key_and_reader_key_forge_its_message -D=SKIPPED Both orders work; a stolen kept key opens its message in the inner layer (on the wire its envelope also needs the reader’s key or the salt inside it: kept_key_alone_opens_nothing), and with the reader’s key, stolen even after it accepted, writes it

The one-key model’s runs (2026-11-22 to 2026-11-24), every lemma then in the file. check.sh proved every lemma above, and each configuration’s wellformedness checks passed (2026-11-22). The gate of 1.10.0 then changed the model: m3_secret_after_a_genuine_reply and responder_state_then_r2_reached are new, executable, skipped_in_order and the two continues_shown_* traces now name KeyOn, and I_Read_r1 and R_Send_r1 raise two new actions, read only by the new lemma. With that, check.sh proved every lemma again and the wellformedness checks passed, but for four (2026-11-24). heal_keys_secret’s search no longer finishes, in three hours: the two new actions send it another way. On this file without them it’s verified (467 steps, as before, 2026-11-24). No restriction names them, and its formula can’t match them (they’re 'r1'’s, it reads 'r2'’s), so it reads every trace here as it reads that trace there: it holds here, argued from that run. The two continues_shown_* traces were found without KeyOn (2026-11-22); with it named, neither search finished, in two hours, with KeyOn last, or with states_then_keys. KeyOn’s honest rule reads only !Ltk and !Base facts such a trace already holds, raises nothing but KeyOn, and no restriction names it, so it adds to the trace found: argued, not checked. responder_state_then_r2_reached is argued, not checked: its search didn’t finish. A lemma’s “unless” names the compromises it excuses. Most excuse exactly what breaks the claim; a few excuse more, where Tamarin needs it to finish (assumption 11), or where the stronger claim wasn’t tried: heal_keys_secret and m4_heals_after_a_reply_the_attacker_only_watched excuse x_B stolen before the first reply, which their guard on the responder’s own T₂ makes needless. Anything a lemma doesn’t name, the attacker may do at any time: hold every other key, and read, drop, reorder, replay and forge every message, as the relay can (§11).

55g’s runs (2026-11-28), with two keys:

§1.1:

§3 to §6:

§19:

Two keys

Chunk 55 (protocol.md §21) gives Messages a key of its own, x_m, and binds it to each Seedelf by a certificate its Seedelf key x makes. -D=CERTIFICATE and -D=REVEAL hold the claims about the two keys together. The other configurations hold the rest, with x_m for the one key they had (assumption 3 says how they meet):

The outer envelope

envelope.spthy, by flag. Every key in it is a messaging key, x_m, and the Seedelf key isn’t in it: none of its rules takes one. Its second handle, on a generator whose log no one learns, is what another Seedelf’s messaging register is since chunk 55: a register of the same x_m on that Seedelf’s own hashed base, whose log on the first’s no one knows (protocol.md §21.3).

Lemma Configuration Claim
envelope_secret the bare envelope An envelope’s content is secret unless its recipient’s key is stolen (security.md 1)
only_its_recipient_opens_it the bare envelope Only the key it was sealed to opens it: no false matches (construction.md §2)
envelope_binds_its_header the bare envelope An honest envelope’s ephemeral point opens only with its own header and content: another register of the same key, swapped in, fails, as any change does, unless the reader’s key was stolen first (security.md 5, 6)
envelope_opens the bare envelope An envelope opens
responder_takes_nothing_aimed_at_its_other_handle -D=FIRST A reader takes no first message written to one of its handles in which any point its key touched is aimed at its other handle: the envelope’s p and c, and F’s p₀, E_A, A and the first ratchet key S_A. So it doesn’t react in a way that tells the writer both are its key’s (§2, §3, §4.1, calls 13 and 16). Only the reader’s own key, stolen first, excuses it: the base proof’s and the keys proof’s designated-verifier branches let that key prove any base and any A, and it tests [x]g₂ = v₂ with no reaction needed
first_contact_executable -D=FIRST A sealed first message is read
an_attackers_first_message_is_taken -D=FIRST A first message the attacker wrote itself, with no honest writer and no key stolen, is taken with all four checks on: so the lemma above isn’t vacuous for the attacker’s branches
reader_key_proves_a_base_on_its_other_handle, reader_key_proves_an_identity_on_its_other_handle -D=FIRST_ONE_ENVELOPE The excuse is needed, by each branch: with the reader’s key, the base proof’s proves a base on its other handle, and the keys proof’s an A there on a base that is G^k. The configuration has fewer traces than -D=FIRST (assumption 4), so a trace found there is one of -D=FIRST. In -D=FIRST, in 12 GB and two hours, the first ran out of time and the second out of memory (2026-11-23). Here the second was found (2026-11-24), and the first ran out of memory at 18 GB: argued, not checked
without_the_check_a_message_links_two_handles -D=FIRST_NO_OUTER_CHECK Without §4.1’s outer check, a message whose envelope’s generator is on the other handle is taken, no key stolen: the link call 13 closes
without_the_ephemeral_check_a_message_links_two_handles -D=FIRST_NO_EPHEMERAL_CHECK Without the ephemeral check, a message whose envelope’s c is on the other handle is taken: the link call 16 closes, which the gate of 1.10.0 found in the model as it was, with the outer check on
without_the_keys_proof_an_ephemeral_links_two_handles, without_the_keys_proof_an_identity_links_two_handles, without_the_keys_proof_a_ratchet_key_links_two_handles -D=FIRST_NO_KEYS_PROOF Without F’s keys proof, a message whose E_A, whose A, or whose first ratchet key S_A is on the other handle is taken (the second’s trace names E_A = G, and the third’s A = E_A = G, so that S_A is the only point that can be there)
without_the_base_check_a_message_links_two_handles -D=FIRST_NO_BASE_CHECK Without F’s base proof, a message on a base on the other handle is taken, no key stolen: w₀ = [x]p₀ comes from that handle’s public value
initiator_takes_no_reply_aimed_at_its_handles -D=INITIATOR_READS The initiator takes no reply whose envelope’s p or c is aimed at one of its handles, even from a responder that is the attacker, so a reply’s reaction doesn’t tell the responder who wrote (§2, §4.1, calls 13 and 16). Nothing excuses it
initiator_reads_a_reply -D=INITIATOR_READS A sealed reply is read
without_the_check_a_reply_links_the_initiator -D=INITIATOR_READS_NO_OUTER_CHECK Without the outer check, a reply whose p is on the initiator’s handle is taken
without_the_ephemeral_check_a_reply_links_the_initiator -D=INITIATOR_READS_NO_EPHEMERAL_CHECK Without the ephemeral check, a reply whose c is on the initiator’s handle is taken
replies_sealed_to_r_a -D=SEALED_TO_A_KEY A reply sealed to a principal’s identity is open to that principal’s key alone, whatever the inner layer’s keys give away, its message key included; so is its salt, from which the outer and ephemeral scalars come. With the session model’s r1_forward_secret, that’s why x_B, stolen even before Bob read the first message, opens nothing Bob sent (§1.1): argued from the two, not proved in one model
a_reply_opens -D=SEALED_TO_A_KEY A sealed reply opens
kept_conversation_secret, kept_salt_secret -D=KEPT_KEY The conversation’s base, the reader’s identity w₀ and a sealed message’s salt stay secret until x_B is stolen ([reuse])
kept_key_alone_writes_nothing -D=KEPT_KEY A kept message key, stolen alone, writes nothing, with the wire’s means: the reader takes under it only the message it stands for, unless x_B was stolen first
kept_key_alone_opens_nothing -D=KEPT_KEY Nor does it open that message: its envelope’s key is [r]w for an r from the message key and the salt, and the salt is inside the envelope, which only x_B opens; the message is out only if both the key and x_B are stolen
kept_key_reads_its_message -D=KEPT_KEY The kept key reads its message
tag_redone_without_the_associated_data -D=TAG_REDO A control for assumption 2: from one genuine ciphertext and its key, a tag under the same associated data, never published, is made for another message

Call 16 changed this model’s rules and lemmas. With them check.sh proved every lemma here but the two designated-verifier traces, with nothing to warn (2026-11-23); those had no result in -D=FIRST. In -D=FIRST_ONE_ENVELOPE the keys proof’s was found (2026-11-24), and the base proof’s search didn’t finish: argued, not checked. The gate’s later changes left every other configuration as it was: Tamarin prints each one’s rules, restrictions and lemmas the same for that run’s files and these (2026-11-24). Before call 16 it proved the lemmas then here (2026-11-22). 55g changed only this model’s comments, and Tamarin prints every configuration the same as the one-key file’s (2026-11-28): these results stand, its one key read as x_m.

What it assumes, beyond the session model’s list, which holds where its rules are copied (assumptions 1, 3 to 5 and 12):

  1. A second handle stands for every other register of the key whose generator the attacker knows no log of, for every point the reader’s key touches: another Seedelf’s messaging register, on its hashed base, or a sum of two. Tamarin’s group has no addition, so sums themselves aren’t written. The reader’s conversations are on its root handle, and the second is “the other one”, by symmetry.
    • A Seedelf someone else planted at a register of the reader’s Seedelf key, such as the sum of two of its Seedelfs’ registers, gets a messaging register of its own once the user turns it on, on its own hashed base (chunk 55). So a reply to a message written to it links nothing here, where under one key it linked what the register summed.
    • What links instead is its certificate, a public proof that the Seedelf key holds that register (protocol.md §21.8), outside this model. The switch says so before such a Seedelf is turned on.
  2. The ratchet’s AES-GCM is the wire’s: with the key, anyone reads a ciphertext and, from one genuine tag, makes another under the same associated data without knowing it (GHASH is linear); tag_redone_without_the_associated_data shows the equation does it. The session model’s attacker can’t; this one can. The power is re-tagging under the same associated data. A real key holder can also shift the associated data by a known difference, and with tags under three keys solve for a three-block unknown such as w₀ (joint-security.md, rule 1); neither is modelled, and neither is in reach of the attackers here, who hold one kept key and no genuine ciphertext (-D=KEPT_KEY), or every chain key and w₀ already (-D=INITIATOR_READS).
  3. The envelope’s own AES-GCM is the session model’s: its associated data is the header, which is public, so anyone with its key makes any envelope under it anyway. The header’s tag of w is a free function, one-way and equal only for equal points: SHA-256’s collision resistance, taken as given.
  4. A configuration per claim, not the whole session sealed. First contact, the reply and the second chain all sealed didn’t finish Tamarin’s precomputation in 20 GB (How it’s built). So each claim keeps the part of the session it’s about, and gives the attacker the rest:
    • -D=SEALED_TO_A_KEY: the reply’s message key, as if the attacker held every key of the inner layer but x_A; not its salt, which the inner layer carries inside the envelope, and from which the outer and ephemeral scalars come (§16.2, call 16). The bases are an honest initiator’s, with every principal’s identity on them published, as F publishes it to anyone who opens it, or G^k (the session model’s assumption 4).
    • -D=INITIATOR_READS: everything the responder knows, which here is the attacker: the base, A, the cid, and every chain key and w₀ it likes. A reply from an honest responder is the case where the attacker knows less.
    • -D=KEPT_KEY: one conversation as the session model leaves it at the initiator’s second chain. Its chain keys are fresh, as the session model proves them secret, and its envelopes are the ones the conversation sends: the first message (F, without its base and keys proofs, which a kept key doesn’t reach) and the chain’s two messages to R_B, the reply (cid, T₁) to R_A. So the cases where the session model excuses the key, a theft before the session or a stolen state, aren’t here: this configuration claims only that the kept key adds nothing on the wire. Nor is a continuation from the responder, which x_A opens (the session model’s assumption 13).
    • -D=FIRST and its four controls: first contact alone, every principal writing and reading, each control without one of the reader’s four checks. One first-contact message a conversation: a request’s later messages, and the rule that each carries the first’s header key S_A (accept_with, the join), aren’t here; the crate’s tests hold that rule.
    • -D=FIRST_ONE_ENVELOPE: the rules and restrictions -D=FIRST shares with its four controls, every check on, with no honest writer, one envelope read and the observer’s multiple a name, for the two designated-verifier traces. Each change only drops traces, so a trace found there is one of -D=FIRST, and the configuration holds trace lemmas only: one falsified there would say nothing of -D=FIRST.
  5. F’s two proofs, by what they show (call 16, protocol.md §3). Each is designated-verifier: it shows its writer knows the logs it claims, or the reader’s own key.
    • The keys proof. An honest writer’s is a fact, !Proof(F, S_A, w₀), which I_Start leaves and the reader looks up (R_Keys_proof_honest): it binds F, S_A and that reader’s w₀, as the proof’s challenge does, so it serves that reader for that F alone. The attacker proves with exponents it names, sent beside the message (R_Keys_proof_attacker), and the checks make E_A, S_A and A those powers of p₀; or, once it holds the reader’s key, with exponents for E_A and S_A and that key, sent the same way, and any A (R_Keys_proof_by_the_reader_key): the designated-verifier branch. In Tamarin’s group the attacker raises only points it holds to exponents it knows, with no addition, so it proves here no more than a real prover can (and, by the next bullet, less: no attack lost for the lemmas here, argued, not checked).
    • The attacker’s exponents are public names ($e, $s, $a), as its bases are G^$k (the session model’s assumption 3), not any term it knows: sent as messages, three powers of one received point by them never finished Tamarin’s variant computation (How it’s built). That drops some of a real attacker’s first messages: one posing as P with P’s stolen key, whose A = [x_P]p₀ no name gives; a witness that is a product, an inverse or a KDF output, such as E_A = c, whose log on p₀ is o·r; and a tie to another message’s scalars. No lemma here loses an attack by that, argued, not checked. Until the reader’s key is out, no exponent the attacker knows holds the log of a second handle’s generator, so no power of p₀ by one lies on that handle, a name or not; once it is out, responder_takes_nothing_aimed_at_its_other_handle excuses the take, and the designated-verifier branch takes any A anyway. No lemma here is about whose key A is: the session model, with no keys proof, keeps the impersonation, and its agreement lemmas excuse P’s key. The controls and traces need only some exponent, and a name is one.
    • Why not a proof term made with the exponents, as the reveal’s is (the session model’s assumption 14): the reader would match exponents it can’t derive, which Tamarin’s message-derivation check refuses as unintended pattern matching, and check.sh fails on its warning. The reveal’s term passes only because its witness is a principal’s key, which the reader’s rule takes from that principal’s fact; a writer’s ephemeral exponents are in no fact.
    • The base proof. p₀ is an honest writer’s base or G^k for a k the attacker names, both known powers of the named handle’s generator (G here, the session model’s assumption 4); or any point at all, which passes only once the reader’s key is out (R_Derive_m1a_any_base and base_check): the designated-verifier branch, which proves any base. An honest base passes here under any F, where on the wire its proof binds F′, so only its writer or x_B reuses it: that gives the attacker more.
    • Not modelled: either proof’s soundness (special soundness of each Schnorr part and of the OR), its zero knowledge and deniability (the reader could have made it), and its nonce, whose safety for x is an algebraic fact the symbolic group can’t state: z = k + c·x needs addition of exponents (joint-security.md, use 10 and rule 2; the crate’s tests). On the wire F holds both proofs and SK binds them; here they travel beside F, which binds less and gives the attacker more.
  6. Not here: padding and sizes (§9), the first-contact stamp (the session model’s assumption 12), continuations (session.spthy’s -D=CONTINUATIONS has them without the envelope; there A and p₀ are held values, and E′ and S′ are bound by the continuation’s keys proof, argued from -D=FIRST, not checked), and timing: how long a reader takes on a message, which a far-ahead message’s walk (§16.4, MAX_AUTH_STEPS) or a scan’s early return could show, is outside a symbolic model.

Unlinkability

unlinkability.spthy proves security.md’s property 3 for the bare v1 envelope, as observational equivalence: Tamarin’s diff terms, proved with --diff. Every envelope’s header carries p, c and a tag of w (call 16), as on the wire.

Run Systems told apart Must be Before call 16, with w in the header (2026-11-22) With the tag (2026-11-23)
same_or_two envelopes to one recipient, against envelopes to one recipient and to another verified: no attacker tells them apart verified (10,699 steps) verified (7,823 steps)
known_or_no_one (-D=FRESH) envelopes to a known register, against envelopes to a key no one holds verified verified (10,602 steps) verified (7,766 steps)
bare_register_links (-D=BARE_REGISTER) the same as the first, sealed to the register itself, not a re-randomization of it, as ElfTalk’s messages carried their recipient’s key falsified: the link found falsified (8 steps) falsified (13 steps)
stolen_key_links (-D=STOLEN) the first, with the second recipient’s key stolen falsified falsified (15 steps) falsified (15 steps)
answers_alike (-D=ANSWERS) a reader that answers every first message it takes, with a second register that is its key’s, against one that is a key’s no one holds verified not in the model no result: out of memory at 10.8 GB, 37 minutes
unbound_ephemeral_answers_link (-D=ANSWERS_UNBOUND_EPHEMERAL) the same, without the envelope’s ephemeral check falsified not in the model no result: out of memory at 7.1 GB, 32 minutes
unproven_ephemeral_answers_link (-D=ANSWERS_UNPROVEN_EPHEMERAL) the same, without F’s keys proof falsified not in the model no result: out of memory at 7.1 GB, 32 minutes
the_reader_answers (-D=ANSWERS_REACHED, a trace lemma on each side) none: the reader answers a first message the attacker wrote, every check on verified on both sides not in the model verified on both sides (2026-11-24)
two_seedelfs_or_two_wallets (-D=TWO_SEEDELFS, 55g) one wallet’s two Seedelfs, each with its datum register, its messaging register on its hashed base and its certificate, against two wallets’ verified: the list doesn’t link Seedelfs by their keys not in the model verified (6,631 steps, 50 s, 2026-11-28)
one_base_links_two_seedelfs (-D=TWO_SEEDELFS_ONE_BASE, 55g) the same, with every messaging register of a wallet on one base falsified: the link found not in the model falsified (12 steps, 36 s, 2026-11-28)

The controls must find their link, so the model can see one; check.sh runs them all, and fails if a control is “verified”. With the tag (2026-11-23) the first four ran as they must, each in under a minute and a GB, as before call 16. answers_alike ran out of memory at 10.8 GB after 37 minutes, and its two controls at 7.1 GB after about 32: each held under 1.3 GB of live heap at every full collection for 25 to 29 minutes, then went past 3 GB within half a minute. So a reader’s answers have no result: argued, not checked. the_reader_answers (-D=ANSWERS_REACHED) shows the reader answers at all, on both sides (2026-11-24), so the pair can’t hold for want of an answer once it has a result.

What it shows: an attacker who holds both recipients’ registers, of any number of pairs, chooses every plaintext, and sees any number of envelopes of either kind can’t tell whether two envelopes go to the same recipient, or whether one goes to a given register at all. Diff-equivalence is stronger than observational equivalence, so “verified” is sound.

Two Seedelfs on the list (55g, protocol.md §21.3, §21.7): the list shows every listed Seedelf’s register, messaging register and certificate. An attacker who sees any number of pairs of them can’t tell one wallet’s two from two wallets’ (two_seedelfs_or_two_wallets): its keys link nothing, as DDH in G1 says of registers on independent bases, which the symbolic group has by construction. The control puts a wallet’s messaging registers on one base, and its two are then the same point (one_base_links_two_seedelfs): a base for each Seedelf is what keeps them apart. It doesn’t tell the hashed base from call 5’s first design, M_S on g_S, which would verify too: what the hash adds is rule 1m’s, no static-DH answer, beyond a symbolic model. When certificates appear on the list isn’t here: the wallet posts them apart and the list keeps no times (§21.7), and the relay sees each post’s address.

A reader that answers (-D=ANSWERS, calls 13 and 16): the attacker writes first messages to the reader’s root handle, with the envelope’s p and c, and one point E for F’s E_A, A and S_A, aimed anywhere (p₀ is G^k, as the base proof leaves it), and sees which the reader answers. If the answers differ when a second register is the reader’s from when it’s a key’s no one holds, a reaction links the two. Diff-equivalence asks both sides to take the same steps, so the reader computes its key on each point in steps with no check (both sides take them alike) and checks everything in the one step that answers: the scan, the open, the inner layer under a key from [y]E with w₀ in its associated data, the outer check, the ephemeral check and the keys proof. E stands for F’s E_A, A and S_A, which the keys proof binds alike: one point for three, argued, not checked, since each is bound the same way and no product of bound points carries another handle’s log. The exponent the proof shows its writer knows is sent beside the message, any term it knows (envelope assumption 5 says why it’s sent; envelope.spthy’s three are public names). The base is G^k for a k the attacker names; neither proof’s designated-verifier branch is here, since no key is stolen. It holds of the wallet only if nothing before that step is seen: no count of envelopes that opened but didn’t read, no chain read set off by an envelope, no refusal acted on but an authenticated far-ahead one, and no page asked for at a time that depends on what the last page held (the worker’s rules for Seedelf Messaging, architecture.md). Each control drops one check and must find the link.

What it doesn’t:

What building and reviewing it found

A reviewer with no context read the model against protocol.md (2026-11-21). Its findings changed both.

What the model assumes

Where a symbolic model is weaker than the protocol, or this one narrower. A reviewer should read these first.

  1. Perfect cryptography. Tamarin’s attacker controls the network and computes only what the equations allow: Diffie–Hellman in a prime-order group, where [a]P and [b]P never give [ab]P; AES-GCM, read with the key alone and accepted only under its key and associated data; HKDF and HMAC as one-way functions. Nothing about bounds, timing or side channels.
  2. No outer envelope. The attacker sees every inner message, F, cid and headers included. That gives it more, since the outer layer authenticates nothing: anyone can seal to a register. But what the outer layer shows goes too: the envelope’s generator [o]p₀, its ephemeral point [r][o]p₀ and a tag of [o]w₀ (call 16), whose o and r come from the message key and the inner layer’s salt (§16.2). Two claims rest on the outer layer. They go unchecked here, and envelope.spthy checks each, in a configuration of its own (The outer envelope):
    • §1.1’s “x_B opens nothing Bob sent” when x_B is stolen before Bob reads the first message. Bob’s replies are then keyed to the attacker’s ratchet key, and only their seal to R_A (x_A) hides them. So r1_forward_secret excuses a theft before Bob accepts. Checked as replies_sealed_to_r_a.
    • A kept message key, stolen alone, writes nothing (skipped_agreement). Here its tag needs w₀, which the attacker lacks. On the wire, whoever sees the inner layer gets o and r from the key and the salt, and AES-GCM’s tag can be redone without the associated data from one genuine ciphertext and the key; before call 16 the envelope’s [o]w₀ gave w₀ too, and since, its header carries only a tag of it. What keeps a key thief from the salt and the ciphertext is the outer layer, which only x_B or the device opens, and either gives w₀ anyway. Found by the follow-up’s review; checked, with those means given to the attacker, as kept_key_alone_writes_nothing.
  3. Handles are messaging registers, written as root registers, (G, [x_m]G), one per principal. G stands for the hashed base h_S of the Seedelf written to (protocol.md §21.3): the attacker computes [x_m]P for any P it knows the log of on G, as it does on h_S from m_S. Several registers of one key, and their sums, aren’t modelled here. envelope.spthy’s second handle stands for them, another Seedelf’s h_S among them. protocol.md §2 states the link that sums give.
    • The writer’s read of a handle and the reader’s read of the chain are honest facts (!Pk, !Chain): the trusted-source limit protocol.md §2 and §19.4 state.
    • Since chunk 55 a writer’s handle comes from a certificate, which !Pk stands for here. -D=CERTIFICATE shows that it names the Seedelf owner’s messaging key unless the owner’s Seedelf key was stolen first (writes_only_where_the_owner_certified). So $Rsp in the other configurations is the holder of the messaging key written to, which is the Seedelf’s owner unless its Seedelf key was stolen first. Each of their lemmas holds of a first message written to a Seedelf, with that theft excused too: argued from the two, not proved in one model. Only m1’s secrecy is proved that way in one model (first_message_to_a_seedelf_secret).
    • The attacker’s base is G^$k, $k a public name it chooses, not any term it knows.
  4. The base a reader accepts is an honest writer’s p₀, or G^k for a k the attacker chose. It was the model’s main restriction; since calls 12 and 13 (54a′), the reader enforces it.
    • Why it’s there. The reader publishes [t]p₀, its ratchet key, on whatever base the writer chose. With p₀ an arbitrary term, Tamarin’s search never closes.
    • Why nothing is lost. Two rules tie a first message to a base its writer can use (protocol.md §3). F’s base proof shows its writer knows b with p₀ = [b]g_S for the handle named in to, or knows the reader’s own key: since call 16 it’s designated-verifier, so it convinces no one but that reader. Without that key, over the model’s one generator G, the base is G^k. And the tag’s associated data holds w₀ = [x_B]p₀, which the attacker knows, without x_B, for G^k through the handle, and for an honest conversation’s base once w₀ is out (a stolen state, or a continuation). A continuation carries no proof, but must be on one of the reader’s own conversations’ bases (§6). All of these are in the model.
    • With x_B, the base proof is made for any base, which this model doesn’t write. Whoever holds x_B already computes every value the reader computes, on any base; what the reader adds on such a base, its own fresh ratchet keys, stays in the conversation the attacker opened, and no other conversation’s keys depend on it. So no lemma here gains a trace from it, including the ones that don’t excuse x_B, such as m3_secret_after_a_genuine_reply. That’s argued, not checked. envelope.spthy’s -D=FIRST writes that branch, for the claim it’s there for, and -D=FIRST_ONE_ENVELOPE’s reader_key_proves_a_base_on_its_other_handle is to show it used, but its search didn’t finish.
    • What’s left out: a base proved over another register of x_B than the root one (3). Its writer knows b over that register’s generator, so it gains what a G^k session gives. That’s argued, not checked. The proof’s soundness, its deniability and its nonce are the crate’s tests’ (54a′, call 16), not the model’s.
  5. Every point is valid. The symbolic group has no identity and no small subgroup, so §3’s point checks are the code’s and the tests’ (54a), not the model’s.
  6. A bounded conversation: one first-contact message, two full round trips (m1, r1, m3, r2, m4), and one continuation link (a continuation isn’t continued again). Out of order is one chain of two messages read either way (-D=SKIPPED), with no later step after it. MAX_SKIP, the requests’ bounds and each request’s share (16 messages and 64 KiB, call 16), every clock (the 48-hour window, a skipped key’s 48 hours, tombstones, expiry) and proof of work aren’t here: they’re counters and times, which the tests cover. So is the far-ahead verdict, the one refusal the wallet acts on: since call 16 it’s given only for a message that authenticated and passed its envelope’s checks, on a read-only walk of at most MAX_AUTH_STEPS keys (§16.4), so it comes after every check, as the model’s reads do. The mutation passes (security.md) predate call 16’s rules.
  7. §5’s rules are one restriction: a reader takes a given cid’s first message once. That’s what the cid table, the tombstones and the window aim at, and the model shows it’s needed. The code keeps it except where no tombstone is left while the window is open: a request the bounds push out (above; since call 16 only a new request pushes one out, never a join); a conversation deleted when its record can’t be read, its F and so its t lost; one the sweep unlists because its record is missing; and a wallet restored from the phrase, or the phrase’s second browser, which never held the cid. In each, a first message still on the relay and inside its window reads again as a new request, and in the last two a reply to it reaches nobody (protocol.md §6).
  8. Requests are read eagerly. 54a’s tests show replying builds exactly the state eager processing would (§16.4), for the messages a request holds. Since call 16 a request also refuses what eager processing would read: a join past its share, or past the 256 KiB of all requests, since a join never pushes another out. One first-contact message never meets either.
  9. Reading is two rules, deriving the keys from the header, then authenticating. A message that fails leaves the model’s state stuck where the code leaves it unchanged, which removes only traces in which the failure changed nothing.
  10. ENCRYPT’s salt is left out. A message key is used once in the model, and the salt is a net for a key used twice (§4.2), which only a rollback does. The model has no rollback. Since call 16 the salt is a send’s one fresh value: the envelope’s o and r both come from it and the message key, so a key used twice with a salt repeated gives two inner messages one outer key and nonce, where a drawn r used to keep them apart. envelope.spthy has the salt; neither model has the rollback.
  11. State theft: each side’s record after its first reply, taken once, then or later, which also stands for an old copy: the initiator’s in the sessions’ configuration, the responder’s in its own (13). Not modelled: both at once, and a state before the first reply. The responder’s record here lacks its receiving chain key, which the stored state holds; with one first-contact message it would open only the initiator’s later first-contact messages, which the model doesn’t send. Of §1.1’s “messages before the copy”, m1 is proved against the initiator’s copy and r1 excused there; against the responder’s copy neither is stated, and both hold by what the copy holds (the next key of each chain, never the one used). One message key alone is a skipped key the reader keeps, taken once (-D=SKIPPED).
    • Some lemmas name the initiator’s state where it opens nothing: responder_keys2_secret and r1_forward_secret. Tamarin finishes them only that way; without the excuse it has to refute every branch the state would end, and ran past 12 GB. They still say everything about traces where no state is stolen, and responder_keys2_secret names only a state stolen before the attacker knew the key, which m4’s agreement needs. That costs Tamarin an hour and a half and 6.5 GB of live heap, so check.sh gives that lemma its own room (the // check.sh: line above it).
  12. F is one value bound into SK, and through it into every key: cid, t, replaces, p₀, A and E_A. t is any public value. to, its base proof (call 13, 54a′) and its keys proof (call 16) are left out. to changes only a label, and what the base proof gives the reader, a base its writer can use, is assumption 4. The keys proof only narrows what a reader accepts: here the attacker chooses E_A, A and S_A freely, where on the wire it must know their logs on p₀ (or hold the reader’s key), so every lemma here holds with it too. A trace a lemma names may use points no writer could prove on the wire: reader_key_forges_continues names E = S = G on an honest base, whose log on it no one knows; on the wire the forger takes powers of p₀ it chose, and the trace is the same. envelope.spthy’s -D=FIRST checks it, for the claim it’s there for (no reaction links two handles). The base proof’s designated-verifier branch is assumption 4’s. The first-contact stamp (call 12) sits after F, and it and the envelope’s outer and ephemeral scalars (§4.1) are about spam and unlinkability, which no lemma here claims (2, 6).
  13. Seven configurations, since Tamarin’s search grows with every rule that publishes something, and with every compromise. Each lemma is proved where its own compromises are.
    • The sessions steal long-term keys and the initiator’s state, and have no continuations. Their attacker misses what a continuation publishes: fresh powers of p₀, a message under a key it can’t derive, and the old identities. Of those only w₀ isn’t otherwise public, and a continuation is sealed to the other side, so only a holder of that side’s key sees it. That holder gains something here: the responder’s continuation carries p₀, the old cid and w₀ (its A) to R_A, so x_A, stolen at any time, and one kept key write the message the key stands for, the reader’s key safe. skipped_agreement’s excuses leave that out, and so does kept_key_alone_writes_nothing (envelope.spthy); -D=SKIPPED_CONTINUED, if built, shows it.
    • The responder’s state (-D=RESPONDER_STATE) is the sessions with the responder’s state stolen instead of the initiator’s. With both in one model, Tamarin ran past 14 GB on the third key; a lemma about one side’s state doesn’t need the other’s.
    • The continuations (-D=CONTINUATIONS) have no ratchet and no state theft. Their attacker misses the ratchet’s fresh powers of p₀ and its ciphertexts, which no continuation’s SK depends on.
    • The cid check (-D=NO_CID_RULE) is the sessions without §5’s rule.
    • The reveal (-D=REVEAL) is first contact, Seedelfs on chain with their certificates, and the reveal, with no ratchet: the reveal goes in the clear, where the protocol sends it inside the ratchet, so its attacker sees more than the real one. Its claim is about who could have made the proof, which needs no ratchet.
    • The certificate (-D=CERTIFICATE, 55g) is first contact written to a Seedelf through a certificate from the list, with Seedelfs on chain and both keys stolen at will; no ratchet and no state theft. Its claims are about whom a first message reaches and what the Seedelf key gives, which need neither.
    • Skipped keys (-D=SKIPPED) are the sessions up to the first reply, then the initiator’s next chain with two messages, and the kept key stolen; no later step and no state theft. Their helpers are the sessions’ own, proved again there.
  14. The verified reveal’s proof is two constructors (-D=REVEAL, protocol.md §19): prf1 the real branch, made with the messaging key of A and of the Seedelf’s messaging register, prf2 the other, made with w₀’s, each binding cid, p₀, A, w₀, the name, the register and m_S. h_S is the hash of the name and the register, so they bind it, where the wire’s statement carries it to bind the reader’s network and policy, of which the model has one. The reader checks one by equality, as the real check’s equations hold exactly then, with its witness a principal’s key: any principal’s for the real branch, its own for the other. A proof by a key no principal holds isn’t here. Under one key it verified only for registers of that key, so for no principal’s Seedelf. With two, its m_S is that key’s, which a certificate made good only if the Seedelf’s x made it, so only a thief of x gains by one, and its own messaging key stands as a principal’s stolen one (15); the attacker still uses any key it steals. Then, at the press, a certificate good for the Seedelf that names the reveal’s m_S (§19.4, §21.5; assumption 15). Not modelled:
    • the proof’s soundness, which the abstraction assumes: the Cramer–Damgård–Schoenmakers argument, the crate’s tests, a mutation pass and vectors reproduced from protocol.md alone (security.md, The verified reveal);
    • its deniability, that the reader could have made it, so it convinces no one else: a claim about what a third party can tell apart, which a trace lemma can’t state (it would need Tamarin’s observational equivalence);
    • the chain read (§19.4’s step 4): a Seedelf’s name holds one register for good here, so a Seedelf that moves owner, and the fresh read that catches it, are the wallet’s and its tests’;
    • only after the first reply (§19.1): the initiator reveals at any time after it starts, which gives the attacker more;
    • only a Seedelf with a good certificate (§21.8): I_Reveal reveals any of the owner’s Seedelfs, certified or not, which gives the attacker more too.
  15. The two keys and the certificate (55g; -D=REVEAL and -D=CERTIFICATE, protocol.md §21):
    • Two fresh keys per principal, x (!Spend) and x_m (!Ltk), independent as two HKDF outputs of one seed under two salts are (§21.2), each with its own reveal at any time: Reveal_spend and Reveal_ltk. x_m is one per network on the wire; the model has one network.
    • h_S is hbase(N, g_S, u_S), a public function whose output is a base no one knows the log of, as envelope.spthy’s g₂ is. Anyone computes it, for any name and register, and nobody chooses it. The network and the policy aren’t in it, one of each here. A conversation’s base is on G, which stands for the h_S of the Seedelf written to (3); the certificate and the reveal name m_S on h_S itself, which is what ties a messaging register to its Seedelf.
    • A certificate is a constructor, cert(x, x_m, N, g_S, u_S, m_S), with no destructor, as the reveal’s proofs are (14). The owner’s Certify makes one for a Seedelf it minted, or an attacker that holds both keys does. Each check, the writer’s and the reader’s, takes x from a principal’s !Spend and x_m from a principal’s !Ltk and states the real check’s equations by equality: u_S = [x]g_S and m_S = [x_m]h_S. That’s the model’s way to say the proof verifies: the wallet’s check uses public values alone, and no rule outputs a key it took this way.
    • A certificate by keys no principal holds isn’t here. For a principal’s Seedelf its x half needs that principal’s x, which only its theft gives. A thief’s own messaging key stands as a principal’s stolen x_m, which no lemma here keeps from it. So no lemma loses an attack: argued, not checked.
    • x in Messages is one rule, Certify, beside Seedelf (the register itself, joint-security.md’s use 1) and the checks above (rule 8). That’s read from the rules: no lemma here could tell a rule that misused x on a point from one that didn’t, since Tamarin takes no exponent out of a power. spend_key_secret and spend_key_secret_beside_the_reveal show only that no rule outputs x where x is. In the other configurations no rule takes x, so nothing there can output it: a rule outputs only terms made of its premises and fresh values.
    • The list’s rule on two m_S isn’t here (§21.5, §21.8). A writer, or a reader at a reveal, takes any good certificate the attacker delivers. The attacker is the list here, and on the wire it withholds whichever it likes, as a relay can. So the rule takes nothing from this attacker. Each trace found here is, on the wire, one where the relay withheld the owner’s certificate, or the thief listed first and the owner’s wallet then posted nothing. The rule’s own effect, that a Seedelf with two m_S takes no first message, is a denial of service, which no lemma here states.
    • Certify takes only Seedelfs the owner minted. A Seedelf found at a register of the owner’s key, which the wallet certifies once the user turns it on (§21.8), would add only certificates its owner made for registers of its own key: no lemma’s owner changes.
    • Not modelled: the proofs’ soundness and zero knowledge, and both nonces’ safety (one aux, and k_x over T_m), which are algebraic (joint-security.md, rule 2, §7.2; the crate’s tests). Nor revocation by a move, since a name holds one register for good, nor rotation. The withdrawal (use 12) is x_m’s alone, and its claim, that only a certificate’s x_m takes it down, is about what the list shows, which no lemma here states. The off switch, the stamp and the relay’s own chain check are counters and reads, which the tests cover.

How it’s built

The envelope model (2026-11-22) copies the session model’s rules and seals each message. Its precomputation first ran out of memory, past 10 GB, and each cause took a bisection, rule by rule, to find:

Why Tamarin and not ProVerif

The plan named ProVerif by default. ProVerif takes Diffie–Hellman as an equation, and the registers need it with any point as the base: p₀ is itself a power of G, and w₀, E_A and the DH outputs are powers of p₀. Its completion of exp(exp(P, x), y) = exp(exp(P, y), x) didn’t finish on a one-line model. Tamarin’s built-in theory takes any base.