Skip to content

Commit 07d290f

Browse files
committed
docs: enhance white paper
1 parent a52001a commit 07d290f

File tree

1 file changed

+30
-5
lines changed

1 file changed

+30
-5
lines changed

docs/WHITEPAPER.md

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Modern web apps must render meaningful JSON on the client. HTTPS protects transp
1515

1616
FISE complements, not replaces: TLS, authentication/authorization, backend rate-limits, or cryptography for secrets. It is best suited where **data itself is the asset** (e.g., curated POI, pricing, recommendations, AI metadata).
1717

18+
FISE also supports **chunked, block-local pipelines** that enable **parallel encode/decode and streaming**, allowing clients to begin rendering **before** the full payload arrives.
19+
1820
---
1921

2022
## 1. Introduction
@@ -54,7 +56,8 @@ A few fetch calls and pagination often suffice to replicate valuable datasets at
5456
2. **Security through diversity** — each app/session/request may use a different rule-set.
5557
3. **Infinite customization** — salts, offsets, metadata channels, ciphers (optional), assembly strategies.
5658
4. **Semantic obfuscation** — protect *meaning*, not transport.
57-
5. **Cheap to run, costly to reverse** — microsecond-level ops; no universal, protocol-level decoder.
59+
5. **Cheap to run, costly to reverse** — microsecond-level ops; no universal, protocol-level decoder.
60+
6. **Streaming & Parallel-ready** — rules can be designed block-local, enabling **per-chunk** encode/decode and multi-core execution.
5861

5962
---
6063

@@ -91,6 +94,11 @@ Interleave (data + salt + metadata [+ decoy]) into a **non-deterministic**, non-
9194
### 4.6 Final Output
9295
A string/byte stream with **no fixed structure** shared across deployments. There is **no protocol-level universal decoder**; decoding requires the **matching rule-set**.
9396

97+
### 4.7 Streaming/Framed Mode (optional)
98+
- Payload is split into **chunks**; each chunk carries **local metadata** (rule id, offsets) and optional **HMAC bindings** (server-side verify).
99+
- Interleave/drift parameters derive from **(ruleset, chunkIndex, bindings)****no global dependency**, so chunks can be **encoded/decoded in parallel**.
100+
- A **super-header** specifies framing (`version`, `nChunks`, `flags`).
101+
94102
---
95103

96104
## 5. Decoding
@@ -102,6 +110,8 @@ Given a matching rule-set:
102110
4. Reverse optional cipher stage.
103111
5. Restore plaintext JSON for rendering.
104112

113+
> **Framed mode.** The client may **decode chunk-by-chunk** (possibly in parallel workers) and **incrementally render** while the stream is arriving. If a rule needs cross-chunk state, carry a **small deterministic state** between chunks.
114+
105115
---
106116

107117
## 6. Security Model
@@ -133,6 +143,11 @@ Attackers can run your app, hook decode functions, or dump plaintext **after** d
133143
### 6.6 Rotation
134144
- **Per-session** or **per-request** rule-set rotation drastically increases reverse-engineering cost and decoder maintenance.
135145

146+
### 6.7 Framed-mode Integrity
147+
- **Anti-reorder/tamper**: per-chunk **HMAC(meta \|\| chunkIndex \|\| bindings)** (server key only).
148+
- **Anti-replay**: include request/session bindings and **timestamp buckets** in each chunk’s meta.
149+
- **Boundary hiding**: optional decoy/padding and variable chunk sizes.
150+
136151
> **Claim wording**: We do **not** claim “impossible to decode.” We claim **no protocol-level universal decoder**, and **significant per-target cost** under rotation, validation, and normalization-resistant channels.
137152
138153
---
@@ -164,6 +179,9 @@ Attackers can run your app, hook decode functions, or dump plaintext **after** d
164179
- Report **mean, stdev, P95/P99**.
165180
- Measure **end-to-end** impact (server encode → client decode → render).
166181

