Seedelf-Wallet

Two keys for spending and messaging: joint security

A Seedelf wallet has two secret scalars from one recovery phrase. The Seedelf key x spends every Seedelf and every Lovejoin box the wallet holds. Messages’ key x_m reads, writes and proves in Seedelf Messaging. x_m comes from the same BIP39 seed under another HKDF salt and info, one for each account and network (protocol.md §21.2). A certificate binds it to each Seedelf: one proof, under one challenge, of x for the Seedelf’s register (g_S, u_S) and of x_m for its messaging register M_S = (h_S, [x_m]h_S), whose base h_S is a hash of the Seedelf (§21.3, §21.4). The handle stays the Seedelf. The owner chose the split on 2026-11-26 (chunk 55), so that a flaw in Messages’ cryptography can’t spend funds. What it can still give a thief of x_m is messages, and the power to pose to the key’s owner as anyone, a “Verified” Seedelf included, which could mislead the owner into a payment (§8).

Built in 55b to 55e (the plan): the crate, the bindings and the worker. This document argues the design protocol.md §21 specifies, as built, and its inventory (§4) names the code. The one-key version of this document, the argument for the code before chunk 55, is at commit c096eab9:

git show c096eab9:seedelf-platform/seedelf-messaging/docs/joint-security.md

This document:

Status. An argument in the random-oracle model under gap assumptions, in the style of Degabriele, Lehmann, Paterson, Smart and Strefler’s Theorem 2, written for an outside cryptographer to check. Nobody outside has checked it.

What it gives:

1. Why it still needs an argument

Key reuse isn’t safe by default. Degabriele, Lehmann, Paterson, Smart and Strefler, On the Joint Security of Encryption and Signature in EMV (CT-RSA 2012, ePrint 2011/615), §3, forge a signature on a chosen message from EMV’s RSA decryption oracle on the same key. Their §4.4 and Theorem 2 show the opposite for elliptic curves: ECIES-KEM and EC-Schnorr on one key pair are jointly secure in the random-oracle model if gap-DLP and gap-DH are hard. The proof works because each scheme’s oracle can be simulated inside the other’s reduction, and that needs the two schemes’ hash queries to be told apart.

Splitting the key still leaves each key with several uses (§4):

The argument below extends Theorem 2 to each key’s uses and to the certificate between them, and says where that needed something new.

2. NIST SP 800-56A

NIST SP 800-56A Rev. 3, §5.6.3.2, item 5:

A static key pair may be used in more than one key-establishment scheme. However, one static public/private key pair shall not be used for different purposes (for example, a digital-signature key pair is not to be used for key establishment or vice versa; key-usage restrictions could be enforced by a CA when generating certificates) with the following possible exception for ECC and FIPS 186-type FFC domain parameters: when requesting the (initial) certificate for a public static key-establishment key, the key-establishment private key associated with the public key may be used to sign the certificate request.

The one-key design broke this rule on purpose: x proved spending and established keys. Chunk 55 keeps most of it.

How much of the departure is left:

Why that much stays:

What the split gains:

What it still gives up:

3. Setting

Assumptions:

Random oracles. Every hash below is modelled as a random oracle, and rule 3 says why they can be treated as independent ones. Blake2b with different output lengths is a different function: the digest length is in its parameter block. H_base is a random oracle to G1, built on SHA-256 queries that rule 3 keeps apart from every other.

A hash reduced mod q. The challenges of uses 4, 10, 11 and 12, and the base proof’s, are SHA-256’s 32 bytes reduced mod q, as use 3’s is blake2b-256’s. That isn’t uniform on [0, q): 2²⁵⁶ = 2q + r with r ≈ 0.21·q, so a value below r has three preimages and the rest two. Every simulator below draws the 32 bytes and reduces them, as the hash does, so no step rests on uniformity. But a guessed challenge is right with probability up to 3/2²⁵⁶, where a uniform one would give 1/q. A nonce, or b, is HMAC-SHA-512’s 64 bytes reduced mod q, within 2⁻²⁵⁹ of uniform.

