The draft for review: conversations, forward secrecy and post-compromise security, built on the v1 envelope of construction.md. The envelope is built, and so is the session layer of §3 to §6, in this crate’s session module (chunk 54’s 54a). §16 fixes every byte and rule the build decided. The relay is built too, in the data layer (54c), and §17 fixes what it takes and gives. A first message now carries a stamp and a proof that its base comes from the handle it names, and every envelope is bound to its conversation (calls 12 and 13, 2026-11-21), so no writer can learn whether two Seedelfs are one wallet’s (§2). The wallet’s worker is built too (54e), and §18 fixes what a message’s plaintext holds. The screens (54f) add the verified reveal: the side that wrote first may show the other one of its Seedelfs, by a proof only the reader can check, while the writer’s random source was sound when it made it (§19; call 15, 2026-11-21; §7 has the condition). The protocol is modelled in Tamarin (model/, 54b), and the design is refined as it’s built.
Two keys (chunk 55, the owner, 2026-11-26; built in 55b): Messages has a key of its own, x_m, one per network, bound to each Seedelf by a certificate the Seedelf key x signs, so a flaw in Messages’ cryptography can’t spend funds. §21 specifies the key, a Seedelf’s messaging register and the certificate, and what such a flaw still gives a thief (§21.1). Where §2 to §20 write a side’s key, x_A or x_B, it’s that side’s x_m. x appears in Messages only in the certificate.
Notation is construction.md’s: additive G1 of BLS12-381, [k]P for scalar multiplication, registers (g, v) with v = [x]g.
| Area | Decision |
|---|---|
| Key encapsulation | ECIES on re-randomized registers: the v1 envelope. |
| Long-term key | Messages’ own key x_m, one per network, from the wallet’s recovery phrase beside the Seedelf key x (§21.2), and bound to each Seedelf by a certificate x signs (§21.4). A Seedelf is the handle: “message me at ⟨Seedelf⟩”. Until chunk 55 (the owner, 2026-11-26) the long-term key was x itself, which spends. |
| Identities | The sender of a first message makes both conversation identities. |
| First message | Protected by the recipient’s long-term key alone until they reply. No prekeys, so the relay holds no key material. A review asked for prekeys; declined for now, to revisit with users. |
| Relay | Keeps envelopes 36 hours, then deletes them, even though a reader must unlock within that time to receive (§13). Proof of work against spam. Senders’ IP addresses are seen, as the data layer already sees them. The wallet uses one relay, which prices each address’s posts by its recent traffic, and says so (§10). |
| Local state | Conversations live in the browser. Deleting the wallet’s data loses them. |
| Proving who you are | The side that wrote first may show one of its Seedelfs once the other side has replied, by a proof that convinces only the reader, as long as the writer’s random source was sound when it made it (§7, §19; call 15, 2026-11-21). A proof the reader could show others stays undecided until users ask for it (§7). |
| First-contact stamp | A first message to a new conversation carries proof of work over its first-contact block, 2²⁴ attempts, which the reader checks before computing any key (§3; call 12, 2026-11-21). |
| Unlinkable handles | A first message proves its base re-randomizes the handle it names, and every envelope goes to its conversation identity re-randomized by a scalar from the message key, which the reader checks (§2; call 13, 2026-11-21). Since call 16, every other point the reader’s key meets is bound too, and no envelope holds a register of anyone’s key (§2, §3). |
| Groups | Later, on top of one-to-one sessions. |
| Post-quantum | Later. |
The first review (2026-11-20) added:
36 hours stands, despite the unlock trade it raised (§13).
Building the session layer (54a) decided what the reviews left open, each marked [choice] in §16, and found one thing the wallet must handle: a first message is refused once its t is 48 hours old, so a conversation nobody has read within 48 hours of its start can never begin, however many first messages follow (§16.4, “A first message’s life”). The vectors were reproduced by an implementation written from §16 alone, before call 16 changed them, and again as they are now, from the spec and the files alone (2026-11-23 and 2026-11-24; §16.6 says what wasn’t).
Modelling the protocol (54b), in Tamarin (model/), states as lemmas what §1.1 says of each long-term key, each side’s state and one message key, §3’s hold on R_A, agreement both ways, out of order included, §5’s rule on a cid, §6’s continuations and §19’s verified reveal. Every lemma was proved before call 16 (2026-11-22, the model’s README); call 16 and the gate changed the models, and check.sh proved them again (2026-11-23, 2026-11-24) but for heal_keys_secret, which holds by a run on the model without two actions it doesn’t read, and four traces and answers_alike with its two controls, argued, not checked (the model’s README). Its review added to this spec: what a stolen x_B allows before Bob’s first reply, key-compromise impersonation (§1.1, §7), and why w₀ must stay in the associated data (§3). Its follow-up models the outer envelope. Before call 16 its lemmas watched only the envelope’s p, so they never showed that the outer scalar’s check was enough (the model README). Since call 16 they state that the reader’s checks of the outer scalar and of the envelope’s ephemeral point (§4.1), and of F’s keys and base proofs (§3), are each needed, each with a control that drops it, and that together, within the model’s assumptions, they make the reader take no first message or reply in which any point its key touched is aimed at another of its registers, unless the reader’s own key was stolen first (2026-11-23). That its reactions so tell no writer that two handles are one wallet’s, and no responder who wrote, is argued, not checked: the model’s pair for it, answers_alike, has no result. That key makes both proofs’ designated-verifier branches, and tests the link with no reaction. Continuations are argued from first contact, not checked. Its lemmas also state that Bob’s replies open to x_A alone, and that one kept message key writes nothing on the wire, where AES-GCM’s tag can be redone with the key; and its pairs, that the bare envelope, with a tag of w in its header, is unlinkable, by observational equivalence. Before call 16 those three were proved for the envelope as it was, with w in its header and a drawn r, and with call 16’s they were proved again (2026-11-23).
Since chunk 55’s 55g the models have both keys (2026-11-28). The lemmas above are the one-key model’s, and still hold with x_m as its key: Tamarin reads those configurations as before. Two configurations add x and §21’s certificate. In them, no rule gives x away even with every messaging key stolen; a writer writes to a Seedelf only at its owner’s x_m unless its x was stolen first; and the reveal’s excuses name each key (the model’s README, Two keys). Their lemmas were run one at a time; the whole run with two keys is still to do.
The second review (2026-11-20), recorded in protocol-review.md, changed:
The 1.10.0 gate review (call 16, 2026-11-23) changed, before any of this shipped, what a stranger could still learn or cause:
Every message is three layers deep:
matches_envelope), one test per envelope however many conversations they have.Alice wrote first; Bob was written to. x_A and x_B are their messaging keys (§21.2), and x a side’s Seedelf key.
| Compromised | Reveals | Doesn’t reveal |
|---|---|---|
| Bob’s x_B | Which envelopes are Bob’s, and their outer layers: cids, ratchet headers, first-contact blocks. The content of every message Alice sent before she received Bob’s first reply. Stolen before that reply reaches her, the power to forge it and take the conversation over from her side. | Anything Bob sent: his replies are sealed to R_A, which x_B doesn’t open. Anything Alice sent after receiving Bob’s first reply. |
| Alice’s x_A | Which envelopes are Alice’s, and their outer layers. | Any content: the session secret also needs e_A or x_B (§3). |
| Either side’s x_m | The power to pose as that side in new conversations and in continuations (§6). The power to pose to that side as anyone: any R_A; a continuation of any of its conversations, which it would label “Continues”; and a reveal of any Seedelf with a good certificate, proved on the reader’s own branch, which it would label “Verified ⟨N⟩” (§19.5). That’s key-compromise impersonation, as in X3DH. A false “Verified” could mislead that side into a payment. | The content of existing conversations’ later messages. Any funds: x_m spends nothing (§21.6). |
| Either side’s x | The Seedelf’s funds. The power to certify a messaging register of the thief’s choosing for that side’s Seedelfs (§21.4). Later first messages from writers who read that list then go to the thief, or, beside the real certificate, to no one (§21.5). | Any message sealed to x_m, which isn’t derived from x. But first messages written after the thief’s certificate is the one good one are the thief’s. |
| One message key | That message. | Any other. |
| A conversation’s current state (the device) | Its stored history and skipped keys, and its messages until a ratchet round trip the attacker only watches. | Messages after that round trip. Nothing protects against an attacker who uses the stolen state to step into the conversation. |
| An old copy of the state | Messages sent after the copy was taken, until the next ratchet step. | Messages before the copy. |
| The browser’s data at rest | Without the wallet’s password: that Messages is on for a network (a setting), that it was used, how many conversations each network has and roughly how long each is (its record’s padded size), roughly how much a read found for it that isn’t taken in yet, and how much strangers’ requests and the messages waiting to be posted hold (the padded sizes of the records that hold them), and, once a step’s WebAssembly has trapped and locked the wallet, which step it was, the scan or the take (a mark that isn’t sealed). Records are sealed under a key that exists only while unlocked, and each conversation’s is named by an ID of its own. While unlocked, everything stored, history included. | Without the password, anything in a record. |
| The relay | §11’s metadata, the certificate list’s among them. It can also withhold, delay, reorder and replay envelopes (§5, §6), and withhold or drop certificates, so that writers can’t reach a Seedelf (§21.7). | Content, or a message it could forge. Whom an envelope is for, from its bytes: only timing can test that (§11). No envelope holds a register of its reader’s key, or of any key a wallet holds, so neither the relay nor anyone reading the pool can pay one and watch the chain for who spends it (§2). |
Forward secrecy covers everything Bob sends from his first message on, and everything Alice sends once she has received his first reply. Recovery after a compromise needs a full ratchet round trip after it, and an attacker who only watches.
to and proves the base re-randomizes it (§3). to is verified, not claimed.Alice holds Bob’s messaging register M_S = (h_S, m_S), the one m_S that the certificates good for his Seedelf N name (§21.5, §21.8).
replaces. It blinds A = [x_A][b]h_S. Whoever learned it would get [x_A]h_S: x_A on a hashed point nobody chose, so not the static-DH answer it was when the base was the Seedelf’s own generator (joint-security.md, rule 1m), but still Alice’s key on Bob’s base;The first-contact block:
F = cid (16) | t (8) | to (1 + 0–32) | replaces (1 + 0 or 16) | p₀ (48) | A (48) | E_A (48) | base proof (0 or 128) | keys proof (192 or 96)
to is empty.to is, 128 bytes. A proof that Alice knows b with p₀ = [b]h_S for the messaging register (h_S, m_S) of the handle named in to, OR knows that register’s key, x_B with m_S = [x_B]h_S, with the rest of F in its challenge and its nonce derived from b and everything the challenge covers (§16.2). It’s an OR-proof (Cramer, Damgård and Schoenmakers), designated-verifier: Alice proves the first branch and simulates the second.
to verified, and keeps p₀ off the sum of two handles (§2).The session secret comes from F, not from any one envelope:
SK = HKDF-SHA256(salt = "Seedelf-Messaging|v1|session|salt",
ikm = [e_A]w₀ ‖ [x_A]w₀,
info = "Seedelf-Messaging|v1|session|SK" ‖ F)
Bob computes the same input as [x_B]E_A ‖ [x_B]A.
RatchetInitAlice (§4.1). R_B stands in for a signed prekey: Bob’s initial ratchet key pair is (x_B, w₀) on the base p₀, which is the “long-term key only” decision. Alice computes (RK, CKs) = KDF_RK(SK, [s_A]w₀).Every message until Alice receives Bob’s first reply is a first-contact message:
0x01 | F | stamp (8) | ratchet header (56) | ratchet ciphertext
0x02 once a reply from Bob decrypts.Bob’s side, for a 0x01 whose cid he doesn’t know. Every point was checked, canonical, in G1 and not O, when the envelope was opened. Then, in order, each check before anything costlier, and each binding a point before the next step raises it to Bob’s key:
to: refuse it unless to names one of Bob’s handles and the base proof verifies against that handle’s messaging register M_S (§21.8). Without one: refuse it unless it’s a verified continuation of one of Bob’s conversations (§6). Either way p₀ is now bound.RatchetInitBob(SK, (x_B, w₀)) and decrypt, on a copy of the state (§4.2). Check the envelope went to R_B re-randomized by the message’s outer scalar (§4.1), and that its c is [r]p (§16.2).A conversation someone else started is a request until the reader replies.
0x01 messages as they arrived, as bytes, and no ratchet state. The wallet decrypts them in memory to show them, and builds the state from F when the reader replies. RatchetInitBob is deterministic in F and x_B, so nothing is lost by waiting.0x01 with a request’s cid, F and header key joins it only within its share and the 256 KiB; past them it’s refused (RequestFull), and a join never pushes another request out.The Double Ratchet is specified in Signal’s The Double Ratchet Algorithm, revision 4 (2025-11-04), by Trevor Perrin (editor), Moxie Marlinspike and Rolfe Schmidt (revision 3+). The crate follows its §3, without the header encryption of its §4 or the post-quantum ratchets of its §5 and §6. Its names are used as it defines them: RatchetInitAlice, RatchetInitBob, RatchetEncrypt, RatchetDecrypt, TrySkippedMessageKeys, SkipMessageKeys and DHRatchet; GENERATE_DH, DH, KDF_RK, KDF_CK, HEADER, CONCAT and ENCRYPT; its state RK, CKs, CKr, DHs, DHr, Ns, Nr and PN; and MAX_SKIP. Where this document says otherwise, this document holds. The crate runs it with these choices:
| Piece | Choice |
|---|---|
| DH | G1, on the conversation’s base p₀: a key pair is (s, [s]p₀), and DH(s, P) = [s]P, compressed. A received point must be canonical, in G1 and not O. |
| GENERATE_DH | A scalar uniform in [1, q − 1] and its point on p₀ (§16.1): s_A at the start, and a new one in each DHRatchet (§16.3). |
| HEADER | DHs (48) \| PN (4) \| N (4), the counters big-endian u32 (§16.1). |
| AD and CONCAT | AD is cid ‖ R_A ‖ R_B, 208 bytes, the same both ways. CONCAT(AD, header) is the two side by side, with no lengths, since each part’s length is fixed: §16.1’s 264-byte associated data, which is ENCRYPT’s ad. |
| Bob’s first key pair | (x_B, w₀): his long-term key on p₀ stands in for the signed prekey (§3). Only a scratch state holds it (§16.2). |
| KDF_RK(rk, dh) | HKDF-SHA256(salt = rk, ikm = dh, info = “Seedelf-Messaging|v1|ratchet|root”), 64 bytes: the new root key, then a chain key, as Signal’s §7.2 recommends. |
| KDF_CK(ck) | HMAC-SHA256(ck, 0x01) is the message key; HMAC-SHA256(ck, 0x02) is the next chain key, as Signal’s §7.2 recommends. |
| ENCRYPT(mk, m, ad) | A fresh random 16-byte salt; key ‖ nonce = HKDF-SHA256(salt = salt, ikm = mk, info = “Seedelf-Messaging|v1|ratchet|message”), 44 bytes; the output is salt ‖ AES-256-GCM(key, nonce, ad, m). Signal’s §7.2 recommends AES-256-CBC with HMAC instead, its keys and IV from HKDF under a zero salt: here the salt is drawn and sent, and also derives the envelope’s o and r (§16.2). |
| Header encryption | None: the outer layer already hides the header from everyone without the reader’s key. |
| The envelope’s register | The other side’s conversation identity re-randomized by the message’s outer scalar o, derived from the message key and the ratchet salt (§16.2), not a random b; the envelope’s ephemeral point is [r]p, its r derived the same way, not drawn. The reader checks p = [o]p₀ and c = [r]p once the message decrypts. It binds every envelope to its conversation, so none can be aimed at another register of the reader’s (§2). |
| MAX_SKIP | 1,000 keys skipped by one message in all, across the chain it ends and the chain it starts, not per chain as Signal’s SkipMessageKeys bounds them (§16.4); each stored key deleted 48 hours after it was stored, and at most 2,000 stored. No message makes the reader store more. One past the bound is refused, and said to be too far ahead only if it authenticates, which the reader learns by stepping its chain on a copy, at most 4,096 keys, storing none (§6, §16.4). |
Inside the outer layer, a session message is:
0x02 | cid (16) | ratchet header (56) | ratchet ciphertext
The associated data is cid ‖ R_A ‖ R_B ‖ ratchet header, as in §3. It goes to the recipient’s conversation identity re-randomized by its outer scalar.
The recipient:
Reusing a message key is the one mistake the ratchet can’t survive. In an extension it’s easy to make: two screens sending at once, or a worker stopped mid-send.
Sending:
pending. A first-contact message past the request’s share (§3.1) is refused before the chain moves, and nothing is written.posted once the relay takes it or says it already has it.After a restart, every pending envelope is posted again, the same bytes. A message key is never used for anything else.
Receiving:
A restart asks no page again: the next read goes on from the saved cursor, and the take from its record. A restart between 3 and the take record’s write decrypts the envelope again: its key is gone, so it’s dropped as a duplicate (§5). What a stop catches before it’s in the take’s record is lost, and counted.
What the salt does and doesn’t do. Even a message key used twice gives two unrelated AES-GCM keys and nonces, unless the random source failed too. That protects confidentiality, not correctness: the reader still takes one message per key, and the second is lost. It’s a net under the state machine, not a substitute for it.
Restoring old storage (a copied browser profile) rolls a conversation back. Its next messages reuse counters the other side has already used, and they’re dropped. The salt keeps that from becoming a leak, and the conversation may need starting again (§6). It keeps it only while the random source is sound: the salt is drawn, so storage rolled back together with a source that repeats seals another text under a key and nonce already used (§13).
0x01 for a cid the reader has, as a conversation or a request, counts only if its F is the stored F. Then it’s a ratchet message of that conversation. Otherwise it’s dropped. It never starts the conversation again.0x01 for an unknown cid is refused if its t is more than 48 hours old or more than an hour ahead of the reader’s clock, if its stamp shows too little work, or if, with a to, its proof doesn’t show its base re-randomizes that handle of the reader’s, or, without one, it isn’t a verified continuation of one of the reader’s conversations (§3). A to whose proof fails isn’t saved by replaces.0x01s after t + 48 hours, by a clock that’s right. The 7 days are a margin [choice], 24 bytes a deletion: a clock that ran ahead by less than that for an expiry, then was set right, can’t delete a tombstone rule 2 still needs, and reopen the cid. Before call 16 a tombstone held only while now ≤ t + 48 hours, so one expiry by a clock a day ahead did.The reader’s clock judges rule 2, and when rule 3’s tombstones go. A clock set far wrong moves the window with it. One set back can’t reopen a deleted cid: only an expiry by a clock more than 7 days ahead, while the window would still take the cid’s first messages, deletes a tombstone early.
A session message more than MAX_SKIP keys ahead that authenticates, with its envelope at the conversation’s identity, is refused as too far ahead: the wallet says the conversation can’t continue, and offers to start again. The reader learns it authenticates by stepping its chain on a copy, at most 4,096 keys, storing none (§16.4). Anything else past the bound is dropped as a forgery is, so no one but the other side can make a conversation look dead.
0x02 for an unknown cid shows as a message from a conversation this browser no longer has.replaces names the old cid;The static DH in the session secret (§3) then proves the writer holds the old key for their side.
to: the old base has no handle to prove.replaces that names a handle, with its proof, shows as a new request that says it continues the old one, unverified. That’s how a side that lost its state writes fresh to a handle.What the wallet says about the other side:
| Label | When | What it means |
|---|---|---|
| ⟨handle⟩ | The reader wrote first, to that handle | The other side holds that handle’s key, as the chain read gave it. Only that key opens the first message. |
| Unknown sender | The reader was written to | The other side controls this conversation’s R_A (§3), and nothing more. |
| Says they’re ⟨handle⟩ (unverified) | A message names a handle | Nothing: a claim. No message’s content changes a label, and the wallet never shows one: it would be a tool for phishing. |
| Continues ⟨conversation⟩ | §6’s match | The same keys as the old conversation. |
| Says it continues ⟨conversation⟩ (unverified) | A replaces without §6’s match, in a first message from a handle |
Nothing. |
| Verified ⟨handle⟩ | The reader was written to and replied, and the other side then showed that handle with §19’s proof, for the register the chain gives it now | The other side holds that handle’s key, as a fresh read of the chain gave it when the reveal was checked. It convinces the reader alone, on the condition below. |
to shows which of the reader’s handles a first message was written to: verified by its base proof (§3), not claimed. Verified to the reader: anyone else must know b to make the proof, but the reader could have made it with its own key.
Every label assumes the reader’s own x_m is safe. With it, anyone can pose to the reader as any R_A, as a continuation of any of its conversations (§1.1), and as any handle in a reveal, whose proof the reader’s key can make (§19), as it can make F’s two proofs (§3).
to, at t. Before chunk 55 a payment that tied R_A to a wallet (§2) could do the reveal’s part. Since it no payment ties R_A to anything (§21.6), so only a reveal, or the writer’s own key, ties F to who wrote it.Measured on the same machine as the README: an Intel Core i5-12400F, one thread. The WebAssembly figures come from a scratch harness built the way the wallet builds its module (wasm-bindgen 0.2.128, clang 21, the wasm-release profile) and run in Node 24, whose V8 is Chrome’s engine. The wallet’s size-optimized profile measured the same as -O3.
| Step | Native | WebAssembly |
|---|---|---|
Scan an envelope (matches_envelope) |
0.18 ms | 1.02 ms |
| Full parse | 0.16 ms | 0.88 ms |
| Open a match (full parse, then decrypt) | 0.31 ms | 1.77 ms |
| Encrypt an envelope | 0.31 ms | 2.2 ms |
These were measured before call 16, when the scan checked p and w and the full parse three points. The scan now checks p alone and hashes [x_m]p, one subgroup check fewer and one SHA-256 more; the full parse checks two points. The multiplication, the cost that matters, is unchanged.
In the wallet’s own module (54d), through its bindings and called as the worker will call them: messagingScan takes 200 envelopes a call as JSON of hex, with a turn of the event loop between calls. Measured with node scale.mjs messaging (seedelf-wasm’s README) on the same machine, 2026-11-21, and in a module worker in headless Chrome 157, the engine the extension’s service worker runs, with a scratch harness running the same steps:
| Step | Node 24 | Chrome 157, a worker |
|---|---|---|
| Scan an envelope | 0.97 ms | 1.09 ms |
| Scan 15,000 envelopes | 14.6 s | 16.3 s |
Open a match (messagingOpen) |
1.9 ms | 2.1 ms |
| Receive a message that takes a ratchet step, with its record | 5.7 ms | 6.1 ms |
The bindings’ JSON and hex cost nothing measurable beside the scalar multiplication: the scan matches the scratch harness’s 1.02 ms.
Scale:
isOwned row test, measured at 0.73 ms a row in the module (wasm/README.md) before call 16 made it compare points, agrees with these figures: like the scan it checks one point and multiplies once, and it also decompresses the public value where the scan hashes [x]p.Per matched envelope, a conversation’s ratchet adds:
A conversation’s first message:
0x01 costs only the outer four. Writing first also hashes h_S to the curve and checks N’s certificate (§21.4), which these counts leave out. The stamp adds 2²⁴ SHA-256 attempts on average, about 7 s of WebAssembly (§16.4).A message past MAX_SKIP costs a held conversation at most 4,097 chain steps (KDF_CK, two HMAC-SHA256 each) and the tag, one multiplication more on a new header key, and the envelope’s two if it authenticates; nothing is stored (§16.4). A forgery whose header is further ahead costs nothing.
0x02 adds 105 bytes: the type, the cid, the ratchet header, and the ratchet ciphertext’s 16-byte salt and 16-byte tag.0x01 adds F and the stamp in place of the cid, F + 97 bytes: 588–635 from a handle (F’s 491–538), 379 for a continuation (F’s 282).replaces), 1,314 under a 1-byte to, and 1,523 in a continuation; 8 KiB 7,427 (7,411, 7,458 and 7,667); and 32 KiB, the most a message carries, 32,003 (31,987, 32,034 and 32,243). These are bytes of the session layer’s plaintext, the wallet’s kind byte among them (§18), so a wallet’s text has one byte less: 1,282 bytes in 2 KiB to a Seedelf’s 32-byte name. Before a reply, the writer’s share bounds it too (§16.4).0x01 fits it, a continuation’s included, and every 0x02 is padded past it. A reader takes it all the same (§16.1).§17 fixes the details as built (54c); the protocol needs only this:
The relay names the price it wants, and a post refused for too little work is solved again for the same envelope bytes. As a price, it lets an honest user behind the same address as a flooder through, only slower.
What 36 hours means:
From the cryptography: an envelope’s bytes say nothing of whom it’s for (DDH in G1), and nothing of what’s inside without the reader’s x_m. None holds a register of anyone’s key, so no one can pay one and watch the chain for its spend (§2).
From the network, which no cryptography here hides, the relay and anyone watching learn:
already answer, and a full pool’s Retry-After, say it only to 10 minutes (§17.2);From the certificate list (§21.7):
What the relay can also do: withhold, delay, reorder or replay envelopes (§5, §6), and withhold or drop certificates (§21.7). It can’t read, address or forge either.
What’s claimed and what isn’t: no envelope names its recipient or sender, and no writer can learn from a reader’s replies whether two Seedelfs are one wallet’s (§2). That’s about replies: a payment is another question, below, and so is the timing above. Nor is it claimed that the timing of a wallet’s requests is hidden from the relay or the server it reads the chain through (the owner, 2026-11-24): they see when a wallet asks and how often, what the wallet does about it is what it does, not a guarantee, and timing that depends on the key isn’t part of that. There’s no claim of anonymity against an observer who watches the whole network.
What the wallet and the privacy policy say: the relay can’t read messages, or tell from a message whom it’s for. It sees the IP address that reads and posts and when, the cursor a wallet returns with, and counts each address’s posts and reads, in memory, against floods.
The other side of a conversation learns:
A holder of the reader’s x_m learns §1.1’s first two rows. A holder of its x learns neither (§1.1’s x row).
Per conversation:
Kept apart from conversations:
Versions. Each record starts with its version (§16.5). One of a version this build doesn’t read is refused at that byte, never misread, so the wallet can tell an older record from a newer: the records development builds wrote before call 16 are version 1, which 1.10.0 refuses. A conversation whose record a later version wrote is kept as it is and never opened: its messages are passed over as they come.
Storage and loss:
Unlocking versus the expiry: decided, 36 hours (the owner, 2026-11-20). Discovery needs x_m, which the wallet derives at unlock and holds as it holds x, so only while it’s unlocked. So a message reaches its reader only if they unlock within 36 hours, and the wallet says so. The alternatives stay on record, to revisit with users:
Open:
to is now required except in a continuation, and a continuation without a handle must be verified.
54d measured the scan and both stamps in the wallet’s module, in Node and in a Chrome worker (§8, §17.3). The extension’s own service worker, its memory, a slow laptop and the storage are 54e’s.
| Signal | Here | |
|---|---|---|
| What the server knows | Each message’s recipient, and partly its sender | The IP address that posted each envelope, and when; never whom it’s for (§11) |
| First message | Forward-secret through prekeys | Long-term key alone until Alice receives the first reply (§1.1) |
| Later messages | Double Ratchet | Double Ratchet: forward secrecy and recovery as §1.1 says |
| Authentication at the start | X3DH’s DHs, with signed prekeys | Implicit, by the static DH in SK, with F’s keys proof that the writer knows each key Bob’s meets (§3); Bob learns a conversation identity, not a person |
| Ratchet header | Plain, or encrypted in the header-encryption variant | Inside the outer layer |
| Identity | A phone number or username, with safety numbers | A Seedelf handle. The sender is anonymous unless they reveal one (§19). |
| Deniability | Yes | Yes, while the writer’s random source was sound when it made them: F’s two proofs and a reveal each convince only their reader, who could have made them (§3, §19). A source that had failed can leave them plain proofs anyone checks; what was said stays deniable (§7) |
| Message lifetime on the server | Until delivered, with a limit | 36 hours, delivered or not |
| Groups | Sender Keys | Later |
| Post-quantum | Yes (PQXDH and the ratchet’s additions) | Later |
| Multi-device | Yes | No |
| Phase | What |
|---|---|
| 1 | Done: the v1 envelope, and its scan. |
| 2 | The relay: storage, the 36-hour expiry, proof of work, duplicates, the cursor. Built (§17), in the data layer (54c), with a day’s reading per address and an off switch since the 1.10.0 gate. |
| 3 | Sessions: §3 to §6 in this crate, with vectors, property tests and the protocol model. Built (§16), with vectors independently reproduced before call 16 re-recorded them and again since (§16.6 says what wasn’t), and modelled in Tamarin (model/, 54b): every lemma proved before call 16, and again with call 16’s rules but for those the model’s README names and argues for. |
| 4 | The wallet: WebAssembly bindings, the worker’s queue, chunked scanning, encrypted local state, requests, a Messages screen, sender labels, “message me at ⟨Seedelf⟩”, and the verified reveal (§19). Built (54d to 54f′), and in the 1.10.0 gate’s review (54g), with call 16. |
| Later | A proof of who you are that others can check, groups, post-quantum, delivery receipts, prekeys if users want them. |
§3 to §6 are built in this crate’s session module, as plain Rust with no network, no storage and no clock: the caller passes now, by the reader’s clock, and stores the bytes each state gives. This section fixes every byte and every rule the build had to decide, so another implementation needs nothing else. Choices made while building, not in the reviews, are marked [choice].
0xc0 then 47 zero bytes. A point that is a KDF’s input (a DH output, or z) is its 48 compressed bytes too.cid (16) | t (8) | len (1) | to (len, at most 32) | len (1, 0 or 16) | replaces | p₀ (48) | A (48) | E_A (48) | base proof | keys proof (§3). to is the asset name’s raw bytes, not hex.
c₁ (32) | c₂ (32) | z₁ (32) | z₂ (32), is there exactly when to’s length isn’t 0. An F with an empty to must have a replaces: it’s a continuation. Anything else is refused.to sets: from a handle c₁ (32) | c₂ (32) | z₁ (32) | z₂ (32) | z_e (32) | z_s (32), in a continuation c (32) | z_e (32) | z_s (32).cid | t | len | to | len | replaces: what b covers, since p₀ follows from b.DHs (48) | PN (4) | N (4), 56 bytes.cid (16) | p₀ | A | p₀ | w₀ | header (56), 264 bytes: cid ‖ R_A ‖ R_B ‖ header. w₀ must stay in it (§3).salt (16) | AES-256-GCM ciphertext | tag (16).0x01 | F | stamp (8, big-endian) | header | ratchet ciphertext and 0x02 | cid | header | ratchet ciphertext. Any other type byte is refused.inner | 0x80 | 0x00… to size − 145 bytes, where size is the smallest of 512, 2,048, 8,192 and 32,768 that holds, with the marker, the message’s first-contact form, F + 97 bytes and its plaintext, and never less than its own inner message (§9; the owner, 2026-11-23): either side’s, before a reply and after one. A plaintext whose first-contact form fits no size is refused (MessageTooLarge), after a reply too, and the state is as it was. A reader takes any of the four sizes, 512 included [choice: a sender may pad up], and refuses any other length, or padding whose last nonzero byte isn’t 0x80.The outer envelope: v1 (construction.md §4), with the padded inner message as its plaintext, to the recipient’s conversation identity re-randomized by the message’s outer scalar o (§16.2): v1’s b is o, and its r is the envelope’s r (§16.2), neither drawn. The identity is R_B = (p₀, w₀) for the initiator’s messages, R_A = (p₀, A) for the responder’s. So every session envelope is exactly 512, 2,048, 8,192 or 32,768 bytes (a 1.10.0 writer’s 2,048 and up), its p is [o]p₀ and its c is [r]p, and it carries the tag of [o]V, V the recipient’s public value on p₀, never [o]V itself:
0x01 | p (48) | tag (32) | c (48) | AES-256-GCM ciphertext | AES-GCM's tag (16)
with tag = SHA-256(Seedelf-Messaging|v1|envelope|tag ‖ [o]V). The 0x01 is the envelope’s version, not an inner message’s type. Nothing in an envelope is a register of either side’s key (§2): (p, c) is one of r’s, which no wallet holds.
x_A and x_B are each side’s messaging key, x_m (§21.2), and the handle’s register is its messaging register M_S = (h_S, m_S) (§21.3).
| Step | Definition |
|---|---|
| SK | HKDF-SHA256(salt = Seedelf-Messaging\|v1\|session\|salt, ikm = [e_A]w₀ ‖ [x_A]w₀, info = Seedelf-Messaging\|v1\|session\|SK ‖ F), 32 bytes. The responder’s ikm is [x_B]E_A ‖ [x_B]A. |
| RatchetInitAlice | DHs = (s_A, S_A), DHr = w₀, (RK, CKs) = KDF_RK(SK, [s_A]w₀), Ns = Nr = PN = 0. |
| RatchetInitBob | DHs = (x_B, w₀), RK = SK. A scratch state only: the first message’s ratchet step replaces DHs, so no stored state ever holds x_B. |
| DH(s, P) | [s]P, compressed. Key pairs are (s, [s]p₀). |
| KDF_RK(rk, dh) | HKDF-SHA256(salt = rk, ikm = dh, info = Seedelf-Messaging\|v1\|ratchet\|root), 64 bytes: RK′ then CK. |
| KDF_CK(ck) | mk = HMAC-SHA256(key = ck, message = the one byte 0x01); ck′ = HMAC-SHA256(key = ck, message = 0x02). |
| ENCRYPT(mk, m, ad) | key ‖ nonce = HKDF-SHA256(salt = a fresh 16-byte salt, ikm = mk, info = Seedelf-Messaging\|v1\|ratchet\|message), 44 bytes; the output is salt ‖ AES-256-GCM(key, nonce, ad, m). |
| The outer scalar o | HKDF-SHA256(salt = ENCRYPT’s salt, ikm = mk, info = Seedelf-Messaging\|v1\|ratchet\|outer), 64 bytes, as a big-endian integer mod q. The envelope goes to ([o]p₀, [o]V), V the recipient’s public value on p₀. An o of 0 (probability about 2⁻²⁵⁵) sends nothing, and a retry draws a new salt. |
| The envelope’s r | HKDF-SHA256(salt = ENCRYPT’s salt, ikm = mk, info = Seedelf-Messaging\|v1\|ratchet\|envelope-ephemeral), 64 bytes, as a big-endian integer mod q. The envelope’s ephemeral point is c = r. An r of 0 sends nothing, as an o of 0 doesn’t. The reader checks c with p (§16.4). |
| The ratchet | §4.1’s RatchetEncrypt and RatchetDecrypt, with TrySkippedMessageKeys, SkipMessageKeys and DHRatchet, run as The ratchet, as run below says. |
| b | For the handle’s (h_S, m_S): HMAC-SHA-512(key = x_A as 32 big-endian bytes, message = Seedelf-Messaging\|v1\|session\|base-scalar ‖ h_S ‖ m_S ‖ F’s head ‖ aux_b), the points compressed and aux_b 32 drawn bytes; its 64 bytes as a big-endian integer, reduced mod q. A b of 0 (probability about 2⁻²⁵⁵) draws aux_b again. Then p₀ = [b]h_S and w₀ = [b]m_S. |
| The base proof | For the handle’s (h_S, m_S) and p₀ = [b]h_S, an OR-proof: b with p₀ = [b]h_S, or the handle’s key y with m_S = [y]h_S. The writer draws c₂, then z₂ (each uniform in [1, q − 1]), then aux_k, 32 bytes; T₂ = [z₂]h_S − [c₂]m_S; k = HMAC-SHA-512(key = b as 32 big-endian bytes, message = Seedelf-Messaging\|v1\|session\|base-nonce ‖ h_S ‖ m_S ‖ p₀ ‖ F′ ‖ c₂ ‖ z₂ ‖ aux_k), reduced mod q as b is, a k of 0 drawing c₂, z₂ and aux_k again; T₁ = [k]h_S; c = SHA-256(Seedelf-Messaging\|v1\|session\|base ‖ h_S ‖ m_S ‖ p₀ ‖ T₁ ‖ T₂ ‖ F′) mod q, the points compressed; c₁ = c − c₂; z₁ = k + c₁·b. The reader, from public values only, computes T₁′ = [z₁]h_S − [c₁]p₀ and T₂′ = [z₂]h_S − [c₂]m_S and accepts if the same hash over them, mod q, is c₁ + c₂, compared in F_q, never as raw bytes. Any commitment may be O, hashed as O’s compressed encoding, 0xc0 then 47 zero bytes: T₁′ is O for a proof with k = 0, which only b’s holder can make and which gives b away, and the proof verifies. The reader’s own proof, b’s branch simulated and the second proved with y, verifies too. |
| The keys proof, from a handle | With M = p₀ ‖ A ‖ w₀ ‖ E_A ‖ S_A ‖ F″, the points compressed and S_A the first ratchet key, every first-contact message’s header key: a proof of log_{p₀} E_A AND log_{p₀} S_A AND (log_{p₀} A OR log_{p₀} w₀). The writer computes A = [x_A]p₀ itself and proves no other A. It draws c₂, then z₂ (each uniform in [1, q − 1]), then aux, 32 bytes; T₂ = [z₂]p₀ − [c₂]w₀; k_e = HMAC-SHA-512(key = e_A, message = Seedelf-Messaging\|v1\|session\|keys-nonce\|e ‖ M ‖ c₂ ‖ z₂ ‖ aux) and k_s = HMAC-SHA-512(key = s_A, message = Seedelf-Messaging\|v1\|session\|keys-nonce\|s ‖ M ‖ c₂ ‖ z₂ ‖ aux), each reduced mod q; T_e = [k_e]p₀, T_s = [k_s]p₀; k₁ = HMAC-SHA-512(key = x_A, message = Seedelf-Messaging\|v1\|session\|keys-nonce\|a ‖ M ‖ T_e ‖ T_s ‖ c₂ ‖ z₂ ‖ aux) mod q, T₁ = [k₁]p₀; c = SHA-256(Seedelf-Messaging\|v1\|session\|keys\|handle ‖ M ‖ T_e ‖ T_s ‖ T₁ ‖ T₂) mod q; c₁ = c − c₂, z₁ = k₁ + c₁·x_A, z_e = k_e + c·e_A, z_s = k_s + c·s_A. Every key is its 32 big-endian bytes. Any of the three nonces 0 draws c₂, z₂ and aux again and derives all three again. The reader, with w₀ = [x_B]p₀ and the message’s header key as S_A, computes T_e′ = [z_e]p₀ − [c]E_A, T_s′ = [z_s]p₀ − [c]S_A, T₁′ = [z₁]p₀ − [c₁]A and T₂′ = [z₂]p₀ − [c₂]w₀ with c = c₁ + c₂, and accepts if the same hash over them, mod q, is c₁ + c₂, compared in F_q. A commitment at O is hashed as 0xc0 then 47 zero bytes. |
| The keys proof, in a continuation | The same M, with A and w₀ the two values both sides hold (§16.3): a proof of log_{p₀} E_A AND log_{p₀} S_A, which uses neither side’s key. The writer draws aux, 32 bytes; k_e = HMAC-SHA-512(key = e_A, message = …\|keys-nonce\|e ‖ M ‖ aux) and k_s = HMAC-SHA-512(key = s_A, message = …\|keys-nonce\|s ‖ M ‖ aux), each mod q, a 0 drawing aux again for both; c = SHA-256(Seedelf-Messaging\|v1\|session\|keys\|continuation ‖ M ‖ T_e ‖ T_s) mod q; z_e = k_e + c·e_A, z_s = k_s + c·s_A. The reader accepts if the same hash over T_e′ = [z_e]p₀ − [c]E_A and T_s′ = [z_s]p₀ − [c]S_A, mod q, is c. |
| The stamp | digest = SHA-256(Seedelf-Messaging\|v1\|session\|stamp ‖ F); its work is the leading zero bits of SHA-256(digest ‖ nonce (8, big-endian)), counted from the most significant bit of the first byte, as the relay’s stamp’s are (§17.3). |
Every label is its ASCII bytes, with no length or terminator. In the table, \| is Markdown’s escape for |; the labels are:
Seedelf-Messaging|v1|session|salt SK's salt
Seedelf-Messaging|v1|session|SK SK's info, before F
Seedelf-Messaging|v1|session|base-scalar b's HMAC
Seedelf-Messaging|v1|session|base-nonce the base proof's k's HMAC
Seedelf-Messaging|v1|session|base the base proof's challenge
Seedelf-Messaging|v1|session|keys-nonce|e the keys proof's k_e's HMAC
Seedelf-Messaging|v1|session|keys-nonce|s the keys proof's k_s's HMAC
Seedelf-Messaging|v1|session|keys-nonce|a the keys proof's k₁'s HMAC, keyed by x_A
Seedelf-Messaging|v1|session|keys|handle the keys proof's challenge, from a handle
Seedelf-Messaging|v1|session|keys|continuation the keys proof's challenge, in a continuation
Seedelf-Messaging|v1|session|stamp the stamp's digest
Seedelf-Messaging|v1|ratchet|root KDF_RK's info
Seedelf-Messaging|v1|ratchet|message ENCRYPT's info
Seedelf-Messaging|v1|ratchet|outer the outer scalar's info
Seedelf-Messaging|v1|ratchet|envelope-ephemeral the envelope's r's info
The three infos HKDF takes under one key (ENCRYPT’s salt and mk) are none of them a prefix of another, and within each of raw SHA-256 and HMAC-SHA-512 no label is a prefix of another (joint-security.md, rule 3). The envelope’s tag label, Seedelf-Messaging|v1|envelope|tag, is the v1 envelope’s (construction.md §4.1).
The ratchet, as run. §4.1’s algorithm, with this document’s rules in its steps.
KeyUsedOrDeleted).DecryptionFailed); with N < Nr it’s refused as used (KeyUsedOrDeleted).DecryptionFailed).WrongEnvelopeRegister). A request’s stored messages, replayed without their envelopes, were checked when they came (§16.4).Why o and r are derived, not drawn. Each binds one of the envelope’s points to the conversation: p = [o]p₀ to its identity, and c = [r]p to the envelope’s own generator. A writer who drew c could build it on any register, [r′]g′, and seal under [r′]v′: the envelope would open exactly when (g′, v′) is a register of the reader’s key, and a reply would say so (§2). Derived from mk, both are the writer’s to compute and the reader’s to check, once the message decrypts.
Why b and the proofs’ nonces are derived, not drawn (joint-security.md, rule 2). All are hedged as the reveal’s nonce is (§19.2), so a random source that fails, repeats or is predictable costs nothing here.
replaces gives another b.Why the keys proof. Bob raises E_A, A and S_A to his key: [x_B]E_A and [x_B]A into SK, [x_B]S_A into the first ratchet step. Without a proof, a writer could put one of them on another register’s generator, (g′, v′), and derive its half from v′: the first message would authenticate exactly when (g′, v′) is a register of Bob’s key, and Bob’s reply would say so (§2). With it, each is a point whose key the writer knows, so its Diffie–Hellman value is one the writer could compute anyway. It’s checked before any of them meets Bob’s key: only w₀ = [x_B]p₀ comes first, on a p₀ the base proof or a held base binds. Every message of a request must carry the first’s header key, since the scratch state’s ratchet key is x_B until one message authenticates (§3, Bob’s side, step 4): a request read from storage is held to it when its record is read, and again when it’s replayed.
Every random value comes from the operating system. To make vectors, each operation draws in a fixed order. The vectors name each draw, so the order is this crate’s generator’s, not something another implementation must follow or the file can pin:
Starting a continuation, from the writer’s side (§6). The writer becomes the new conversation’s initiator, whichever side it was:
replaces is the old cid, and to is empty: the old base has no handle to prove (§6), and nobody holds its b;to, the reader holds a handle of that name, and the proof verifies against the handle’s messaging register [choice: the wallet passes the one its view of the chain holds now; a retired one, kept until 48 hours after a move, is for 1.10.x, §21.8]. The crate makes each of them from the Seedelf’s register and the reader’s own key (§21.3), never from a register it’s given, so none is another key’s. That matters: the proof’s other branch is the register’s key, so a register of another key under the name, as one held before the Seedelf came to this wallet once could be, would let its holder prove any p₀;replaces names one of the reader’s conversations, its p₀ is that conversation’s, and A and [x_B]p₀ are that conversation’s A and w₀, in either order;A stamp under 24 bits, an unknown to, a base proof that doesn’t verify, an unverified continuation without a handle and a keys proof that doesn’t verify are each refused with nothing kept.
0x01 of a request or conversation is judged by F alone [choice].to [choice].Inbox refuses a cid it holds as a conversation or a request; Conversation::start and start_continuing build one with no inbox, so the wallet’s worker checks before it keeps one (joint-security.md §9, which says what the check can’t see; §13).expire at a now past t + 48 h + 7 days (the margin [choice]) deletes them. Deleting a request or a conversation leaves one; a request pushed out by the bounds doesn’t [choice].0x01 counts only with F byte for byte the stored F; it’s refused at the initiator, whose own F it is [choice]. A 0x02 for a request not yet replied to is refused [choice].Only if all pass is it refused as too far ahead (TooFarAhead): the conversation can’t take it, and the wallet says so (§6). Otherwise it’s refused as a message that doesn’t authenticate, DecryptionFailed, or WrongEnvelopeRegister for its envelope, and nothing tells the writer. N = 2³² − 1, which no chain sends, is refused that way too. A first-contact message is never authenticated past the bound, at a held conversation or at a request’s scratch state, whose ratchet key is the reader’s long-term key: it’s refused as DecryptionFailed. With the header rule above, none from the wire can be past it.
expire deletes the expired ones, and each counts as missing. A lookup takes the first stored key for a header’s ratchet key and N.0x01 joins its request only with, in this order:
DifferentFirstContact);KeyUsedOrDeleted, so a page read twice stays a duplicate);InvalidKeysProof);RequestFull).All of these come before the request is replayed, so a join they refuse derives no key. Then it joins if it reads after the stored messages, in their order and with their times, as processing each on arrival would read it. So a request shows exactly what its conversation will hold: a message that arrives more than 48 hours after a later one skipped its key is refused there, as it would be in the conversation. The bytes counted are the stored inner messages, unpadded.
RequestFull) before the chain moves. The state keeps the count until a reply decrypts (§16.5). The longest text a message may carry, max_text_len, is the largest envelope’s room for it as a first-contact message (§9), at either side, before a reply and after one; before a reply, the smaller of that and the share’s, 0 once it’s used up. first_contact_left gives the messages and bytes left.The wallet’s private format, versioned by its first byte; another implementation needn’t read it. Every record is parsed in full and checked: points, the ratchet key’s two halves, counts, flags and trailing bytes. A record of a version this build doesn’t read is refused at its first byte (UnsupportedStateVersion, with the version), so an older record is told from a newer one: the conversations and requests development builds wrote before call 16 are version 1.
2 | role (1) | len (2) | F | w₀ (48) | RK (32) | flags (1) | CKs (32)? | CKr (32)? | DHs secret (32) | DHs public (48) | DHr (48)? | stamp (8)? | sent before a reply (4)? | Ns (4) | Nr (4) | PN (4) | lost (8) | runs (2) | runs × ( DH (48) | count (2) | count × ( N (4) | mk (32) | stored at (8) ) ). It holds the conversation’s secrets: the wallet seals it under the vault key, and the crate writes it into a buffer sized exactly, so no copy is left behind by its growth.
InvalidState); accepting a request returns no such state, giving the first message’s own refusal, or DecryptionFailed, where the replay leaves one; and the wallet’s bindings refuse to write one (record_of).2 | next sequence (8) | count (2) | count × (sequence (8) | continues (1, then a cid for 1 or 2) | messages (2) | messages × (arrived at (8) | len (4) | inner message)). No secrets. Each request holds 1 to 16 messages and at most 64 KiB, all with the first’s F and header key, PN 0 and an N each its own (§16.4).1 | count (4) | count × (cid (16) | t (8)).tests/vectors/messaging_session_v1.json has four conversations with every intermediate value: F with its two proofs and its stamp, both DHs and SK, each init, every chain and message key, ENCRYPT’s key and nonce, each outer scalar and envelope scalar, each ratchet step, each inner message, and each envelope. It was re-recorded for call 16, again in the 1.10.0 gate for §9’s padding (nine session sends went from 512 bytes to 2,048, and only their envelope_size and envelope changed), and again for chunk 55’s two keys (55b): every secret key is a messaging key, and a session from a handle writes to its Seedelf’s messaging register.
replaces, its p₀, as base, and its two public values, the writer’s as A and the other side’s as w₀. Session 1’s responder writes it, so its initiator_public and responder_public are session 1’s responder_public and initiator_public, and its two secret keys are session 1’s, swapped. Each can be checked against session 1.to whose datum register is a root register, (G, [x]G) of its Seedelf key, no replaces, F of 491 bytes): three first-contact messages of 1,314 bytes of plaintext (the most a 2 KiB envelope holds), 1,315 (8 KiB) and none (2 KiB), read last first. No first-contact message fits 512 bytes, and no message is padded to it (§9).replaces (F at its largest, 538 bytes), whose base proof’s and keys proof’s challenge hashes are both at least q, so a reader that compared either unreduced would refuse it; an 8 KiB message; and a ratchet step that skips the rest of the old receiving chain (PN − Nr = 1), whose skipped message is read last. Its draws come from the first label that gives both hashes at least q.Encodings. Every byte string is lowercase hex, to included: the hex of its raw bytes. t, at, delivers, envelope_size and the stamp’s bits, nonce and work are JSON numbers. An absent value (handle, seedelf, replaces, base_scalar, base_proof, ratchet_step) is null; continues is present only in a continuation. A Seedelf’s network is a JSON number.
The fields. Each session gives:
name, and for a continuation continues, the name of the session it continues;initiator_secret_key (x_A) and responder_secret_key (x_B), both messaging keys;handle, the messaging register (h_S, m_S) written to, as generator and public_value (null for a continuation);seedelf, the Seedelf the handle is made from (null for a continuation): its network and policy, name (N, the hex of to), its datum register generator and public_value (g_S, u_S, its Seedelf key’s, which the file doesn’t give), base_message (h_S’s input, network ‖ policy ‖ len(N) ‖ N ‖ g_S ‖ u_S), base (h_S) and messaging_value (m_S = [x_B]h_S), so handle is (base, messaging_value);t, to and replaces;draws by name, the file’s keys sorted (§16.3): cid, e_A, s_A and aux_keys, the keys proof’s 32 bytes, and from a handle also aux_b, the base proof’s base_c2, base_z2 and aux_k, and the keys proof’s keys_c2 and keys_z2;base_scalar: null for a continuation, else b’s HMAC: its message, its 64-byte output hmac, and scalar (b);base_proof: null for a continuation, else F′ as first_contact_prefix, the nonce (its HMAC’s message and hmac, and scalar, k), the commitments t1 and t2, the challenge as SHA-256 gives it and challenge_scalar (it mod q), and c1, c2, z1 and z2, which are F’s 128 bytes before the keys proof;keys_proof: its form (handle or continuation), message (M), the nonces e, s and, from a handle, a, each its HMAC’s message and hmac and its scalar; the commitments t_e, t_s and, from a handle, t1 and t2; the challenge and challenge_scalar; and the proof, c1, c2, z1, z2, z_e and z_s from a handle or c, z_e and z_s in a continuation: F’s last 192 or 96 bytes;stamp: digest, bits, nonce, the hash of digest and nonce, and its work. The file’s first_contact_stamp_bits is 24, and each stamp’s nonce is the first from 0 with that work;base (p₀), initiator_public (A), responder_public (w₀), ephemeral (E_A), ratchet_public (S_A), first_contact (F), ephemeral_dh ([e_A]w₀), static_dh ([x_A]w₀), session_key (SK), init_dh ([s_A]w₀), and RatchetInitAlice’s root_key and sending_chain_key.The file also has version (1), description, envelope_sizes, first_contact_stamp_bits, and labels: handle_base_dst (§21.3’s DST), session_salt, session_info, base_scalar_label, base_nonce_label, base_label, keys_handle_label, keys_continuation_label, keys_nonce_e_label, keys_nonce_s_label, keys_nonce_a_label, stamp_label, root_info, message_info, outer_info and envelope_ephemeral_info, §16.2’s strings.
Then events, in order:
from (initiator or responder), kind (first-contact or session), plaintext, chain_key (before it), message_key, next_chain_key, header, associated_data, ENCRYPT’s salt, aes_key and nonce, ratchet_ciphertext, inner (the inner message, unpadded), envelope_size, the outer scalar’s HKDF output outer_okm and the scalar outer_scalar, the envelope scalar’s envelope_ephemeral_okm and the scalar envelope_ephemeral_scalar (r), and envelope. The salt is a send’s only draw: the envelope is v1 (construction.md §4) with b = o and r, its p = [o]p₀, its tag that of [o]V and its c = [r]p.by, at (the reader’s now), delivers (the index in events of the send it reads), header, plaintext, and ratchet_step, null when it made none. A step gives receiving_dh (the DH output of the old DHs and the header’s key), root_key (RK after the receiving half), receiving_chain_key, new_ratchet_secret and new_ratchet_public, sending_dh (the DH output of the new key and the header’s key), next_root_key and sending_chain_key. A responder’s first step starts from RK = SK and DHs = (x_B, w₀).plaintext is the session layer’s input and output, as bytes. The wallet’s start with §18’s kind byte. These vectors’ have none: no plaintext here starts with 0x01 or 0x02, so none reads as §18’s text or reveal. The reveal file’s plaintext has its kind byte (§19.6).base_proof_checks: fourteen cases of how a reader takes F and its base proof for a handle (§16.1, §16.2). Each gives its name, the handle it’s checked against (a messaging register (h_S, m_S), always a valid one), first_contact (F) and the result.
ok, invalid_base_proof, or the code of a fault in parsing F. Codes are the crate’s errors in snake case, as seedelf-wasm names them.invalid_message for a length (to over 32 bytes, replaces not 0 or 16, F too short), an F with neither to nor replaces, a proof’s scalar not below q, or bytes left over; invalid_encoding, not_in_subgroup or identity_point for a point.to has no proof: it’s judged as a continuation (§6, §16.4), never against a handle, so no check holds one.What the file doesn’t pin. It has no other refusals. These are pinned only by §3, §6 and §16.4’s text, and held by the crate’s unit tests (session/tests/), not by these bytes:
0x01 refused at its initiator;0x02 for a request;0x02 send in the file is 3 to 23 bytes of plaintext, so the file pins only that a short session message is 2,048 bytes. Session 3’s 0x01 sends of 1,314 and 1,315 bytes are at a size’s edge, and no 0x02 send is. §9’s rule at each size’s edge, with the conversation’s own F and the marker byte, is held by every_message_is_padded_to_its_first_contact_size (session/tests/state.rs) alone. 0x02 sends at the edges are to be added to the file before §20’s freeze starts;A checks list for them, as the reveal’s file has (§19.6), is still to do.
Checked independently (2026-11-20): a script written from this section, protocol.md and construction.md alone, without reading the Rust, reproduced every value in all three sessions with noble-curves 2.0.1 for G1 and Node 24’s WebCrypto for HKDF-SHA256, HMAC-SHA256 and AES-256-GCM: 281 session values, the labels and sizes, and v1’s 40. Where it had to guess, this section now says what it found.
Checked again (2026-11-21, after calls 12 and 13), the same way, by a new script that read no Rust: every value in all four sessions, 451 session values and v1’s 42 with the labels, and each stamp’s nonce found as the first from 0 with 24 bits. Its first pass, over three sessions, showed what the bytes didn’t pin: a challenge stored reduced, a step that ignored PN, F with both to and replaces, and an 8 KiB envelope. Session 4 was added for them, and each wrong reading now changes values. Its notes on the file’s fields are folded in above.
Checked again (2026-11-22, after b and k were hedged, joint-security.md §9): a new script, written from §3, §16 and construction.md without reading the Rust, reproduced every value of the re-recorded file on its first run: b’s and k’s messages, HMACs and scalars, and everything that follows from them in all four sessions, each stamp’s nonce found as the first from 0 with 24 bits.
base_proof_checks they pinned no reader refusal.to (§16.3), “once inside the window” (§16.4), the first receive, session 3, continues and the parse codes (here), and §5’s rule 2.base_proof_checks was added for the base proof’s reader rules, in three rounds as the script found what each round left unpinned. It judged all thirteen from the text alone.Since call 16 the file has been re-recorded: F with its designated-verifier base proof and its keys proof, each envelope’s derived r, the envelope’s tag of w, and session 3 re-planned. Every independent check above was of a file before it. The ones below are of later files, the last of them, after chunk 55, of the files as they are now. The mutation passes over §3 to §6’s rules (security.md, The session layer) predate call 16 too. Of call 16’s rules, the envelope’s c check and the keys proof’s nonces have had mutants run against the tests (joint-security.md §10), and so have its rules in §16.4 and §16.5 (2026-11-23): too far ahead, the request’s share at both ends, the runs, the tombstones’ margin and the versions, 26 mutants, 25 killed. The survivor drops a stored request’s bound of 16 messages, which the rule that each N is its own already enforces, since N is below 16; the bound only spares the parse the work. A third pass (2026-11-23, the gate’s spec review) ran 30 mutants over call 16’s checks, the keys proof’s and the base proof’s verifiers included: 27 were killed; a join’s bound of 16 messages is equivalent, since past the header rules no message reaches it; and p = [o]p₀ and a stored request’s header-key rule held only once their tests were added (session/tests/linking.rs, far.rs and keys_proof.rs). The rule that a base proof counts only against a register of the reader’s key came after it, with a test that fails without it (keys_proof.rs). What holds the file to §16.2 meanwhile is the crate’s own tests, which rebuild from the file alone, without the crate’s builders, b and the proofs’ nonces with their messages and HMACs, the proofs’ commitments, and each envelope’s o, r, p and c.
Checked again, after call 16 (2026-11-23): another model, given only protocol.md, construction.md and the four vector files, without the Rust, wrote a harness that reproduced them: 924 comparisons, no mismatch. And after §9’s padding (2026-11-24): that harness, changed from that day’s spec alone, reproduced the files as they are now: 1,283 comparisons, no mismatch. Neither reproduced:
0x02 size’s edge, since the file has none (above).Checked again, after chunk 55 (55b): a clean-room implementation, written from the spec alone, without the Rust, reproduced every value in this file, the reveal file and the certificate file: 1,042 of 1,042. What it found the text left out is folded in: t taken as given (§16.1), this section’s handle and seedelf, the reveal’s formulas, bytes and chain (§19), and the certificate’s refusals by their codes (§21.4).
What the spec still leaves unpinned, as that check found, to settle before §20’s freeze starts:
base_proof_checks here, the reveal file’s checks (§19.6) and the relay file’s refused posts (§17.7);max_text_len: “the share’s” room is never defined;The crate’s tests:
session_vectors_match_the_file holds the code to the file. RECORD_MESSAGING_SESSION_VECTORS=1 rewrites it, for a deliberate change of format only (it never touches messaging_v1.json).The relay is a part of the data layer, seedelf-data’s api/src/messaging/, on the same server, behind the same edge and deploys, with buckets and a monthly traffic ceiling of its own (chunk 54’s call 1, the owner, 2026-11-21). The data layer’s README is its reference for operators. This section fixes every byte a wallet sends it and reads from it for envelopes, so a wallet needs nothing else. Since chunk 55 each pool also keeps a list of certificates, with routes, a stamp and checks of its own, which §21.7 fixes. Choices made while building are marked [choice].
mainnet and preprod (call 4). Two keep each network’s cap, prices, traffic and certificate list its own. Since chunk 55 each network has its own messaging key too (§21.2), so a wallet’s scan matches no envelope of the other network’s. Before it, the key was the Seedelf key x, the same on every network (derivation.rs), and one pool would have had every wallet scan and open the other network’s messages before what they named refused them (§20).POST /messaging/v1/{pool}/envelopes, Content-Type: application/octet-stream, the body:
nonce (8, big-endian) | envelope
At most 8 + 32,768 bytes. The checks run cheapest first, and the first that fails answers:
| Order | Check | Answer when it fails |
|---|---|---|
| 1 | The body holds a nonce: at least 8 bytes | 400 |
| 2 | The shape: version 1, and exactly 512, 2,048, 8,192 or 32,768 bytes (§9, §16.1) | 400 |
| 3 | Already held, by the stamp’s digest (§17.3): the same bytes in the same pool | 200 already, whatever the stamp |
| 4 | The price (§17.4) is within its ceiling, and the post fits the address’s window (§17.4) | 429, with Retry-After: too many posts from this address for now when the address’s own posts took the price past its ceiling, too many posts to this pool for now when the floor alone did, and this address's share of the pool is full for now for the window |
| 5 | The stamp shows at least the price | 402, {"error": …, "price": <bits>} |
| 6 | Room in the pool | 503 the pool is full, with Retry-After: when the oldest envelope expires, rounded up to 10 minutes, so 600, 1,200 and so on to 3,600 |
| 7 | The points: p (bytes 1 to 48) and c (81 to 128) each canonical, in G1 and not O (construction.md §4.4), so no reader ever parses garbage (call 3). The tag between them (49 to 80) is any 32 bytes: only its reader can judge it | 400, counted against the address’s own price (§17.4) |
Kept, the answer is 200 {"kept": "new", "expires": <Unix seconds>}, the relay’s now and 36 hours, exactly; already carries the held copy’s expires, rounded down to 10 minutes [choice]. The relay’s own refusals carry {"error": "<words>"}. One more: a 503 busy, with Retry-After, from an address new to the relay while its prices or its windows already count 200,000 addresses (§17.4).
expires.error:
only Seedelf Wallet reads this to a browser’s request that isn’t CORS or comes from an origin that isn’t the wallet’s (one with neither header passes);messaging is stopped on every /messaging/ path while Messages is stopped (§20), its body unread;over the traffic allowance once the API’s traffic allowance, or the day’s share of it, is spent, on every route but /health, or messaging is over its traffic allowance once messaging’s own is, where it has one, each with Retry-After 3600;this route takes no body to a request with a body on a route that takes none (1.10.0 sends no body with a GET), and a 413 the body is larger than this route takes to one whose declared length is past its route’s, 8 + 32,768 bytes for a post: both in JSON with CORS, unread, at once, the connection closed;too many requests at once, Retry-After 1, past 16 of the address’s requests in flight on the relay’s routes (an IPv6 address by its /64), each counted until its answer is read; and a 503 busy, Retry-After 30, past 512 in flight on them from every address;slow down, Retry-After its wait, when the address’s messaging bucket is empty (300 units, refilled 10 a second: a post costs 4, a page 1 and 1 for every 16 KiB it sends); and a 503 busy, Retry-After 30, to an address new to the buckets while they count 200,000.Then it reads the body whole within 10 s: a 408 the request's body didn't arrive in time for one too slow, and a 408 the request's body didn't arrive for one that broke off, never a 400; a 413 past the route’s limit as it’s read. Each closes the connection. In front of it, Caddy refuses a body past 64 KiB with a 413 of its own and closes a connection past the server’s 8,192 with a 502, neither with CORS: to a wallet, a fetch that fails. Messaging’s buckets and places in flight are its own, so catching up on messages never makes the wallet’s other reads wait; and while messaging has a traffic allowance of its own, a flood of messages never spends the rest’s.
digest = SHA-256("Seedelf-Messaging|v1|stamp|" ‖ len(pool) (1) ‖ pool ‖ envelope)
work = the leading zero bits of SHA-256(digest ‖ nonce (8, big-endian))
solve_stamp takes the first from 0, which makes the vectors [choice], and find_stamp searches a slice, so the worker can yield between slices (54d). It refuses more than 32 bits (MAX_STAMP_BITS).scale.mjs messaging and the same steps in a Chrome 157 worker), solved in slices of 2^16 attempts with a turn of the event loop between: 422 ns an attempt in Node 24 and 438 ns in Chrome, so 24 bits take about 7.1 and 7.4 s on average. 64 relay stamps at 18 bits averaged 0.13 and 0.12 s. 16 first-contact stamps at 24 bits averaged 6.4 and 10.9 s, with medians of 6.1 and 7.7 s; the longest of the 32 took 33 s. Sixteen geometric draws don’t settle a mean, so the attempt’s cost is the figure to plan by.What’s counted is units, by a table of the price’s own (the owner, 2026-11-23):
| Envelope | Units |
|---|---|
| 512 or 2,048 bytes | 1 |
| 8,192 bytes | 16 |
| 32,768 bytes | 64 |
So a short message padded to 2 KiB (§9) costs what a 512-byte one does, and a long one what it did. The window below keeps its own units, 512 bytes each. Each sending address has a count of its recent units, an IPv4 address whole and an IPv6 address by its /56, so the /64s of one allocation are one address [choice] (a /56 is usually one customer’s, though some networks give several customers one), and everyone together has one. Both halve every 10 minutes. A post’s price, its own units u counted:
bits = base + ⌊(mine + u) / 32⌋ + floor
floor = 0 when all + u < quiet, else ⌊log₂((all + u) / quiet)⌋ + 1
| Pool | base | quiet | ceiling | per bit | half-life |
|---|---|---|---|---|---|
| mainnet | 18 bits | 1,000 units | 24 bits | 32 units | 10 minutes |
| preprod | 16 bits | 200 units | 24 bits | 32 units | 10 minutes |
All [choice], to tune with real use.
Retry-After is when the counts will have decayed enough, if nothing else is posted meanwhile, in 15 s steps and at most an hour.quiet, which at mainnet’s numbers is about 100,000 short envelopes a day.The window (2026-11-21). The price slows a sender; the window bounds what one address makes every reader download and scan. For each address, keyed as the price’s count is, the relay counts the posts the pool kept from it, as envelopes and as units of 512 bytes, whatever the price counts, hour by hour. Each hour’s counts are kept until 36 hours after the hour ends, when everything posted in it has expired. A post that would take the address past either limit is refused:
| Pool | envelopes | units |
|---|---|---|
| mainnet | 1,000 | 4,096 (2 MiB) |
| preprod | 1,000 | 4,096 (2 MiB) |
The owner’s [choice], to tune with real use; the same on both pools, so a wallet meets the same limits on preprod.
Retry-After is when enough of the address’s oldest hours will have aged out for this post, if it posts nothing meanwhile: at most 37 hours. When the price refuses too, the 429 waits for the later of the two.busy.GET /messaging/v1/{pool}/envelopes, for the first page, then ?after=<cursor> with the last page’s cursor: a decimal u64 with no sign. Any other query is a 400. The answer is application/octet-stream, not compressed, with its true Content-Length:
version (1) = 1 | flags (1) | cursor (8) | prices (4) | count (2) | count × (length (4) | envelope)
Retry-After is the real wait (a 402 names the price instead, if the refusal has passed). The Seedelf Wallet does, and counts it down.this address has read its share of the pool for the day, whose Retry-After is when enough of the address’s oldest hours age out, at most 25 hours. Posts go on. A page’s bytes count against the traffic allowance and the edge’s bucket as they’re handed on, not as its reader receives them: behind Caddy, nearly the whole page.this address has read its share of the pool for the day, whose Retry-After is when enough of its oldest hours of the reserve age out, or a minute past midnight UTC, when the next day’s share begins, whichever is first. Posts go on.tests/vectors/messaging_relay_v1.json, written by this crate’s relay module:
check_envelope names them; and two envelopes whose tags are all zero bytes and all 0xff, kept, since the tag isn’t a point.points_at (1 and 81, where p and c start) and tag_at and tag_len (49 and 32).envelope, by a post’s name, and gives the pool, the price as bits, the digest, the nonce as a JSON number (the first from 0 that meets the price), the hash, its work as zeros, and post, the post’s first 8 bytes: the nonce, big-endian. The whole post is post and then that envelope.max_stamp_bits (32) is solve_stamp’s bound (§17.3), not a price: a wallet solves none above 26 bits (§20). nonce_len is the stamp’s 8 bytes, and sizes are §9’s four.api/tests/messaging.rs and the unit tests in api/src/messaging/), not by these bytes. Page vectors are still to do.relay_vectors_match_the_file holds the crate to the file, and RECORD_MESSAGING_RELAY_VECTORS=1 rewrites it, for a deliberate change of format only. The relay’s copy of the checks, which the data layer can’t take from this crate, is held to the same file (seedelf-data’s api/src/messaging/check.rs), and its tests post every envelope in it through the whole app.What a message’s plaintext holds, above the session layer, which takes it as bytes (§16). [choice]
kind (1) | body
0x01: text, the body UTF-8.0x02: a reveal, the body §19.3’s: the writer’s Seedelf, its messaging value and its proof (54f). A changed reveal is a new kind, never a changed 0x02, once §20’s freeze starts.0x01 to 0x7F are content. One a reader doesn’t know is kept with its body, inside the history’s budget, and shown as a message this version can’t show, never guessed at, so a later version can show it. 1.10.0 reads 0x00 and an empty plaintext the same way, so neither is ever a control. A kind added later (a payment request that opens Send filled in, §7) is read by the versions that know it, and said to be unreadable by the rest, as versions before 54f say of a reveal: so it may go to any side (§20).0x80 to 0xFF are control: what a later version tells the other side’s wallet, such as which kinds it reads (§20). In a session message of a conversation the reader holds, one it doesn’t know adds no entry, no unread count and no preview. Its ratchet has still stepped: the session layer decrypted it. So it still counts in two places: a first-contact message starts or joins a request whatever it holds (§3.1), which the list shows; and at the side that wrote first, the first session message to decrypt ends its first contact (§3, step 6), though 1.10.0 opens nothing for the user on one its thread doesn’t show (§11). No version sends one there to a side that may not read it (§20).max_text_len less one byte. Before a reply, max_text_len is held to the request’s share too (§16.4).The side that wrote first may show the other which Seedelf it holds (call 15, the owner, 2026-11-21: “allow alice to reveal but only in the rachet part so its not in the first message”). It’s a message of its own kind (§18) carrying a designated-verifier proof bound to the conversation, built in this crate’s session module (Conversation::reveal, Conversation::verify_reveal, Reveal). Choices made while building are marked [choice].
0x02 session messages, §4.1). Its earlier messages are first-contact messages, which a later theft of x_B reads (§1.1), and the other side hasn’t answered yet. The crate refuses anything else.0x02) of a conversation it replied in; one inside a first-contact message, or a request’s, isn’t checked, and shows as a Seedelf that couldn’t be verified.The conversation gives cid, p₀, A = [x_A]p₀ (the initiator’s identity) and w₀ = [x_B]p₀ (the responder’s), x_A and x_B being the two sides’ messaging keys. The Seedelf gives:
Whose chain. The writer computes h_S under its own pool’s network byte and the Seedelf policy of the contract variant it reads. The reader computes it again under its own, never from the reveal, which carries no h_S. So a reveal read under another network or policy doesn’t verify (§19.6’s checks).
The statement’s bytes, which the challenge and both nonces cover, with every point compressed (48 bytes):
statement = cid (16) ‖ p₀ ‖ A ‖ w₀ ‖ len(N) (1) ‖ N ‖ g_S ‖ u_S ‖ h_S ‖ m_S
353 + len(N) bytes, 354 to 385. h_S is in it though the reader computes it, so the challenge binds the reader’s chain. Without it, the reader’s own reveal with c₁ = z₁ = 0, whose T₁′ is O on any base, verified under every chain (found by 55b’s mutation pass).
The statement is an OR of two: log_{h_S} m_S = log_{p₀} A (a Chaum–Pedersen proof that the Seedelf’s messaging register and A share a key), or the prover knows log_{p₀} w₀ (a Schnorr proof of the reader’s own key). It’s a Fiat–Shamir OR-proof (Cramer, Damgård and Schoenmakers, 1994). The writer proves the first and simulates the second.
The challenge is SHA-256 over, in order:
label ‖ statement ‖ T₁ ‖ T₁′ ‖ T₂
with label the ASCII bytes of Seedelf-Messaging|v1|session|reveal, with no length or terminator. c is that hash as a big-endian integer, reduced mod q (§16.1). A commitment the reader computes may be O (z₁ = c₁ = 0 makes T₁ and T₁′ O, and such a proof is valid): it’s hashed as O’s compressed encoding, 0xc0 then 47 zero bytes, the only place in a reveal a point may be O (F’s two proofs’ commitments may be too, §16.2).
The writer (branch 1 real, branch 2 simulated):
Seedelf-Messaging|v1|session|reveal-nonce, with no length or terminator, and 0x01 says branch 1 is the one proved. c₂ and z₂ are 32 bytes big-endian. A k₁ of 0 (probability about 2⁻²⁵⁵) draws aux again.
The reader:
The reader’s own reveal. The responder can make one for any Seedelf, simulating branch 1 and proving branch 2 with x_B:
It verifies like the writer’s. That’s what keeps a conversation deniable: shown to anyone else, a reveal proves nothing, since the reader could have made it. It holds while the writer’s c₂ and z₂ came from a sound random source: the reader’s own c₂ is what the hash leaves, so it can’t copy a relation a failed source printed in the writer’s (§19.5). The wallet never makes one; the vectors do (§19.6).
plaintext = 0x02 | reveal (§18)
reveal = len (1) | N (len) | g_S (48) | u_S (48) | m_S (48) | c₁ (32) | c₂ (32) | z₁ (32) | z₂ (32)
invalid_message; a point that isn’t the canonical compressed encoding of a point on the curve (bad flag bits, O’s flags with any other bit set, x not below p, no point for x) is invalid_encoding, and so are (0, ±2), the points with x = 0 (construction.md §4.4); any other point on the curve outside G1 is not_in_subgroup; O, as 0xc0 then 47 zero bytes, is identity_point. A proof that doesn’t verify is invalid_reveal; a check at the initiator, or a reveal made at the responder or before a reply, is reveal_not_allowed. The wallet’s own rules (§19.1’s session message, §19.4’s chain register and certificate) have no code: they show a reveal as failed.reveal_not_allowed.Steps 1 to 3 run as the message is received, in the worker’s queue (§4.2), with no request. Step 4 runs only when the user asks, from the thread [choice]: a read of the chain right after a reveal came would tell the server whom it was for. It’s one read of the whole contract, and of the list from the wallet’s cursor to its end (§21.7), out of the queue, for every reveal of that conversation still waiting; one that fails leaves them waiting for the user to ask again. The read comes from the reader’s IP address, as Send’s does, and made soon after a reveal arrived, it hints to the server that one did. A failure at any step says only that a Seedelf was shown and couldn’t be verified, never its name: a name shown unverified would be a tool for phishing.
tests/vectors/messaging_reveal_v1.json, written by this crate’s session module from fixed draws, and re-recorded for chunk 55’s two keys (55b):
chain: the network byte (0, preprod) and the Seedelf policy the reveals are made under.conversations: two conversations from Alice to Bob’s handle, each answered (Alice’s first message, Bob’s reply, Alice reading it). Each gives initiator_secret_key (x_A) and responder_secret_key (x_B), both messaging keys, cid, base (p₀), initiator_public (A), responder_public (w₀), and both sides’ stored states, initiator_state and responder_state (§16.5), which are this crate’s own, for its public-API test: another implementation needn’t read them. The tests’ helper started both conversations, stamping at 8 bits (session/tests/support.rs), not §16.4’s 24, so each initiator_state holds an 8-bit stamp. Reading a stored state doesn’t judge its stamp.reveals: three, each with its name, its conversation (an index from 0), made_by (initiator or responder), and:
seedelf: its network and policy, name (N), its datum register generator and public_value (g_S, u_S, its Seedelf key’s, which the file doesn’t give), base_message (h_S’s input, §21.3), base (h_S), messaging_secret_key (its maker’s x_m) and messaging_value (m_S);statement; its draws by name (drawn c2, z2, aux from the initiator and c1, z1, aux from the responder, in that order; the file’s keys are sorted); the nonce (its branch, the HMAC’s message and its 64-byte output hmac, and the scalar k₁ or k₂);commitments (t1, t1_seedelf for T₁′, t2), the challenge as SHA-256 gave it and as a scalar (challenge_scalar), the proof (c1, c2, z1, z2), and the reveal’s bytes and its plaintext (with the kind byte).The three:
checks: 42, each a reveal’s bytes, the conversation and side it’s checked at, the chain it’s read under (network and policy), and its result: ok, or the refusal’s code, the crate’s error in snake case as seedelf-wasm names it (reveal_not_allowed, invalid_reveal, invalid_message, invalid_encoding, not_in_subgroup, identity_point). Its name refers to the reveals by index from 0. They cover:
reveal_not_allowed (the side comes before the proof).version (1), description, label and nonce_label (§19.2’s), handle_base_dst (§21.3’s DST), kind (2) and group_order (q, big-endian hex). Every byte string is lowercase hex.reveal_vectors_match_the_file holds the code to the file. RECORD_MESSAGING_REVEAL_VECTORS=1 rewrites it, for a deliberate change of format only, and never touches the other vectors files. tests/reveal_vectors.rs reads it through the public API.Checked independently (2026-11-22): a script written from this section, §16.1 and construction.md alone, without reading the Rust, reproduced every value with noble-curves 2.0.1 and Node 24’s SHA-256: both conversations’ identities, each reveal’s commitments, challenge, proof, bytes and plaintext, every check’s result, and q, 76 comparisons in all, and again after the checks were added (78). Where it had to guess (which code each refusal is, the order parsing reads in, how O is hashed, the draws’ order), this section now says, and the checks of a commitment at O and of the parsing order were added for it.
Checked again (2026-11-22, after the hedged nonce, joint-security.md §9): a new script, written from §19, §18, §16.1 and construction.md without reading the Rust, reproduced every value of the re-recorded file on its first run, each nonce’s message, HMAC and scalar included. It then changed one rule at a time to see which the file pins, and found five it didn’t: the side checked before parsing, the scalars read before the points, leftover bytes read before the points, O’s flags with a stray bit taken as O, and x ≥ p. It also found gaps in the text: the statement’s bytes weren’t defined once, nor N’s encoding, x_B’s encoding or a zero k₂. This section now says each, and the eight checks after the first 23 were added for them. On the final file it matches 84 of 84: 53 values and 31 checks. Re-recorded the same day for §16.2’s derived b, which changes both conversations: the same script matches 84 of 84 again, and every check gives the result it gave.
Checked again, since call 16, with the other three vector files (2026-11-23 and 2026-11-24): §16.6 says how, and what of this file wasn’t reproduced.
Checked again, after chunk 55 (55b): a clean-room implementation, written from the spec alone, reproduced every value of this file, the session file and the certificate file, 1,042 of 1,042 (§16.6). Where its text fell short (T₁′ on h_S, m_S in the parse and the sizes, whose chain h_S is computed under, this section’s fields and the checks’ count), this section now says.
The freeze starts when Messages opens on mainnet (the owner, 2026-11-24). The Seedelf Wallet opens Messages on preprod only for now, so what this section freezes is frozen by the release that opens Messages on mainnet. It names 1.10.0 because that’s the version it describes today. Until then a later release may still change a format, or what the relay’s v1 routes take and answer, where a review finds a flaw, and preprod’s conversations and its pool may then be reset.
No message says which version wrote it, and a writer writing first can’t learn which version its reader runs. 1.10.0 stays in use after later versions ship. So toward a side that may run 1.10.0, every later writer sends only what 1.10.0 accepts, within its bounds, and every later reader accepts at least what 1.10.0 writes (call 16). A later reader may accept more than 1.10.0 does, and a later writer may send more to a side that has said it reads it: what two later versions agree between them is theirs. And every relay keeps, on /messaging/v1/, what 1.10.0 asks of it and reads from it.
Formats:
0x01 and 0x02, F, text (kind 0x01) or the reveal (kind 0x02), every byte, label and check §16.1, §16.2, §19.2 and §19.3 fix of them, and the rules of §16.4 a writer must meet (the window, the stamp, the header rule, the share and MAX_SKIP). 1.10.0 passes over an envelope of another version before it decodes any point (construction.md §4.2), and refuses an inner type it doesn’t know before the ratchet runs (§16.1). That message’s key is never derived: once a later message decrypts, it’s a skipped key, and the conversation counts it missing from then on (§16.4). The v1 route refuses another envelope version today (§17.2).A new content kind may go to any side: 1.10.0 keeps it and says it can’t show it (below), as §18 plans.
/messaging/v1/ serves. A writer can’t learn which version reads a Seedelf: one key can run in several wallets, and a Seedelf changes hands. So every first message to a handle is a v1 first contact, inner type 0x01, with what 1.10.0 checks:
A later reader asks no more of one: at most 24 bits, and at least that window and that share. A first contact of a new type, with limits of its own, goes only where it’s known to be read, such as a continuation (§6) between two sides that have both said they read it.
0x01 to 0x7F are content: one 1.10.0 doesn’t know is kept with its body, inside the history’s budget, and shown as a message it can’t show. 1.10.0 reads 0x00 and an empty plaintext that way too, so neither can be a control. 0x80 to 0xFF are control: in a session message of a conversation 1.10.0 holds, one it doesn’t know adds no entry, no unread count and no preview, and its ratchet still steps. As the first reply, it’s the reply all the same (above).0x80 then zeros, to the smallest size that holds the message or a larger one. A 1.10.0 writer pads every message, either side’s, to its first-contact size (§9), so a reply’s coming changes no size it sends. A later writer may pad less, and 1.10.0 reads it; but one that pads a conversation’s messages to the smallest size again brings back what §9 closed: its next short post after a reply tells the relay that one came. One message never makes that reader skip more than MAX_SKIP = 1,000 keys, counted in all as §16.4 counts them. Every message the reader can’t decrypt (lost, expired, or of a type it doesn’t read) is a key it skips: after more than 1,000 of them in a row the conversation can’t go on. 1.10.0 then says it can’t continue when the next message to reach it is at most 4,096 keys ahead (MAX_AUTH_STEPS), and drops one further ahead without a word. A later reader takes at least the four sizes, padded up, and a skip of 1,000 in all; it may take more. 1.10.0’s own are its 2,000 stored skipped keys, each kept 48 hours, and its 50 requests and 256 KiB of them a network: a writer can’t count on more room out of order than that, nor on a request being kept.The relay (§17). 1.10.0 has the relay’s origin built in, one for both pools, and reaches it with no host permission of its own, through CORS. Its content security policy lets it reach the relay at that origin and nowhere else, so a redirect elsewhere fails: the relay answers there, both pools, for as long as a 1.10.0 wallet may ask, and a pool or a route that’s retired answers 410 there for good. Where Chrome’s access to sites, which the dApp connector asks for, is granted, CORS doesn’t apply, and 1.10.0 reads the answers of whatever is in front of the relay too.
GET and POST /messaging/v1/{pool}/envelopes, and since chunk 55 GET and POST /messaging/v1/{pool}/certificates (§21.7), the pool mainnet or preprod. A post is §17.2’s body, the nonce (8, big-endian) then the envelope, as application/octet-stream, its work §17.3’s stamp, unchanged. 1.10.0 sends no body with a GET. A v1 relay may come to keep more than it does now, but never refuses for good a post it keeps now, and never changes the puzzle: a new puzzle or a stricter check is a new route over the same pools.Retry-After is exposed: unexposed, 1.10.0 reads every wait as a minute.Content-Length, where an answer has one: 1.10.0 refuses an answer whose length says it’s past its bound before it reads a byte. Every JSON answer stays under 4,096 bytes and arrives within 30 s of its head.?after=; the first page is asked with no query. Every after= that is a decimal u64 gets a page, never a 400: a cursor above every number the pool has given out (after a move, or a lost file) starts from its oldest envelope with bit 1 set, and a page with nothing more after it, an empty one included, carries the last number given out. 1.10.0 checks neither that cursors grow nor that entries come in order: one numbering covers every v1 envelope a pool holds, whichever route posted it, and a cursor never passes one not yet sent. A v1 page may leave out entries a 1.10.0 reader can’t read. Bit 0 is set only when another page follows now, and a page that sets it moves the cursor: one that doesn’t ends that sync’s read. Bit 1 is read only after a cursor of the wallet’s own, and a gap is told across the relay’s restarts (§17.6).slow down, which it shows as the relay unreachable. Every wallet behind one address shares its bucket and its places in flight, and 1.10.0 has at most a page and a post in flight a network. It pads every short message to 2 KiB, which today’s relay prices as one unit, as it does 512 bytes (§17.4): a relay that priced 2 KiB by its bytes would bring chat to its ceiling four times sooner. A page’s body has the 120 s 1.10.0 waits, so a full page arrives at about 18 kbit/s, where the relay gives it as long; today’s proxy gives an answer 60 s, about 35 kbit/s. A post’s body has 10 s today at the proxy and the edge, about 26 kbit/s up for 32 KiB: a slower one is cut off, a 408 or no answer (below). And 16 pages a minute read a full pool within its 36 hours only while pages that say more follows hold about 2 KiB or more on average (256 KiB today, 16 KiB under the reserve), and while an address’s day’s reading is more than a full pool (eight times, today).kept, expires, price and error: a later relay may add fields.
expires is a JSON number of Unix seconds. kept is exactly "new" for an envelope kept now, and its expires is then the relay’s now and 36 hours, which 1.10.0 measures its clock against (§17.6). It takes any other kept as already held.price is a whole number of bits, more than the post’s work showed: a 402 that names no more is an answer 1.10.0 doesn’t know (below). 1.10.0 solves the same bytes again at it, up to four posts in a run. Past 26 bits it waits instead: the 402’s Retry-After, or a minute.error, word for word: too many requests at once, every request to the relay waits a second; slow down, every post of that network waits its Retry-After, and every request to the relay up to a minute; any other words, or none (a body that doesn’t read among them), only posts of that envelope’s size wait, for its Retry-After. So a size’s refusal never uses the edge’s two, and a refusal of every post is a slow down or a 503.too many requests at once, slow down and this address has read its share of the pool for the day (a page’s, below), are frozen byte for byte. A relay’s own words for its other 429s may change, but never into one of them.Retry-After. Every bound a relay adds answers this way, a 503 with a short Retry-After, as busy does with 30: never a 400, a 413, a 429 with new words, an empty page that says more follows, or a cursor past a v1 envelope not yet sent.error is exactly this address has read its share of the pool for the day holds that pool’s pages for its Retry-After, at most 25 hours (a minute without one), while posts go on: so every refusal of a page for the day, whatever its key (an address, its share of the reserve), is that 429, or 1.10.0 asks again at every sync. Today the only refusals of a page for the day that aren’t that 429 are the server’s own allowance, for everyone: the 503s messaging is over its traffic allowance and over the traffic allowance, Retry-After 3600. too many requests at once holds every request a second and ends that sync’s read, saying nothing; any other 429 holds every request for its Retry-After, at most a minute, and says the relay can’t be reached. Any other answer, a 503 among them, says the relay can’t be reached, and the page is asked again at the next sync, whatever its Retry-After.Retry-After is a positive whole number of seconds. 1.10.0 reads it as a number, and a missing, zero, negative or unreadable one (an HTTP date) as a minute; it waits at most 37 hours on a post’s, and 25 hours on the day’s reading. It keeps a post’s waits in memory, and, until a lock, in session storage, with its strikes and where its next run starts, by each envelope’s stamp digest: a worker Chrome starts again goes on from them. The work it solved is kept only while its worker runs, and Chrome stops an idle worker after about 30 s: a worker started again solves the same bytes again, and one started after a lock, with no copy of the waits, may ask inside a Retry-After, as often as each minute’s sync, and the relay answers as before.expires is exactly the relay’s now and 36 hours: 1.10.0 measures its clock against it, and any other figure shows its user a clock that’s off. An envelope already held is answered already, with when its copy expires, rounded down to 10 minutes, and isn’t kept longer for it./messaging/v1/{pool}/, whatever its body, for that pool’s network alone; the other pool may go on answering. 1.10.0 then stops that network’s Messages: it starts no solve or post there, a solve under way gives up, and it asks one page an hour until a page gets an answer other than a 410; a page that gets no answer is asked again at the next sync. A lock ends the stop: each unlock’s first sync asks a page as any does, and a message sent before that page’s answer can still be posted, and gets the 410 too. So a stopped relay answers 410 on every v1 route, posts included, until it’s back.Time. Every first-contact rule runs on the two device clocks: t is the writer’s (1.10.0 rounds it down to 10 minutes), and now is the reader’s. The relay’s clock decides only how long it keeps an envelope. 1.10.0 measures its own clock against a fresh answer’s expires, and only says how far off it is: nothing runs on the relay’s time.
Built in 55b. Chunk 55 (the owner, 2026-11-26) gives Messages a key of its own, x_m, and binds it to each Seedelf by a certificate the Seedelf key x signs. Nothing of Messages had shipped, so it was built in place, as call 16 was (§0): §2 to §20 describe the two keys as built, and the vector files are 55b’s (§16.6, §19.6, and the certificate file below). §21.9 records what changed where. Choices made here are marked [choice].
okm_m = HKDF-SHA-256(ikm = the BIP39 seed v1 uses,
salt = "seedelf-messaging-v1",
info = "seedelf-messaging-key" ‖ u32_be(account) ‖ network ‖ generation,
L = 64)
x_m = int_be(okm_m) mod q
account is the one x takes, 0 in v1.For a Seedelf whose asset name is N (1 to 32 raw bytes) under the Seedelf policy policy (its 28-byte hash: the policy of the contract variant the wallet reads, variant 1’s today), and whose datum register is (g_S, u_S):
h_S = hash_to_G1(msg = network (1) ‖ policy (28) ‖ len(N) (1) ‖ N ‖ g_S ‖ u_S,
DST = "Seedelf-Messaging|v1|handle-base|BLS12381G1_XMD:SHA-256_SSWU_RO_")
m_S = [x_m]h_S
M_S = (h_S, m_S)
hash_to_G1 is RFC 9380’s BLS12381G1_XMD:SHA-256_SSWU_RO_, its DST ending in that suite’s ID as RFC 9380 §3.1 recommends, the points compressed (§16.1), and an h_S that’s O is refused.
certificate = version (1) ‖ network (1) ‖ generation (1) ‖ policy (28) ‖ len(N) (1) ‖ N ‖ g_S ‖ u_S ‖ m_S ‖ c (32) ‖ z_x (32) ‖ z_m (32)
What it proves: knowledge of x with u_S = [x]g_S AND of x_m with m_S = [x_m]h_S, under one Fiat–Shamir challenge: two Schnorr proofs, ANDed. x’s half binds M_S to the Seedelf’s register. x_m’s half is the back-signature: no one can bind someone else’s messaging register to their own Seedelf.
The wallet, making one:
create_proof refuses for a spend (joint-security.md, rule 1).Seedelf-Messaging|v1|certificate-nonce|m ‖ statement ‖ aux) mod q, its 64 bytes a big-endian integer. T_m = [k_m]h_S.Seedelf-Messaging|v1|certificate-nonce|x ‖ statement ‖ T_m ‖ aux) mod q. T_x = [k_x]g_S.Seedelf-Messaging|v1|certificate ‖ statement ‖ T_x ‖ T_m), a big-endian integer, mod q.A k_m or k_x of 0 (about 2⁻²⁵⁵) draws aux again and derives both again. The labels are ASCII, with no length or terminator.
Why the nonces are derived this way:
Anyone, checking one (the relay and every writer), each refusal by its code, the crate’s error in snake case as seedelf-wasm names it:
invalid_certificate); a version other than 0x01 (unsupported_version); a network that isn’t the pool’s, a generation other than 0x00 or a policy other than the variant’s the reader reads (invalid_certificate); then a len(N) outside 1 to 32, or a length other than 272 + len(N) (invalid_certificate).invalid_encoding, not_in_subgroup or identity_point, as §19.3 says for a point. Then c, z_x and z_m, each below q, else invalid_certificate. c below q is load-bearing: c and c + q would otherwise be two encodings of one certificate.identity_point.0xc0 then 47 zero bytes, as in §19.2.invalid_certificate.It proves whoever made it knew both keys. It doesn’t prove (g_S, u_S) is N’s register now: §21.5 does that.
Vectors: tests/vectors/messaging_certificate_v1.json, new in 55b and recorded by RECORD_MESSAGING_CERTIFICATE_VECTORS=1: four good certificates with every value (the statement, both nonces’ HMACs, T_x, T_m, the challenge, and each one’s listing digest, §21.7), and 69 refusals, each read under its network and policy with its code. The relay’s copy of these checks is held to the same file.
Never a spending proof. A spend’s challenge is blake2b-224 over the raw bytes of g ‖ T ‖ u ‖ vkh (joint-security.md §3), a hash no reduction programs. A certificate’s (T_x, z_x) can be mauled into a pair for any challenge t, T′ = T_x + [c − t]u_S, but T′ is then fixed by t, so a spend needs blake2b-224(g_S ‖ T′ ‖ u_S ‖ vkh) = t: a chance of about 2⁻²²⁴ a try, what a forger has with no certificate at all. A certificate is simulatable without x (joint-security.md §7.2), so it gives a forger nothing. A test holds it, as the reveal’s does: the spending verifiers refuse every certificate’s (T_x, z_x).
The labels: …|certificate (raw SHA-256) is a prefix of …|certificate-nonce|m and …|certificate-nonce|x (HMAC-SHA-512), which is another function, so they’re apart (joint-security.md, rule 3). Within each function, no label of §16 to §21 is a prefix of another.
A certificate is good for N when it checks (§21.4) and (g_S, u_S) is the datum register of the contract UTxO that holds N, in the reader’s own read of the contract, the one §2 reads a handle by, and as fresh as that read.
Posting: POST /messaging/v1/{pool}/certificates, Content-Type: application/octet-stream, the body:
nonce (8, big-endian) | certificate
At most 8 + 304 bytes. The stamp is §17.3’s with a label of its own:
digest = SHA-256("Seedelf-Messaging|v1|listing-stamp|" ‖ len(pool) (1) ‖ pool ‖ certificate)
work = the leading zero bits of SHA-256(digest ‖ nonce (8, big-endian))
digest is also the certificate’s listing digest, by which a removal names it. Each good certificate in the certificate file gives its own (§21.4’s vectors). Neither …|listing-stamp| nor …|certificate is a prefix of the other, or of §17.3’s …|stamp| (joint-security.md, rule 3).
The checks run cheapest first, and the first that fails answers:
| Order | Check | Answer when it fails |
|---|---|---|
| 1 | The body holds a nonce, and no more than the longest certificate: 8 to 8 + 304 bytes | 400 for a shorter one; a longer one is refused at the edge, unread, 413 the body is larger than this route takes |
| 2 | The shape (§21.4’s check 1): 273 to 304 bytes, matching its name’s length; version 1; the pool’s network byte; generation 0; the policy of the pool’s network | 400 |
| 3 | Already held: a certificate for the same (N, register, m_S) | 200 {"kept": "already", "digest": <hex>}, whatever the stamp: the held certificate’s listing digest, since the poster’s bytes may be another posting’s |
| 3′ | Not withdrawn: its listing digest isn’t one a withdrawal took down for its (N, register), as the relay keeps them: by their first 8 bytes (below) | 409 withdrawn |
| 3″ | Not withdrawn too often: fewer than 128 withdrawn digests and listed certificates together for its (N, register) [choice], so every one listed could be withdrawn and its withdrawn never pass 128: at 127 withdrawn, one more is listed and a second isn’t | 409 this Seedelf was withdrawn too often at this register: move it to list it again |
| 4 | The price is within its ceiling, and the post fits the address’s window: a certificate is priced and counted as a 512-byte envelope from the same address (§17.4) [choice] | 429, as §17.2’s |
| 5 | The stamp shows at least the price | 402, {"error": …, "price": <bits>} |
| 6 | Room: fewer than two m_S held for its (N, register), and the list under its cap [choice: 64 MiB on mainnet, 8 MiB on preprod] | 409 two certificates for this Seedelf already; 503 the list is full. A kept certificate is never pushed out |
| 7 | The points and the proof (§21.4’s checks 2 to 5) | 400 |
| 8 | The chain (chunk 55’s call 6, the owner, 2026-11-26): (g_S, u_S) is the datum register of the contract UTxO that holds N, on mainnet in the data layer’s own view, on preprod in Koios’s, asked at post time | 409 not this Seedelf's register now; 503 can't check the chain now when the relay can’t read the chain, its Retry-After 60, or on preprod however long Koios’s day’s budget, the address’s share of it or its back-off has to run (below); on preprod, row 4’s 429 when the ask would take the address past its window (below). A certificate is never kept unchecked |
Every post that reaches check 7 is counted against its address’s own price, whatever comes after: a 400 from the proof, a 409 or a 503 from the chain, a request whose client hangs up while the chain is read, or a kept certificate (counted as kept). So one solved stamp can’t be posted again and again for proofs and reads of the chain. On preprod a post whose check 8 asks Koios is counted in its address’s window too, as a kept certificate is, as the ask is made, whatever comes after (round 3’s R-A): one the window refuses then is row 4’s 429, Koios not asked. A post whose answer Koios gave within its minute asks nothing, and is counted there only if it’s listed.
Kept, the answer is 200 {"kept": "new", "digest": <hex>}. Every refusal, the 409s among them, carries {"error": "<words>"}, as §17.2’s do. A certificate’s proof is checked after its price and room for §17.2’s reason: it’s the costly check, about five scalar multiplications and a hash to the curve.
Reading: GET /messaging/v1/{pool}/certificates, for the first page, then ?after=<cursor>, as §17.5’s. The answer is application/octet-stream:
version (1) = 1 | flags (1) | cursor (8) | price (1) | count (2) | count × (kind (1) | length (2) | entry)
next the file’s first bytes still give, as after a crash, and in any case some 51 days of microseconds above the clock (2^42) [choice], since those bytes may be broken too: every cursor from before is a gap, and stays one through a clean restart after it (round 3’s R-D).What the relay keeps and shows:
asset_utxos for (policy, N), one Seedelf a post (the owner, 2026-11-26, over paging the whole contract), each answer cached 60 s, at most 4 asks in flight, each with a 5 s deadline. Koios then learns that the relay asked about that Seedelf, never who posted, though it could match the relay’s ask to the wallet’s own reads of Koios by their times (on preprod the wallet reads Koios alone). A slow re-check asks again about each Seedelf the list knows, listed or withdrawn, at most once a day and one every 2 s [choice], through the same client, cache and places. A Seedelf it finds elsewhere is asked again at least 10 minutes on [choice], and only an answer then that finds it elsewhere too drops its certificates, a removal entry taking each one’s place, and counts toward forgetting its withdrawn digests, which go after three such re-checks in a row, as on mainnet; one back by then is kept. Koios learns nothing it didn’t at the post.
can't check the chain now until the day ends, Koios not asked. Many addresses together can still spend the day, and every post is then that 503 until the next: the 100 bounds one address, not a crowd. Each address’s count is in memory alone, gone with the day. A round of more Seedelfs than the re-check’s share takes as many days as it needs. A round walks the Seedelfs by key, its place and the time it began saved with the list, so a restart goes on from it rather than beginning again; the next begins once it’s over and a day after it began. The day’s count of requests is saved with them, so a restart within the day doesn’t give the day again (round 3’s R-E); after a crash, what was asked since the last save, at most a minute’s, is given again.Retry-After, at most a day, or an hour if it names none, and so does a run of 5 failures in a row [choice]. A post meanwhile is a 503 whose Retry-After says how long./messaging/ spelled with a percent-encoding is refused, 400 encoded paths aren't taken here, since the routes decode a pool’s name; the wallet never sends one.A withdrawal takes one certificate off the list. It’s signed by x_m, never x, on the certificate’s own messaging register:
withdrawal = version (1) = 0x01 ‖ network (1) ‖ digest (32) ‖ c (32) ‖ z (32) 98 bytes
statement = version ‖ network ‖ digest
Seedelf-Messaging|v1|withdrawal-nonce ‖ statement ‖ h_S ‖ m_S ‖ aux) mod q, a k of 0 drawing aux again;Seedelf-Messaging|v1|withdrawal ‖ statement ‖ h_S ‖ m_S ‖ T) mod q;Posting one: POST /messaging/v1/{pool}/withdrawals, Content-Type: application/octet-stream, the body nonce (8, big-endian) ‖ withdrawal, exactly 106 bytes. The stamp is §17.3’s over SHA-256("Seedelf-Messaging|v1|unlisting-stamp|" ‖ len(pool) ‖ pool ‖ withdrawal). Among raw SHA-256’s labels none is a prefix of another: …|withdrawal (the challenge), …|unlisting-stamp|, …|listing-stamp|, …|certificate and §17.3’s …|stamp| (joint-security.md, rule 3); …|withdrawal-nonce is HMAC-SHA-512’s. The checks, cheapest first:
| Order | Check | Answer when it fails |
|---|---|---|
| 1 | The body is 106 bytes | 400 for a shorter one; a longer one is refused at the edge, unread, 413 the body is larger than this route takes |
| 2 | The shape: version 1, the pool’s network byte, c and z below q | 400 |
| 3 | The digest names a certificate the list holds, or one a withdrawal took that no save holds yet: that one is checked as the first post was, against the certificate taken, and answered as its save says, never 404 | 404 no such certificate |
| 4 | The price and window, as a 512-byte envelope from the same address | 429, as §17.2’s |
| 5 | The stamp shows at least the price | 402, {"error": …, "price": <bits>} |
| 6 | The proof, against the held certificate’s (h_S, m_S) | 400, counted against the address’s own price, as every post that reaches this check is, whatever comes after |
Taken, the certificate goes, a removal entry for its digest takes its place in the list, the list is saved (written to a file beside it and synced, renamed into place, and its folder synced, so a power loss can’t undo it either: round 3’s R-F), and the answer is 200 {"withdrawn": true}, and every refusal carries {"error": "<words>"}. 404 tells a poster only what the list already shows, whether a digest is held. A save that fails puts the certificate back, listed again after its removal, so a reader who read the removal reads it again and its digest isn’t kept, and the answer is 503 can't save now, Retry-After: 60: a 200 is only ever given for a withdrawal a crash can’t undo. The save puts it back itself, so a post whose client hung up meanwhile (a wallet’s own timeout) loses nothing; and a post of the same withdrawal while that save is under way, the wallet’s retry or another browser’s, waits for it and is answered as it says, 200 or that 503, never the 404 a wallet takes for done (round 3’s R-C).
withdrawn). Anyone who kept the bytes while they were listed, another wallet, a watcher or the relay itself, could otherwise list the Seedelf again after its owner withdrew it (found while arguing the withdrawal, 2026-11-26). An owner who turns Messages on again posts a new certificate, with a fresh aux, so another digest, which no withdrawal holds. The relay keeps a withdrawn digest as its first 8 bytes, with its Seedelf and register, and check 3′ looks only among that (N, register)’s (round 3’s R-B). That’s enough: the same bytes posted again have the same digest; only a holder of the register’s x lists a certificate there, and only that certificate’s own x_m withdraws it, so nobody else adds a digest beside the owner’s; and a fresh certificate of the owner’s whose digest starts with one of its 128 (about 2^-57 a post) is refused withdrawn, and the wallet’s next, with a fresh aux, is listed. The withdrawal itself still names all 32 bytes. Each counts 8 bytes against the list’s cap, and its Seedelf’s name and register once, 1 + len(N) + 96 bytes, so a Seedelf’s 128 take about 1 KiB, and they go once the relay’s view of the chain has found the Seedelf elsewhere three times in a row, each on a view that changed since the last. At most 128 are held for one (N, register) (check 3″): a loop of posting and withdrawing, each with a fresh aux, would otherwise fill the list, and moving the Seedelf starts it fresh.The wallet withdraws at a network’s switch off, at a Seedelf’s turn-off, and when it removes a Seedelf of its own, for each of its own certificates its copy of the list holds, several apart, as it posts them.
already, the digest that answer named, the bytes the relay holds.no such certificate; any other 404 isn’t. A 410 is tried again hourly.not this Seedelf's register now, for a Seedelf the wallet holds, is tried again with backoff: its mint may not be on the chain the relay reads yet.busy, the window’s 429 for that post). A 503 about listing (the list full, the chain not read now) holds certificates’ posts alone.§0 to §20 were changed in place for the two keys: