Seedelf-Wallet

Seedelf Messaging v1: security notes

What the crate guarantees, under which assumptions, and what it doesn’t. Unaudited. Seedelf Messaging is outside the bug bounty (SECURITY.md), except a flaw in it that exposes the Seedelf key.

A test on preprod, for now (the owner, 2026-11-24). The Seedelf Wallet opens Messages on preprod only: on mainnet its Messages page has no switch, and nothing of mainnet’s reaches the relay. That doesn’t keep mainnet funds out of the test. The Seedelf key comes from the recovery phrase and an account index alone, so one phrase has the same key on preprod and on mainnet, and Messages reads and writes with that key (joint-security.md lists every use of it). A flaw here that nobody has found yet, if it exposed the key, would expose the key that holds that phrase’s mainnet funds. And two things reach mainnet with no flaw at all: a first message hands its reader a register of the writer’s key (protocol.md §11), and the wallet contract is the same on both networks, so a reader on preprod can pay that register on mainnet, alone or added to a mainnet Seedelf’s register, and learn from what the writer’s mainnet wallet spends which mainnet spends, and which mainnet Seedelf, are the preprod writer’s; and the scan matches any register of the key and names no network, so an envelope sealed to a mainnet Seedelf’s on-chain register and posted to preprod’s pool is one the wallet takes in, and the timing tests (protocol.md §11) reach mainnet Seedelfs too. So the test is for a wallet that isn’t a mainnet wallet: the Messages page says so, and nothing enforces it. And the formats, with what the relay’s v1 routes take and answer, are frozen only from the release that opens Messages on mainnet (protocol.md §20): until then a review’s finding may still change them, and preprod’s conversations and its pool may then be reset.

What the tests establish, and what they don’t

The tests are finite, and they show the code does what construction.md says on the inputs they try:

The tests don’t establish, and can’t:

Those rest on the arguments and assumptions below.

Assumptions

The ten properties

  1. Recipient confidentiality.
    • ECIES-KEM with an AEAD is IND-CCA2 in the random-oracle model under gap-DH (Shoup’s analysis for ISO 18033-2; Abdalla, Bellare and Rogaway for DHIES).
    • v1 differs in two ways: each envelope’s base p is the sender’s own re-randomization of g, and p and w’s tag, so w, are bound into the key derivation (construction.md §4.3). Any well-formed (p′, w′) a querier can make for the recipient is b′, and [y]c′ is then the same Diffie–Hellman value standard ECIES computes with key (g, v). So the standard argument should carry over. It isn’t written out here.
  2. Discovery privacy.
    • Headers say nothing a relay can use about recipients (3).
    • A relay does see what each client downloads and when. Downloading everything hides interest; downloading selectively doesn’t.
    • Scanning costs one scalar multiplication per header after parsing (README, “Measured performance”).
  3. Register unlinkability. Under XDH, no one without y can tell whether two envelopes go to the same recipient, or link an envelope to a known register. That holds except for:
    • The sender, who knows b.
    • A public G2 multiple of y, such as [y]h (construction.md §2).
    • Metadata: timing, the network, and the plaintext’s length, since the envelope is 145 + m bytes with no padding.
    • Datum registers: when the recipient’s register is a Seedelf datum, the sender knows which Seedelf they wrote to.
    • A reaction to a sum of registers. (g₁ + g₂, v₁ + v₂) is a register of y exactly when both (g₁, v₁) and (g₂, v₂) are. So any visible reaction to a bare v1 envelope addressed to the sum, such as a reply, links the two, and so does one to an envelope addressed to a second register of y. Seedelf’s own registers share the property. The session layer closes it for messages (protocol.md §2, §3):
      • a first message proves its base comes from the one handle it names;
      • it proves its writer knows the key, on that base, of every other point the reader’s key meets in it (E_A, A and the first ratchet key), so none can be built on another register’s generator;
      • every message of a request carries the first’s ratchet key;
      • every envelope is bound to its conversation identity, its p and its c both.

      And no session envelope holds a register of its reader’s key, so no payment can be aimed at one to watch who spends it (construction.md §4.3).

    The model states the property symbolically for the bare envelope, by observational equivalence (model/, Unlinkability): no attacker without y tells envelopes to one recipient from envelopes to one and another, or envelopes to a known register from envelopes to a key no one holds. It was proved with w in the header, and again with the tag of w that call 16 puts there (2026-11-23). There DDH holds by construction, so it’s no substitute for the XDH argument (Before production). It also states the binding: a reader takes no first message aimed at another of its handles, whichever of its points is aimed there, unless its own key was stolen first, and the writer takes no reply aimed at one of its handles at all; without each check it would (The outer envelope). Before call 16 that lemma watched only the envelope’s p; with call 16’s checks it watches every point, and it and its controls ran as they must (2026-11-23).

  4. Secret-key compromise. y reads every envelope ever sent to any of its registers, past and future. In the Seedelf Wallet y is Messages’ own key x_m, which spends nothing (Two keys, below).
  5. Ciphertext integrity. A change to any byte is rejected (AEAD, with the header bound). That’s integrity against third parties, not proof of who sent it: anyone with the recipient’s register can make an envelope that opens.
  6. Recipient key substitution.
    • An envelope can’t be redirected: opening needs y, and re-addressing needs the plaintext.
    • A relay can’t swap in another register of the same recipient, because it’s bound.
    • A sender can always encrypt the same plaintext to someone else.
  7. Replay. An envelope can be replayed verbatim and opens again. Nothing in v1 is a timestamp, a counter or a message ID. A recipient can drop duplicates by the envelope’s hash; Phase 2 decides where.
  8. Sender authentication. None in the bare envelope. Envelopes are anonymous, and a “from” written in the plaintext proves nothing.
    • When added, it must bind both parties and the header: for instance a signature over H and the recipient’s register, inside the ciphertext, or an authenticated KEM such as HPKE’s Auth mode. That avoids surreptitious forwarding and unknown-key-share. Neither arises in the bare envelope, because no identity is claimed.
    • The session layer adds it (protocol.md §3): the static DH in the session secret shows the writer holds its identity’s key, and both sides’ identities are in every message’s associated data. A first message’s two proofs, that its base comes from the named handle and that its writer knows the keys the reader’s key meets, are designated-verifier: they convince the reader, who could have made them, and no one else, while the writer’s random source was sound when it made them (The verified reveal, below, has the condition).
    • Behaviour that reveals whether an envelope opened (auto-replies, read receipts, fetch patterns) is an oracle. With every point checked it reveals nothing of y, but it does reveal that the envelope was the recipient’s: a discovery-privacy leak. The session layer’s rules leave a writer no reaction that depends on a register other than the conversation’s: every point the reader’s key meets is bound first (protocol.md §2).
  9. Forward secrecy. None. y is static, so a later compromise reads earlier messages. Ratchets or one-time prekeys are later work.
  10. Cross-protocol key reuse. The labels name the protocol, the version and the purpose, and the shared point is only ever the KDF’s input (construction.md §4.3). The Seedelf key’s one use in Messages, the certificate, is below.