Name Function Input starts with Used by
H_spend blake2b-224 g (a compressed point) Use 2’s challenge
H_lj blake2b-256 lovejoin/sigmajoin/v1/ ‖ 0x01 Use 3’s challenge
H_cert SHA-256 Seedelf-Messaging\|v1\|certificate Use 11’s challenge, over both halves
H_wd SHA-256 Seedelf-Messaging\|v1\|withdrawal Use 12’s challenge
The list’s stamps SHA-256 Seedelf-Messaging\|v1\|listing-stamp\|, Seedelf-Messaging\|v1\|unlisting-stamp\| A certificate’s post and a withdrawal’s post (protocol.md §21.7; no key’s use)
H_rev SHA-256 Seedelf-Messaging\|v1\|session\|reveal Use 4’s challenge
H_keys SHA-256 Seedelf-Messaging\|v1\|session\|keys\|handle, or …\|session\|keys\|continuation Use 10’s challenge (the continuation form uses no key)
H_tag SHA-256 Seedelf-Messaging\|v1\|envelope\|tag The scan’s tag (use 7m): over w when sealing, over [x_m]p when the wallet scans
H_base RFC 9380’s hash_to_G1, DST Seedelf-Messaging\|v1\|handle-base\|BLS12381G1_XMD:SHA-256_SSWU_RO_, over network ‖ policy ‖ len(N) ‖ N ‖ g_S ‖ u_S Inside, SHA-256 over 64 zero bytes ‖ … (b₀), then over b₀ ‖ 0x01 ‖ DST′ (b₁) and (b₀ ⊕ bᵢ₋₁) ‖ i ‖ DST′ (b₂ to b₄), 98 bytes each (rule 3) h_S: uses 1m, 4, 6 and 11m
H_kdf HKDF-SHA-256 a salt that’s a Seedelf-Messaging\|v1\|… label or a fresh secret Uses 5 and 6
H_x, H_xm HKDF-SHA-256 of the BIP39 seed, salts seedelf-wallet-v1 and seedelf-messaging-v1   x and x_m themselves
N_spend HMAC-SHA-512, keyed by x seedelf/schnorr/nonce/v1 Use 2’s nonce
N_cert_x HMAC-SHA-512, keyed by x Seedelf-Messaging\|v1\|certificate-nonce\|x Use 11x’s nonce, k_x
N_cert_m HMAC-SHA-512, keyed by x_m Seedelf-Messaging\|v1\|certificate-nonce\|m Use 11m’s nonce, k_m
N_wd HMAC-SHA-512, keyed by x_m Seedelf-Messaging\|v1\|withdrawal-nonce Use 12’s nonce
N_rev HMAC-SHA-512, keyed by x_m Seedelf-Messaging\|v1\|session\|reveal-nonce Use 4’s nonce
N_b HMAC-SHA-512, keyed by x_m Seedelf-Messaging\|v1\|session\|base-scalar Use 6’s b, the writer’s blinding
N_k HMAC-SHA-512, keyed by b Seedelf-Messaging\|v1\|session\|base-nonce The base proof’s nonce (no key’s use)
N_keys HMAC-SHA-512, keyed by x_m Seedelf-Messaging\|v1\|session\|keys-nonce\|a Use 10’s nonce
N_e, N_s HMAC-SHA-512, keyed by e_A and by s_A …\|session\|keys-nonce\|e, …\|keys-nonce\|s The keys proof’s other two nonces (no key’s use)
N_lj RFC 6979’s HMAC-SHA-256 DRBG over x and SHA-256(lovejoin/sigmajoin/v1/ ‖ …)   Use 3’s nonce
H_ot HKDF-SHA-256, salt seedelf-one-time-key-v1, ikm x   Use 8
H_ed SHA-512 of x’s 32 bytes, inside Ed25519   Use 9 (CLI)

Before 55b the code keyed N_rev, N_b and N_keys by x, and had no H_cert, N_cert_x, N_cert_m, H_base, H_xm, H_wd or N_wd.

4. The inventory: every use of each key

Found by reading every crate, the CLI, the WebAssembly bindings and the extension’s worker (2026-11-22), brought up to date for the 1.10.0 gate review’s protocol change (2026-11-23), split between the two keys for chunk 55, and checked against the code 55b to 55e built (2026-11-26). §10 says how to repeat the sweep. Line numbers are at this document’s commit. The uses keep their one-key numbers: 1m, 7x and 7m are the splits, 11x and 11m the certificate’s halves, and 12 the withdrawal. Paths are seedelf-platform’s, seedelf-messaging’s src/ for session/, the wasm crate’s src/ for wasm/src, and the extension’s src/background/ for the worker’s files.

4.1 x’s uses

# Use What x computes What leaves the wallet Where
1 Registers (g, [x]g) on a base the wallet re-randomized with a fresh d, from its root (G, [x]G) The register, on chain seedelf-crypto/src/register.rs:58 (create), :117 (rerandomize)
2 The spending proof (Schnorr, checked on chain, frozen as variant 1) T = [r]g; c = blake2b-224(g ‖ T ‖ u ‖ vkh) over the raw bytes; z = r + c·x. r = HMAC-SHA-512(x, seedelf/schnorr/nonce/v1 ‖ g ‖ u ‖ vkh ‖ 32 random bytes) mod q (T, z) in the redeemer seedelf-crypto/src/schnorr.rs:114 (create_proof), :72 (the nonce, proof_nonce_with), :172; validator seedelf-contracts lib/schnorr.ak at 5b82530
3 Lovejoin’s owner proof (Schnorr, to withdraw a box) t = [r]a; c = blake2b-256(lovejoin/sigmajoin/v1/ ‖ 0x01 ‖ a ‖ b ‖ t ‖ ctx) mod q; z = r + c·x. r from RFC 6979 over x and SHA-256(tag ‖ a ‖ b ‖ ctx), deterministic (t, z) in the redeemer seedelf-crypto/src/lovejoin.rs:199 (prove_schnorr), :130 (the nonce)
7x Ownership tests, for funds Is [x]g = u? For what the wallet spends, shows and refuses, and which Seedelfs it holds, so which it may turn on for Messages and certify Nothing directly: what the wallet spends, shows, refuses or turns on seedelf-crypto/src/register.rs:185 (is_owned, which compares points with blst’s masked equality); seedelf-core/src/lovejoin/mod.rs:498; seedelf-core/src/utxos.rs:68, :163, :601; the worker’s keys.seedelf.isOwned (tx-view.ts:329, balances.ts:552, dapp.ts:2409)
8 One-time signing keys (web wallet) HKDF-SHA-256(salt seedelf-one-time-key-v1, ikm = x, info = a fresh 32-byte seed): an Ed25519 key whose hash is the proof’s vkh Its public key and signatures, in the transaction wasm/src/lib.rs:2077 (one_time_key)
9 The CLI’s external address key (CLI only) Ed25519’s key pair of x’s 32 bytes as a seed; its public key, as 32 bytes, is in turn the seed of the address’s Ed25519 key That second key’s public key and signatures seedelf-crypto/src/convert.rs:23; seedelf-cli/src/commands/external/sweep.rs:29, :65, external/balance.rs:26
11x The certificate’s x half (§4.3) T_x = [k_x]g_S and z_x = k_x + c·x, for a Seedelf of the wallet’s own, with k_x keyed by x c and z_x, in the certificate on the relay’s public list session/certificate.rs:135 (Certificate::make), :166 (k_x), :172 (T_x), :178 (z_x)

