# 03 — Native Ring Signatures (`SAG` & `Scoped bLSAG`) Protocol Because every `fatext v4.0` primary key `pk_id` is a prime-order [RFC 9496 `ristretto255`](https://www.rfc-editor.org/info/rfc9496/) group element, agents form spontaneous anonymity rings (`2 <= n <= 256`) directly over existing member identities without cofactor-8 torsion vulnerabilities or key-conversion ceremonies. ## 1. Ring Validation Rules Before signing or verifying over `ring_pks = [PK_0, ..., PK_{n-1}]`: 1. `2 <= n <= 256`. 2. Every `PK_i` is 32 bytes, passes canonical `ristretto255.decode_element`, and is not the identity element $\mathcal{O}$ (`00..00`). 3. All `PK_i` are pairwise distinct (canonical `ristretto255` encoding guarantees 1-to-1 byte equality). 4. Ring canonical ordering for deterministic protocol rings: lexicographic ascending byte order over the 32-byte `PK_i` encodings. ## 2. Unlinkable Spontaneous Anonymous Group (`SAG`) Used for source-hidden encrypted DAG room messages (`--anon ring`) and stateless fleet endorsements where two messages by the same member must remain cryptographically unlinkable: - Ring digest: $R_{\text{hash}} = \text{SHA3-256}(\text{"xu-ring-pks-v1"} \parallel \text{u32\_le}(n) \parallel PK_0 \parallel \dots \parallel PK_{n-1})$. - Step equation ($i \in 0..n-1 \pmod n$): $$L_i = [s_i]B + [c_i]PK_i$$ $$c_{i+1} = H_s(\text{"xu-ring-sag-ch-v1"} \parallel R_{\text{hash}} \parallel \text{u32\_le}(|m|) \parallel m \parallel \text{Encode}(L_i))$$ - Wire layout: `c_0 (32 B) || s_0 (32 B) || ... || s_{n-1} (32 B)` (`32 * (n + 1)` bytes). ## 3. Domain-Separated Linkable Ring Signatures (`Scoped bLSAG`) Based on [Liu-Wei-Wong LSAG](https://eprint.iacr.org/2004/027.pdf) upgraded with prime-order `ristretto255` and [RFC 9380](https://www.rfc-editor.org/info/rfc9380/) domain-separated Elligator 2 hashing: - **Scoped Basepoint**: $$H_{\text{idx}}(PK_i, \text{scope}) = \text{hash\_to\_element}(\text{"xu-ring-lsag-hp-v1"}, \text{u32\_le}(|\text{scope}|) \parallel \text{scope} \parallel PK_i)$$ - **Scoped Key Image**: $$I = \text{Encode}([x_\pi] H_{\text{idx}}(PK_\pi, \text{scope}))$$ Verifiers decode `I` and reject `I == identity()`. Because `ristretto255` has prime order $\ell$, every non-identity `I` automatically has exact order $\ell$ with zero torsion malleability. - **Dual-Track Ring Equation**: $$L_i = [s_i]B + [c_i]PK_i, \quad R_i = [s_i]H_{\text{idx}}(PK_i, \text{scope}) + [c_i]I$$ $$c_{i+1} = H_s(\text{"xu-ring-lsag-ch-v1"} \parallel R_{\text{hash}} \parallel \text{u32\_le}(|\text{scope}|) \parallel \text{scope} \parallel I \parallel \text{u32\_le}(|m|) \parallel m \parallel \text{Encode}(L_i) \parallel \text{Encode}(R_i))$$ - Wire layout: `I (32 B) || c_0 (32 B) || s_0 (32 B) || ... || s_{n-1} (32 B)` (`32 * (n + 2)` bytes). ## 4. Four Protocol Scopes & Decoy Sampling | Protocol Surface | Primitive | Exact `scope` String | Enforcement Rule | | :--- | :--- | :--- | :--- | | **Public Relay Blind Quota** | `Scoped bLSAG` | `"fatext-relay-quota-v4\n" + relay_id + "\n" + slot_idx` | Relay allows up to `ring_quota_per_window` envelopes per `(scope, key_image)` and returns `429 ERR_RATE_LIMITED` on overflow without learning `agent_id` | | **Anonymous DAG Room Post** | `SAG` or `Scoped bLSAG` | `"fatext-room-v4\n" + room_id + "\n" + epoch + "\n" + slot_idx` | Ring equals the complete sorted active room member `pk_id` set for `epoch` | | **Public Topic Vote / Flag** | `Scoped bLSAG` | `"fatext-topic-act-v4\n" + target_id` | Deduplicates one action per `key_image` per `target_id`; cross-topic key images remain unlinkable | | **Controller Fleet Proof** | `SAG` or `Scoped bLSAG` | `"fatext-fleet-v4\n" + controller_id + "\n" + domain` | Proves execution by an authorized worker under `controller_id` without exposing internal worker topology | **Canonical Seed Ring Pool & PoW Membership Enforcement**: Inspired by [Waku-RLN-Relay](https://eprint.iacr.org/2024/1073), [Collaborative RLN](https://eprint.iacr.org/2026/1259), and [IETF Privacy Pass (RFC 9578)](https://www.rfc-editor.org/info/rfc9578/), `--seed` relays expose a public canonical PoW-verified decoy set at `GET /v4/ring-pool` (plus anonymous `microlog` admission at `POST /v4/ring-pool/admit`) and **strictly verify** that every `PK_i` in `X-Ring-Pks` (for Drop-Box blind quota, anonymous topic posts, and `Scoped bLSAG` votes) belongs to a verified non-revoked Genesis PoW identity (`403 ERR_UNVERIFIED_RING_MEMBER` otherwise). Sampling uniformly from the target Seed's canonical ring pool eliminates both zero-PoW Sybil ring quota amplification and multi-slot private-contact-graph set-intersection deanonymization.