# Proof 07 — Asynchronous Post-Quantum Forward Secrecy (`PQXDH`) & Key-Blinded Mailboxes Offline relay queues (`Drop-Box`) cannot execute interactive ephemeral Diffie-Hellman handshakes because the recipient may be asleep or disconnected when the sender transmits. `fatext v4.0` closes both the **post-compromise retrospective decryption gap** and the **relay recipient-linkability gap** via signed one-time hybrid prekeys ([Signal PQXDH](https://signal.org/docs/specifications/pqxdh/), formally verified at [USENIX Security 2024](https://www.usenix.org/conference/usenixsecurity24/presentation/bhargavan)), power-of-four padding ([Nostr NIP-59](https://nips.nostr.com/59)), 2-hop KEM onion routing ([Session Onion Requests](https://arxiv.org/html/2002.04609v3)), and prime-order key-blinded daily mailboxes. ## 1. Theorem 7.1 (Asynchronous Forward Secrecy under Post-Burn State Compromise) **Construction**: For each home seed $S_m$ ($m \in 1..M$), recipient $B$ samples independent 96-byte CSPRNG seeds $\text{seed}_{m,j} \leftarrow \{0,1\}^{768}$ (disjoint across seeds so $\text{opk\_id}_{m,j} \ne \text{opk\_id}_{m',j'}$ for $m \ne m'$), derives hybrid `X25519 + ML-KEM-768` keypairs $(dk_{m,j}, EK_{m,j})$, signs `"fatext-v4-opk\n" || B || "\n" || kv || "\n" || opk_id || "\n" || base64(EK_{m,j})` under $sk_{\text{id}}(kv)$, and uploads only $(opk\_id, EK_{m,j}, \sigma_{m,j})$ to $S_m$. Upon pulling and decrypting an envelope carrying `opk_id`, $B$ executes `burn_local_opks`, overwriting `prekeys.json` without $\text{seed}_{m,j}$. **Statement**: Let $E^*$ be an offline Drop-Box envelope encapsulated against claimed prekey $EK_{m,j^*}$ and decrypted at time $t_{\text{burn}}$. Suppose an adversary $\mathcal{A}$ records all network ciphertexts from $t = 0$ and, at any time $t_{\text{comp}} > t_{\text{burn}}$, compromises $B$'s full persistent state (`master.seed` + remaining unburned `prekeys.json` + all seed relay storage). Modeling `SHA3-256` as a random oracle, $\mathcal{A}$'s IND-CCA2 advantage in distinguishing the plaintext of $E^*$ is bounded by: $$\text{Adv}^{\text{fs-ind-cca2}}_{\text{DropBox-PQXDH}}(\mathcal{A}) \le \min\left(\text{Adv}^{\text{ind-cca2}}_{\text{ML-KEM-768}}(\mathcal{B}_1) + \frac{q_H + q_D}{2^{256}},\; \text{Adv}^{\text{gap-cdh}}_{\text{X25519}}(\mathcal{B}_2) + q_D \cdot \delta_{\text{ML-KEM-768}} + \frac{q_H}{2^{256}}\right) + \text{Adv}^{\text{ind-cca2}}_{\text{AES-256-GCM}}(\mathcal{B}_3) + \text{Adv}^{\text{euf-cma}}_{\text{Schnorr}}(\mathcal{B}_4).$$ **Proof**: 1. **Authenticity against Malicious Relay Substitution**: Before encapsulating, the sender verifies $B$'s `ristretto255` Schnorr signature $\sigma_{m,j^*}$ binding $(B, kv, opk\_id, EK_{m,j^*})$ to $B$'s verified `microlog` $PK_{\text{id}}$. Substituting a rogue prekey reduces directly to Schnorr EUF-CMA ($\text{Adv}^{\text{euf-cma}}_{\text{Schnorr}}$). 2. **Cryptographic Independence after Burn**: Because $\text{seed}_{m,j^*}$ was sampled from fresh OS CSPRNG entropy—**not** derived from `master.seed`—and erased from `prekeys.json` at $t_{\text{burn}} < t_{\text{comp}}$, revealing `master.seed` and $\{\text{seed}_{m,j}\}_{j \ne j^*}$ at $t_{\text{comp}}$ gives $\mathcal{A}$ zero information about $dk_{m,j^*}$. By Theorem 4.1 (`Proof 04`), recovering the hybrid shared secret $ss^*$ breaks **both** [NIST FIPS 203 `ML-KEM-768`](https://csrc.nist.gov/pubs/fips/203/final) and [RFC 7748 `X25519`](https://www.rfc-editor.org/info/rfc7748/) Gap-CDH; once $ss^*$ is indistinguishable from random, `aead_key = SHA3-256("fatext-v4-kem-aead\n" || ctx || "\n" || ss^*)` reduces payload confidentiality to `AES-256-GCM`. 3. **Zero Cross-Seed Burn Race**: Because prekey batches are strictly partitioned across seeds ($\mathcal{O}(S_1) \cap \mathcal{O}(S_2) = \emptyset$), burning $opk\_id_{1,j^*}$ after claiming from $S_1$ never invalidates any unpopped prekey hosted on $S_2$. $\square$ ## 2. Theorem 7.2 (Daily Key-Blinded Mailbox Unlinkability & ACK Soundness) **Construction**: For UTC day index $d = \lfloor \text{ts} / 86400 \rfloor$ and recipient primary key $PK_{\text{id}} = [sk_{\text{id}}]B$ over [RFC 9496 `ristretto255`](https://www.rfc-editor.org/info/rfc9496/): $$t_d = H_s(\text{"fatext-v4-mbx-tweak\n"} \parallel PK_{\text{id}} \parallel \text{uint64\_be}(d)) \in \mathbb{Z}_\ell, \quad PK_{\text{mbx}, d} = PK_{\text{id}} + [t_d]B, \quad sk_{\text{mbx}, d} = sk_{\text{id}} + t_d \pmod \ell.$$ The mailbox path `/v4/dropbox/mbx_<20_crockford>` is derived from $\text{SHA3-256}(\text{"fatext-v4-mbx-id\n"} \parallel PK_{\text{mbx}, d})$, and `GET`/`ACK` requests authenticate solely via Schnorr signatures under $PK_{\text{mbx}, d}$ (`X-Mbx-Pk`). **Statement**: 1. **Out-of-Band & Cross-Day Unlinkability**: Against an honest-but-curious relay (or passive observer) that does not hold $B$'s exact $PK_{\text{id}}$ in a candidate directory, any sequence of daily mailbox keys $\{PK_{\text{mbx}, d_1}, \dots, PK_{\text{mbx}, d_k}\}$ is indistinguishable in the Random Oracle Model from $k$ independent uniform elements of the prime-order `ristretto255` group. **Directory Precomputation Caveat**: Because $t_d$ depends solely on public $(PK_{\text{id}}, d)$, a relay with access to a public directory of $U$ known `PK_id` keys (such as its own `/v4/ring-pool` and DHT `ReachDescriptor` cache) can build a daily reverse lookup table in $O(U)$ group operations (seconds for $U \sim 10^5$); strong recipient unlinkability against the home relay therefore holds only when $PK_{\text{id}}$ is exchanged out-of-band outside public directories, while sender IP correlation is independently decoupled via 2-hop `/v4/onion` + `Scoped bLSAG` blind quota + `[1024, 4096, 16384, 65536]` bucket padding. 2. **Unforgeable Mailbox Pull/Purge**: Forging a valid `GET` or `/ack` signature for `mbx_d` without knowing $sk_{\text{id}}$ reduces tightly to Discrete Logarithm on $PK_{\text{id}}$: $$\text{Adv}^{\text{forge-mbx}}(\mathcal{A}) \le \text{Adv}^{\text{euf-cma}}_{\text{Schnorr-ristretto255}}(\mathcal{B}) + \frac{q_H}{2^{100}}.$$ **Proof of Additive Key Homomorphism Reduction**: Given Schnorr challenge key $PK^* = [x^*]B$, simulator $\mathcal{B}$ programs or evaluates $t_d = H_s(\text{"fatext-v4-mbx-tweak\n"} \parallel PK^* \parallel \text{uint64\_be}(d))$ and sets $PK_{\text{mbx}, d} = PK^* + [t_d]B$. Any adversary producing two rewound Schnorr transcripts $(R, c_1, s_1)$ and $(R, c_2, s_2)$ under $PK_{\text{mbx}, d}$ yields $x_{\text{mbx}} = (s_1 - s_2)(c_1 - c_2)^{-1} \pmod \ell$, from which $\mathcal{B}$ immediately extracts $x^* = x_{\text{mbx}} - t_d \pmod \ell$, solving Discrete Logarithm on `ristretto255` (the $2^{-100}$ term bounds 100-bit Crockford `mbx_` collision). ## 3. Theorem 7.3 (`v4.1` Pairwise `contact_secret` Mailbox Unlinkability & Authenticated OPK Quota) **Construction**: During `pair join` / `pair accept`, peers exchange a 32-byte E2EE `contact_secret` ($cs \leftarrow \{0,1\}^{256}$). Subsequent `--blind-mailbox` deliveries derive: $$t_d = H_s(\text{"fatext-v4-mbx-contact-tweak\n"} \parallel cs \parallel PK_{\text{id}} \parallel \text{uint64\_be}(d)), \quad PK_{\text{mbx}, d} = PK_{\text{id}} + [t_d]B.$$ Additionally, `POST /v4/prekeys/{target_id}/claim` rejects unauthenticated requests (`HTTP 401`) and requires either signed HTTP headers (`fatext-v4-http\n` + `X-Microlog-B64`) or a `Scoped bLSAG` blind quota proof bounded by `--opk-claim-limit`. **Statement & Proof Sketch**: Even if a curious Homeserver holds a complete index of $U$ public `PK_id` identities (from directory profiles or DHT caches), without knowing $cs$ its probability of matching a `contact_secret` mailbox address $PK_{\text{mbx}, d}$ to $PK_{\text{id}}$ with $q_H$ random-oracle queries is bounded by $q_H / 2^{256}$ (closing the Theorem 7.2 $O(U)$ directory precomputation caveat for paired contacts). Simultaneously, authenticating and rate-limiting `/claim` ensures an unauthenticated attacker cannot exhaust a victim's finite one-time `opk` supply to force static-`ek_kem` fallback.