4.2 x_m’s uses

x_m has taken these since 55b. Before it, x did (the one-key version, c096eab9).

# Use What x_m computes What leaves the wallet Where
1m Messaging registers M_S = (h_S, [x_m]h_S) for each Seedelf the wallet turns on (protocol.md §21.3), and each conversation’s R_A = (p₀, [x_m]p₀) (use 6) m_S in the certificate, and to the worker’s JavaScript through messagingValue; A in F session/seedelf.rs:135 (Seedelf::base: h_S by blstrs’s hash_to_curve at :136, under HANDLE_BASE_DST, :36), :147 (Seedelf::handle, [x_m]h_S at :149); the bindings’ messagingValue (wasm/src/lib.rs:8457; messaging.rs value, :939), which gives m_S for any (network, name, register) it’s asked, with no check of ownership or certificate, and which the worker asks only for its own W8 and W12 pairs (messaging.ts:4018). R_A: use 6’s
4 The verified reveal (CDS OR-proof, protocol.md §19.2) z₁ = k₁ + c₁·x_m, for branch 1, log_{h_S} m_S = log_{p₀} A. c₁ + c₂ = SHA-256(label ‖ statement ‖ T₁ ‖ T₁′ ‖ T₂) mod q, the statement being cid ‖ p₀ ‖ A ‖ w₀ ‖ len(N) ‖ N ‖ g_S ‖ u_S ‖ h_S ‖ m_S, with T₁ = [k₁]p₀ and T₁′ = [k₁]h_S. k₁ = HMAC-SHA-512(x_m, nonce label ‖ 0x01 ‖ statement ‖ c₂ ‖ z₂ ‖ aux) mod q The reveal, inside the ratchet, to the other side: len ‖ N ‖ g_S ‖ u_S ‖ m_S ‖ c₁ ‖ c₂ ‖ z₁ ‖ z₂, 274 to 305 bytes. It carries m_S, so the reader checks the proof before any read of the chain or the list, then applies §21.5’s conflict rule at the press session/reveal.rs:208 (prove_seedelf, z₁ at :225), :179 (the nonce, hedged_nonce, through session/draw.rs:86, hedged_scalar), :346 (reveal_with, its guard on A and m_S at :356–357); the certificate’s check is the bindings’ (wasm/src/messaging.rs:796–806)
5 Reading (ECIES decapsulation) [x_m]c for the envelope’s c, then HKDF. A session reader then checks c = [r]p, with r = HKDF(salt, mk, …\|ratchet\|envelope-ephemeral) mod q (protocol.md §16.2) Nothing directly: whether it opened shows in behaviour envelope.rs:140 (decrypt_message, the multiplication at :145), reached from session/wire.rs:204 (open); the check is session/conversation.rs:511 (check_envelope)
6 The handshake’s Diffie–Hellman (protocol.md §3, §16.2) As reader: w₀ = [x_m]p₀ on a base the base proof (against the reader’s M_S) or a held conversation binds; then, once the keys proof verifies (it needs no key beyond w₀), [x_m]E_A, [x_m]A, and in the first ratchet step [x_m]S_A, S_A being the header key every message of the request shares. As writer: b = HMAC-SHA-512(x_m, …\|session\|base-scalar ‖ h_S ‖ m_S ‖ F’s head ‖ 32 random bytes) mod q, then A = [x_m]p₀ on p₀ = [b]h_S, the reader’s messaging register re-randomized by b; and [x_m]w₀ A, in F; b never leaves, and the base proof shows it, or the reader’s key, under a nonce keyed by b. Every DH value goes only into HKDF. A and w₀ go into every message’s associated data, which the other side can solve for from the AES-GCM tags (rule 1m) session/conversation.rs:175 (b, through session/first_contact.rs:462, base_scalar), :198 (A), :218 ([x_m]w₀), :296 (the reader’s w₀), :300–302 (its [x_m]E_A and [x_m]A, after the keys proof at :297), :304–306 (x_m as RatchetInitBob’s key); session/ratchet.rs:598 (the first step’s [x_m]S_A)
6′ Continuations (protocol.md §6) The new F’s A = [x_m]p₀ on the old conversation’s base A, in F: the writer’s old public value session/conversation.rs:137 (continue_with, its multiplication at :147), session/inbox.rs:794 (judge, its multiplication at :801)
7m Ownership tests, in Messages The scan: is SHA-256(…\|envelope\|tag ‖ [x_m]p) the envelope’s tag, compared in constant time. And is a register x_m’s: one’s own handle refused, a continuation’s own side, a register under a first message’s to counting for its base proof only if it’s the reader’s, and the reveal’s guard Nothing directly: what the wallet scans, refuses or answers register.rs:107 (matches_register), envelope.rs:158 (matches_envelope, the scan), :76 (Envelope::is_for), :206 (tag_matches); session/reveal.rs:356–357; session/conversation.rs:123 (own handle refused), :147 (a continuation’s own side); session/inbox.rs:652 (receive_opened, its check at :706–707)
10 The keys proof in F (protocol.md §3, §16.2), from a handle only: E_A’s and S_A’s keys, AND A’s key OR the reader’s w₀’s (Cramer–Damgård–Schoenmakers) z₁ = k₁ + c₁·x_m on p₀ = [b]h_S, for A = [x_m]p₀, which the prover computes itself. c₁ + c₂ = SHA-256(…\|keys\|handle ‖ M ‖ T_e ‖ T_s ‖ T₁ ‖ T₂) mod q, where M = p₀ ‖ A ‖ w₀ ‖ E_A ‖ S_A ‖ F″, T₁ = [k₁]p₀, and T₂ = [z₂]p₀ − [c₂]w₀ from the drawn c₂, z₂. k₁ = HMAC-SHA-512(x_m, …\|keys-nonce\|a ‖ M ‖ T_e ‖ T_s ‖ c₂ ‖ z₂ ‖ aux) mod q c₁, c₂, z₁, z₂, with z_e and z_s, in F: to the reader and whoever holds its key session/first_contact.rs:733 (KeysStatement::prove_handle, z₁ at :805, its nonces through session/draw.rs:118, hedged_or_draws, k₁ at :827; its check of A at :774), from Conversation::begin (session/conversation.rs:163, the call at :209–210) for Origin::Handle only
11m The certificate’s x_m half (§4.3) T_m = [k_m]h_S and z_m = k_m + c·x_m, with k_m keyed by x_m m_S, c and z_m, in the certificate session/certificate.rs:161 (k_m), :165 (T_m), :179 (z_m)
12 The withdrawal (protocol.md §21.7): a Schnorr proof of x_m on the withdrawn certificate’s own messaging register (h_S, m_S), which takes that certificate off the list statement = version ‖ network ‖ digest, the digest being the certificate’s listing digest. k = HMAC-SHA-512(x_m, …\|withdrawal-nonce ‖ statement ‖ h_S ‖ m_S ‖ aux) mod q, T = [k]h_S, c = SHA-256(…\|withdrawal ‖ statement ‖ h_S ‖ m_S ‖ T) mod q, z = k + c·x_m. Made only for a certificate that checks and whose m_S is [x_m]h_S The statement, c and z, 98 bytes, to the relay and to anyone who reads its answers. The list then holds a removal for the digest session/certificate.rs:387 (Withdrawal::make, its refusal at :397–399), :404–407 (k), :414 (z); wasm/src/lib.rs:8468 (messagingWithdrawal); the worker’s post, messaging.ts:4199 (postCertificateNow, the call at :4229), to relay.ts:698 (postWithdrawal)