182+
### 8.3 Parallel & Streaming Benchmarks
183+
Report **TTFR** (time-to-first-render) and **throughput** with N workers (server Node workers; client Web Workers/WASM). Typical chunk sizes: **8–32 KB**. Compare streaming vs. non-streaming P95/P99.
184+
167185
---
168186

169187
## 9. Deployment Guidance
@@ -183,6 +201,11 @@ Attackers can run your app, hook decode functions, or dump plaintext **after** d
183201
- Log P50/P95 encode/decode, failure reasons, suspected tamper, rotation distribution.
184202
- A/B toggles to quantify real-world scraping reduction.
185203

204+
### 9.4 When to Use Framed Mode
205+
- Enable for payloads **≥ 100–200 KB** or when using optional WASM/cipher stages.
206+
- Keep rules **block-local** (or carry **tiny state**) to preserve parallel decode.
207+
- Validate against **Normalization Gauntlet** (gzip/brotli, Unicode NFC/NFKC, CDN).
208+
186209
---
187210

188211
## 10. Use Cases
@@ -221,7 +244,6 @@ FISE reframes client-side protection as a **semantic, rule-based envelope**: key
221244

222245
---
223246

224-
225247
## 14. FISE Ecosystem: DSL, Rule VM, Registry & Builder _(v1.0)_
226248

227249
This section defines a path to unlock **community-driven rule diversity** and safe, deterministic execution.
@@ -292,7 +314,7 @@ pipeline:
292314
**Validation Rules**
293315
- Encode→Decode **property test** must hold (`decode(encode(x)) == x`) for random `x`.
294316
- Budget must pass; non-deterministic ops are rejected.
295-
- Normalization Gauntlet score ≥ policy threshold (see 14.5).
317+
- Normalization Gauntlet score ≥ policy threshold.
296318

297319
### 14.3 Rule VM (Sandbox Runtime)
298320
- **Isolation**: no DOM, no network/FS; limited memory; timeouts; op-count quotas.
@@ -305,14 +327,14 @@ pipeline:
305327
- **CI Checks**: linter, schema validate, property tests, fuzz, budget/time limit.
306328
- **Signatures**: rule packages signed (supply-chain integrity).
307329
- **Reputation**: usage telemetry (opt-in, anonymized), field failure rates, attacker breakage reports.
308-
- **Tags**: `mobile-fast`, `normalization-hard`, `emoji-free`, `zero-width-lite`, `wasm-fast`, etc.
330+
- **Tags**: `mobile-fast`, `normalization-hard`, `emoji-free`, `zero-width-lite`, `wasm-fast`, `framed`.
309331

310332
### 14.5 Normalization Gauntlet
311333
Automated suite to stress channels and layout:
312334
- **Compression**: gzip/brotli.
313335
- **Unicode**: NFC/NFKC normalization.
314336
- **Proxy/CDN**: header munging, whitespace squeeze, minify-like transforms.
315-
- **Transport quirks**: \r\n normalization, chunked boundaries.
337+
- **Transport quirks**: \\r\\n normalization, chunked boundaries.
316338
- **Score**: aggregate survival metrics + integrity checks; published in Registry.
317339

318340
### 14.6 Rule Builder (UI + AI)
@@ -337,4 +359,7 @@ Automated suite to stress channels and layout:
337359
- v0.3: WASM fast-path; AI rule-mutation loop; telemetry-backed fitness.
338360
- v1.0: Rule Builder stable; signed packages; enterprise rotation policies.
339361

362+
### 14.10 FISE-Framed Profile
363+
A standard profile for chunked streaming: header (`version`, `ruleset`, `nChunks`), per-chunk meta (bindings, offsets, HMAC), recommended chunk sizes, and **Registry tags**: `framed`, `streaming-ready`, `mobile-fast`.
364+
340365
> **Takeaway**: The ecosystem turns FISE from a library into a **platform**—safe programmability, verifiable quality, and community-driven diversity without exposing secrets on the client.

0 commit comments

Comments
 (0)