Two keys: spending and reading

Since chunk 55 (the owner, 2026-11-26) Messages reads and writes with a key of its own, x_m, one per network, derived from the wallet’s recovery phrase beside the Seedelf key x (protocol.md §21.2). x spends. For Messages it makes one thing: the certificate that binds a Seedelf to its messaging register M_S = (h_S, [x_m]h_S), whose base is a hash of the Seedelf (protocol.md §21.3, §21.4). Before chunk 55, x read too: one key for spending and reading (the owner, 2026-11-20), argued in joint-security.md as it was at commit c096eab9. tests/seedelf_registers.rs still shows the envelope’s formats and algebra line up with any register of a key, as Phase 1 found.

x_m’s uses: reading, discovery, the handshake’s Diffie–Hellman, the keys proof, the verified reveal, the certificate’s other half, and the withdrawal. x’s, in Messages: the certificate’s x half alone. Its other uses are the wallet’s: spending proofs, Lovejoin’s owner proofs and the one-time signing keys.

Joint security: joint-security.md. It lists every use of each key in the code, the rules each must keep, and a theorem with its proof, game by game, extending Degabriele, Lehmann, Paterson, Smart and Strefler’s Theorem 2 (ECIES-KEM and EC-Schnorr on one key, CT-RSA 2012), in the random-oracle model under gap assumptions:

It’s AI review, not an audit: its outside review is below, under “Before production”. It also says how far Seedelf now keeps NIST SP 800-56A’s rule against one key pair for signatures and key establishment.

What it means in practice:

Implementation notes

What ElfTalk taught

ElfTalk (2025) was earlier Register-based messaging. Its review shaped v1:

ElfTalk’s ratchet and proof-of-work are out of Phase 1’s scope. The proof-of-work idea is worth a look for Phase 2’s spam limits.

The session layer

What its tests establish

What they don’t

Implementation notes

The verified reveal

A Fiat–Shamir OR-proof (Cramer, Damgård and Schoenmakers) that the revealed Seedelf’s register and the initiator’s identity A share a key (Chaum–Pedersen), or that its maker knows the key of the reader’s identity w₀ (protocol.md §19.2). The writer proves the first; the reader holds the second.

What it proves, to the reader:

What it doesn’t:

What the tests establish (src/session/tests/reveal.rs, tests/reveal_vectors.rs):

Before production