4.3 Use 11, the certificate

Built in 55b (protocol.md §21.4). For a Seedelf N of the wallet’s own, with register (g_S, u_S) and M_S = (h_S, m_S):

What leaves: statement ‖ c ‖ z_x ‖ z_m, 273 to 304 bytes, on the relay’s public list (§21.7).

When, as built (Certificate::make, :135):

One maker (§21.4, “One maker, one derivation”): both nonce derivations and H_cert’s input are fixed by the version byte, and a certificate is made in one call that takes no commitment from outside. It’s the only function that takes both keys.

Where:

Who calls them:

What isn’t a use of x (checked, so a reviewer needn’t look):

What isn’t a use of x_m:

5. The rules

The theorem’s hypotheses. Rules 1, 2 and 7 are x’s, rules 1m and 2m are x_m’s, rules 3 to 6 cover both keys, and rule 8 keeps them apart. Each is a condition on the code, and §10 says which tests hold it. For x_m, the certificate and the withdrawal, §10 marks each as existing or missing.

5.1 x

Rule 1: nothing outputs [x]P for a point P someone else chose, unless [x]P is already public

A static Diffie–Hellman oracle on a key, even a slow one, cuts the cost of finding it. With d answers and d q − 1, Brown–Gallant and Cheon find the key in about √(q/d) + √d operations, against √q ≈ 2^127.4 without them. 2³² divides q − 1, so any number of answers up to 2³² finds a usable d:
Answers Cost of finding the key
none about 2^127.4
2²⁰ about 2^117.4
2³² about 2^111.4

x meets a point a stranger chose only in ownership tests, and in proofs for registers it owns, whose public value is already public:

Rule 2: no nonce rests on the random source alone

Uses 2, 3 and 11x all compute z = r + c·x. One r under two different challenges, in the same use or in any two of them, gives x = (z − z′)/(c − c′), whatever the bases. So:

So a random source that fails or repeats costs x nothing: the same statement gives the same proof again, and two different statements get independent nonces.

Rule 7: a spend’s proofs are bound to a one-time key of the wallet’s own, which signs that transaction alone

A spending proof is bound to a vkh, and the validator checks that vkh among the transaction’s signers. So a proof under a key someone else holds spends the register, and so does a one-time key’s signature on a transaction the wallet didn’t build. x is safe either way; the funds aren’t. So:

Both are conditions on the worker and the CLI, which hold x and so are trusted with it. Nothing below makes them true.

5.2 x_m

Rule 1m: nothing outputs [x_m]P for a point P someone else chose, unless [x_m]P is already public

Rule 1’s table applies to x_m as to x. A hashed point is no one’s choice. Where x_m meets a point the wallet didn’t choose, and what leaves:

So x_m gives no static-DH answer either. On g_S, the plan’s first design, a Seedelf minted under the key from the wallet’s own registers would have made m_S one (§7.4).

Where it’s enforced: no API carries a base.

Rule 2m: no nonce, and no b, rests on the random source alone

Uses 4, 10, 11m and 12 all compute z = k + c·x_m, and one k under two challenges gives x_m. So:

So a random source that fails or repeats costs x_m nothing: the same statement gives the same proof again, two different statements get independent nonces, and b stays secret.

5.3 Both keys

Rule 3: no two uses hash the same input under one function

Treating these as independent random oracles is the standard step of “oracle cloning” by domain separation (Bellare, Davis and Günther, Separate Your Domains, EUROCRYPT 2020). A reviewer should check this rule against the code more than anything else in this section, the certificate’s, the withdrawal’s and H_base’s inputs first.

Rule 4: decision bits are only DDH answers

The wallet’s behaviour shows bits that depend on its keys. Each is a function of whether some (P, [k]P) relation holds for one key k, or of an AEAD check under a key HKDF derived from [x_m]P. So the most any of them gives an attacker is a DDH oracle on that key, and of that only the question “is W = [k]P?” (§3). That’s why the theorem needs gap-DLP and gap-DH, not DLP and CDH, exactly as Theorem 2 does.

Rule 5: every point is checked before a key touches it

Canonical encoding, in G1, not O: register.rs’s is_valid (and blst’s from_compressed), and the messaging crate’s decode_point at every parse (security.md, “Order of checks”). The certificate’s maker takes g_S and u_S only as a decoded Register, so checked before x meets them in its ownership test, and its checker checks every point before it multiplies one (protocol.md §21.4). h_S is RFC 9380’s output, in G1 by its cofactor clearing, and refused if O. Without these checks, a key applied to a point of small order outside G1 leaks it modulo h₁’s small primes (§3), as ElfTalk’s unchecked decompression did.

Rule 6: neither key meets G2

There’s no pairing anywhere either key is used. A public [x]h or [x_m]h in G2 would decide DDH in G1 for that key for everyone: unlinkability would be gone, though not the key.

5.4 Rule 8: the keys stay apart

Why: Part B hands the attacker x_m. That’s sound only if nothing that holds x answers Messages’ inputs but the certificate’s maker, on the wallet’s own Seedelfs, and if no funds hang on x_m. Part C, which hands the attacker x, doesn’t lean on this rule.

Where it’s enforced:

6. The theorem

The games. The attacker gets the wallet’s published registers and certificates, and oracles that do what the wallet does with its keys:

The wallet in this game is the web wallet. Its one-time keys come from x (use 8), so choosing its draws gives the attacker none of them. The CLI draws each one-time key from the random source alone (seedelf-cli/src/commands/spend.rs:26). Whoever predicts that source holds the key a CLI proof is bound to, and can sign another transaction that carries the proof. So under a predictable source Part B doesn’t cover a CLI spend. The CLI has no x_m and runs no Messages.

Theorem (informal). In the random-oracle model, with §3’s hashes as independent random oracles, and the code keeping rules 1 to 8:

(A) Messaging keeps its claims, where it has them. Let P be a property of x_m’s uses 5 to 7m (security.md’s properties, or the handshake’s secrecy and authentication), argued in the random-oracle model by a reduction R_P to an assumption Z_P. Then P still holds, with Z_P, against an attacker that also has the oracles of x_m’s proofs (uses 4, 10 and 11m) and every funds oracle. The loss is at most

q_pf · (q_H + q_pf) / q + ε_key + ε_seed

where:

x’s oracles cost nothing: R_P picks x and runs them as the wallet does. P takes as given that N’s certificate binds the reader’s own M_S, which (B′) proves. No such R_P exists yet (Status).

(B) Spending proofs stay unforgeable, whatever Messages gives away. Say an attacker that holds x_m gets, with probability ε, a transaction accepted that spends a register of x the wallet didn’t sign for. Then either:

From the second, an algorithm of about twice the attacker’s running time finds x with probability about ε′²/q_H − ε′/2²²⁴, where ε′ = ε − δ and δ is the simulation’s loss plus the first case’s chance, added up in B5. It needs a DDH oracle, asked only “is W = [x]P?” (§3), and nothing else: no static-DH answer and no power of x. The same holds for Lovejoin’s owner proof (1/q in place of 1/2²²⁴).

(B′) The certificate’s binding. Say an attacker that holds x_m makes, with probability ε, a certificate good for one of the wallet’s Seedelfs whose statement the wallet didn’t certify. That’s either one naming another m_S, or one naming the wallet’s own m_S for a Seedelf it never turned on, which would opt that Seedelf in to Messages. Then the same reduction, forking at H_cert, finds x with probability about ε′²/q_H − ε′·3/2²⁵⁶. So no one without x points one of the wallet’s Seedelfs at a messaging register, or turns one on.

(C) x_m stays secret, whatever the funds give away. Say an attacker that holds x, with every oracle above, outputs x_m with probability ε. Then an algorithm of about the attacker’s running time finds x_m from [x_m]G with probability at least ε − δ_C (§7.3). It needs a DDH oracle asked only “is W = [x_m]P?”, and nothing else: no static-DH answer, however many conversations the user starts.

(C′) x_m’s proofs are proofs of knowledge. Say an attacker makes, with probability ε, one of these:

Forking it at that proof’s challenge yields a witness, with probability about ε′²/q_H − ε′·3/2²⁵⁶ (§7.3):

So an attacker that makes the wallet accept such a proof without holding its writer-side witness finds x_m.

Corollary. No efficient attacker forges a spending proof for x, and so none finds x, since x makes one. None finds x_m, or proves with it. Under gap-DLP, the best known attack on either key is the discrete log’s, about 2^127.4: Brown–Gallant’s and Cheon’s need static-DH answers or powers of the key, and neither key gives any. x_m is one per network, so that holds for each network’s.

The CLI’s external address (use 9) is spent by Ed25519 alone, under a key that’s a hash of x and so independent of x’s other uses in the random-oracle model (B2). (B) says nothing more about it.

7. The proof

7.1 Part A: x_m’s proofs inside messaging’s reductions

This is Theorem 2’s first half (DLPSS §4.4, “Security of the KEM component”), done once for each of x_m’s proof systems. x’s uses need no step here: R_P picks x itself (§3) and runs them, the certificate’s x half among them, as the wallet does.

In A2, x_m appears only in uses 1m and 5 to 7m, which is P’s own game. So R_P applies as it stands. ∎(A)

7.2 Part B: the funds, with x_m handed over

The reduction B gets a DLP instance X = [x]G and a DDH oracle, of which it asks only “is W = [x]P?” (§3). It draws x_m, every network’s, uniformly as the derivation gives it (§3), and hands it to the attacker: only a query at the wallet’s own seed, ε_seed, tells this from the real derivation. It runs the attacker and simulates every funds oracle without x, taking each value the wallet would draw from the attacker (§6). It also makes the wallet’s one-time keys itself, so it can sign as rule 7 says: one key for each seed, and the same key for a seed the attacker repeats.

The same fork works for Lovejoin’s owner proof, at H_lj. ∎(B)

(B′), the binding. The forged certificate’s statement is one the wallet never certified: another m_S, or the wallet’s own m_S for a Seedelf it never turned on, which the attacker can compute since it holds x_m. So its H_cert point isn’t one B3 programmed, and only x’s half stands in the attacker’s way. B forks there, as in B5. Two accepting certificates on the same (statement, T_x, T_m) with c ≠ c′ give [z_x − z_x′]g_S = [c − c′]u_S, and (g_S, u_S) is the wallet’s register, so x = (z_x − z_x′)/(c − c′). Two answers of SHA-256 reduced mod q coincide with probability at most 3/2²⁵⁶, the fork’s term in place of B5’s 1/2²²⁴. ∎(B′)

Why Part B needs no static-DH answer: x makes no start, opens nothing, and proves nothing on a point a stranger chose but its own registers (rule 1). The one-key proof’s need came from B4’s start (c096eab9, §7.3), which x no longer makes.

7.3 Part C: x_m inside the reduction

The reduction B_C gets X_m = [x_m]G and a DDH oracle, of which it asks only “is W = [x_m]P?”. It draws x itself (§3), hands it to the attacker, and runs every funds oracle as the wallet does, x’s half of every certificate included. It takes each value the wallet would draw from the attacker (§6).

(C′), extraction. The one-key Part B forked at H_spend, on a spend forgery. x_m has no spend, so (C)’s target is x_m itself, with no fork. What forks instead is any proof the attacker gets accepted, each at its own challenge’s hash, by the general forking lemma, with B_C’s simulation as above (the DDH oracle and C1’s programmed points replay before the fork, as B5 says). The fork yields one of the proof’s witnesses, which one depending on how the attacker made the proof:

Each yields its witness with probability about ε′²/q_H − ε′·3/2²⁵⁶, with ε′ = ε − δ_C. So a proof the wallet accepts from an attacker that doesn’t hold the writer-side witness gives x_m. ∎(C′)

7.4 What became of the static-DH step

In the one-key proof, one step of Part B needed [x]P for a point the attacker chose: starting a conversation to its handle needed [x]g_S.

After chunk 55:

What it rests on:

What would bring it back: M_S on g_S, which the chunk 55 plan’s design and its call 5 proposed before §21.3 chose the hash. A Seedelf minted under the key from the wallet’s own registers would then put x_m exactly where the one-key proof had x, class C and all.

This section’s claim is new with this version. Both of 55a’s attacks found it sound (2026-11-26, §10). It’s still the first step for a person to check (§7.5).

7.5 What’s routine and what’s new

Routine:

New, and where a reviewer should push. Items 4 to 8 were pushed on in the one-key version (2026-11-24, §10), and what that left is said with each. Items 1 to 3 and 9 are new with this version, and were pushed on by 55a’s two attacks (2026-11-26, §10), which found nothing that reaches a key.

  1. Two keys from one seed (§3): independent in the random-oracle model, or under HMAC as a dual PRF, but for ε_seed. Push: that no use of either key feeds the other’s derivation, and the salts and infos as built.
  2. The certificate beside x’s other proofs (rules 2 and 3, B3): one challenge over two halves, k_m first, k_x over T_m, one aux. Its x half is simulated with x_m’s half real (B3), and its x_m half with x’s half real (A2). Push: that each simulator is exact when the attacker holds the other key and chooses the source, and that no certificate’s transcript is a spend’s (B5, and the test in §10).
  3. The hashed base (§7.4), which takes the static-DH step out of Part C. Push: indifferentiability as applied here, rule 3’s separation of H_base, and every place x_m meets a base.
  4. Many bases. Each key’s public side is a set of registers, not one key. B handles x’s by re-randomizing X (B1), and extraction needs no log_G g* (B5); B_C handles x_m’s by programming H_base (C1). The step to check is that the attacker can’t gain from registers it re-randomized itself.
    • Pushed for x: each proof is simulated from its own public value alone. Each challenge covers its base and public value, so a transcript moved to d answers another hash input. And a combination of transcripts across bases must meet one hash, not a sum of several the attacker arranges. Nothing found.
  5. Seven proof systems on two keys: x’s spend, Lovejoin’s and certificate half, and x_m’s reveal, keys proof, certificate half and withdrawal. That’s rules 2 and 2m, and the hedging, as the hypothesis that keeps A1 and B2 true when the random source fails. In the one-key design the reveal didn’t meet it at first, and the keys proof’s first design didn’t either (§9).
    • Pushed for all but the certificate: with every draw the attacker’s to choose, each proof is still a function of its nonce’s key and message, and no nonce meets two challenges. What it found is beside the key: the simulated branch’s draws (§9). The certificate’s nonces were confirmed by §21’s review (2026-11-26). The withdrawal (use 12) came after 55a’s review, and hasn’t been pushed on.
  6. The funds game (§6, rule 7): a spend is safe only if its proofs are bound to a fresh key of the wallet’s that signs nothing else. That’s a rule about the worker, not about x.
    • Pushed: under a predictable source it doesn’t cover the CLI (§6). The certificate’s transcript on the Seedelf’s own register has a bound (B5), and will have a test (§10).
  7. Decision bits beyond decryption: the scan, acceptance, what the wallet spends. Rule 4 claims each is a DDH answer. That claim is checked against the code in §4, not proved.
    • Pushed, in the crate and its bindings: each bit is computable from “is W = [k]P?” and the attacker’s own hash queries (C5), and a reveal’s check isn’t one of them (rule 4). Left: timing. A relay that times a wallet’s reads against envelopes it sealed itself gets that answer a page at a time. It’s an oracle for linking, not on a key, and it’s declared (§8), not measured.
  8. Domain separation (rule 3), across functions that Cardano and Lovejoin also use.
    • Pushed for Messaging’s own labels: where each pair first differs, in raw SHA-256 and under HMAC-SHA-512. Not checked again: SHA-512’s other uses (Ed25519, BIP39), and HKDF taken as one oracle though it’s HMAC twice. Routine, and still to do. The certificate’s and the withdrawal’s labels and H_base’s inputs are new. labels.rs holds every label prefix-free and scans every raw SHA-256 call in the crate (§10).
  9. Rule 8, the separation, is a property of code not written yet. Its tests (§10) are what make Part B’s “attacker that holds x_m” honest.

Where the next reviewer should push:

8. What this doesn’t cover

9. Gaps found

Each was found in the one-key design, where the key in each was x. Each now says which key it concerns since chunk 55. Writing this version found no new gap in protocol.md §21. What it found is a step taken away (§7.4) and tests 55b must add (§10).

Fixed: the writer’s b and the base proof’s k

Found by the fresh-context review (§10), and fixed in the change after the reveal’s. Both came from the random source alone, in the order b, cid, e_A, s_A, k:

b unblinded A into [x]g_S, a static-DH answer on a generator the attacker chose. So with a failing source, each conversation the user started to an attacker’s handle handed one out. Not x, and only as many answers as conversations the user started, but exactly what rule 1 forbade.

The fix, the reveal’s hedge (rule 2m’s b and k):

Since chunk 55: b is keyed by x_m and blinds A = [x_m]p₀ on p₀ = [b]h_S. A leaked b would give [x_m]h_S on a hashed base, which no one chose: no longer what rule 1m forbids, and nothing Part C rests on (§7.4). The hedge stays: it costs nothing, and rule 2m has no exceptions.

Fixed before it was built: the keys proof’s nonce

The 1.10.0 gate review added use 10, the keys proof, to bind E_A, S_A and A before the reader multiplies them by its key. Both design reviews of its first draft found the same gap:

The fix is rule 2m’s use 10: one draw of c₂, z₂ and aux for all three nonces, each nonce’s message holding everything its challenge covers, and one helper that draws and derives them together, all again on a zero. A third review then varied every subset of a start’s eight draws (cid, aux_b, e_A, s_A, aux_k, aux, c₂, z₂), and t, and no pair gave the key, e_A, s_A or b. The tests now vary each of a start’s ten draws (the base proof’s c₂ and z₂ came with its designated-verifier form) and every subset of them, and the three mutants each give a secret away under a single varied draw (§10).

Since chunk 55: k₁ is keyed by x_m. The same repeat would have given x_m: messages, not funds.

Fixed: the reveal’s nonce

The reveal’s k₁ came from the operating system’s generator alone. Two reveals sharing a k₁ under different challenges give the key away, and in the one-key design that key spent. The spending proof’s nonce was hedged for exactly this reason (chunk 51, t1a#6), and the reveal didn’t follow it. Fixed with the one-key version of this document:

The handoff that found it proposed HMAC over the statement and aux alone. That isn’t enough: the challenge also covers T₂, built from the drawn c₂ and z₂, so a source that repeats aux but not them would put one k₁ under two challenges. They’re in the message for that reason.

Since chunk 55: k₁ is keyed by x_m, over §21.9’s statement.

Fixed: use 2’s guard

It came out of the same sweep. create_proof made a proof for any register it was given, so the rule that no proof is made for a register x doesn’t own rested on every caller. They all keep it today, but there are about 12 of them, and a JS export (createProof) took any register. It now refuses one, at the cost of one scalar multiplication per input.

Since chunk 55: x’s, unchanged. The certificate’s x half has the same guard from its first draft, behind rule 5’s point checks (protocol.md §21.4, step 1).

Open: the simulated branch’s draws

Found when the written arguments were attacked (2026-11-24, §10). It costs deniability, which isn’t this document’s claim (§8), and not the key.

In the base proof, the keys proof and the reveal, the writer simulates the reader’s branch with a challenge share c₂ and a response z₂. It draws both from the random source alone (session/draw.rs:123–124, hedged_or_draws; session/reveal.rs:176–177, hedged_nonce) and prints both in the proof. Rule 2m covers them only as far as the key needs: each nonce’s message holds them, so no nonce meets two challenges.

Since chunk 55: all three proofs are x_m’s, and so is the fix’s new use. The certificate has no simulated branch: both its halves are proved, and it’s public by design (§8).

Guarded: a repeated start

Found by the attack on the one-key §7.3 proof (2026-11-24, §10), at the side condition that proof had left open. It cost a message’s secrecy and integrity, not the key.

A new conversation’s ID, its e_A and s_A and its first message’s salt are all drawn, and b is derived from drawn bytes. Its t is the clock rounded down to ten minutes, and its stamp is searched from 0. So a start is a function of the key, the handle, the name, t and the draws, and a send a function of the state, the text and the salt. With a random source that repeats (stuck, or a machine’s snapshot restored twice), or one an attacker chooses, a second start to the same handle inside the same ten minutes, or a second continuation of one conversation, made the first one’s conversation again: the same F, SK and chain keys.

Since chunk 55: x_m’s conversations. No part of the theorem needs S now (§7.4), so it costs a message’s secrecy and integrity, and neither key.

10. Keeping it true

The rule (root CLAUDE.md, “Core protocol invariants”): a new use of x or x_m updates §4’s inventory and §5 to §7 first. Nothing may output [x]P or [x_m]P for a point someone else chose, and nothing that holds one key answers the other key’s inputs (rule 8).

The sweep, to repeat it. Search the code for:

Each hit is a use in §4’s tables, a caller of one, or a new use, which needs this document first.

What the one-key tests hold, now on the two keys. Where a test’s key changed with chunk 55, the key it holds now is in brackets.

Chunk 55’s tests, each marked as it stands: existing, with its file and name; held by construction; or missing. Paths are seedelf-messaging’s unless said. The crate’s suite is 255 tests and doctests.

Reviews of the one-key version (2026-11-22 to 2026-11-24). Section numbers in this record are that version’s (c096eab9). What they found is folded in above where it still holds.

A fresh-context Claude review read the first draft and the code (2026-11-22). What it found:

One claim of the review’s was wrong: that seedelf-verification leaves Lovejoin out; it covers Lovejoin v2 (§8).

The 1.10.0 gate review (2026-11-23) changed the protocol before release, and its design reviews read the document against it. What they found:

The written arguments (2026-11-24). One model wrote out, for the base proof, the keys proof and the reveal, the statement, a simulator, an extractor and what a failing source can do to each nonce, each against the code, and §7.2’s reduction step by step. Another model, given that draft, the spec and the code, attacked it. Neither found anything that exposes the key. The draft and the attack’s notes are kept with that review’s files, not in this repository. What they found:

What held: the three proofs’ statements, bytes and nonce derivations; the simulators, as §7.1 states them, and special soundness in every case of the OR-proofs; that no nonce meets two challenges, whatever the draws; and §7.2’s simulation of every call that used the key. What stayed open: §7.3’s static-DH step and ε_key’s term for b; Part A; the oracle model; deniability’s condition and its fix; and timing.

§7.3’s proof (2026-11-24, after the above). One model wrote out the proof of §7.3’s step in the algebraic group model, against the code. Another, given the proof, the spec and the code, attacked it: it redid the three classes, the argument on degrees, the test “is W = [x]P?” from two representations, the reading of x off a forged proof, and the count of powers, sorted each handle shape it could think of into a class, and checked class C’s claim by brute force over a small field. The algebra held, and so did the loss terms. What the attack found:

After chunk 55 no part needs that step (§7.4 here), and its proof is kept with that review’s files.

This version: 55a’s review (2026-11-26). A fresh read of protocol.md §21 (Sonnet) came first. It found no way to recover x or x_m, forge a certificate or forge a spend, and confirmed §21.4’s nonces: one aux, k_x over the statement, T_m and aux, and k_m over the statement and aux. What it changed is in §21: the maker’s point checks before x meets them, the spend’s challenge stated exactly, the labels across functions, and conflicts counted by distinct m_S.

Then two independent attacks on §21 and this document (Fable, Opus). Neither found a way to x or x_m, or a forgery. Both found §7.4’s claim sound: neither key gives a static-DH answer, and Part C needs none. What they found, folded in here and in §21:

It’s still AI review, not an audit.

A review from the same model family shares this document’s framing and blind spots, and a second model’s attack is still not a person’s. Neither replaces security.md’s “Before production” item: an outside cryptographer’s review, starting from this document.

References