Further refine architecture documentation
This commit is contained in:
1 parent
ac57752ec2
commit
851d3b4876
1 file changed
+3
-3
@@ -108,14 +108,14 @@ Client Server
|
|||||||
│ WASM: generate Ed25519 keypair │
|
│ WASM: generate Ed25519 keypair │
|
||||||
│ private key → thread_local storage │
|
│ private key → thread_local storage │
|
||||||
│ │
|
│ │
|
||||||
├─── { public_key: hex } ────────────────►│
|
├─── { public_key: hex } ─────────────────►│
|
||||||
│ │ Generate session_id (32 bytes CSPRNG)
|
│ │ Generate session_id (32 bytes CSPRNG)
|
||||||
│ │ Generate salt₀ (16 bytes CSPRNG)
|
│ │ Generate salt₀ (16 bytes CSPRNG)
|
||||||
│ │ H₀ = Blake3(session_id ║ pub_key ║ salt₀)
|
│ │ H₀ = Blake3(session_id ║ pub_key ║ salt₀)
|
||||||
│ │ Generate random VM program (8–16 opcodes)
|
│ │ Generate random VM program (8–16 opcodes)
|
||||||
│ │ Store: session_id, pub_key, salt₀, H₀
|
│ │ Store: session_id, pub_key, salt₀, H₀
|
||||||
│ │
|
│ │
|
||||||
│◄── { session_id, salt, opcodes, H₀ } ───┤
|
│◄── { session_id, salt, opcodes, H₀ } ────┤
|
||||||
│ │
|
│ │
|
||||||
│ Store: session_id, prevHash=H₀, │
|
│ Store: session_id, prevHash=H₀, │
|
||||||
│ currentSalt=salt₀, opcodes │
|
│ currentSalt=salt₀, opcodes │
|
||||||
@@ -152,7 +152,7 @@ Client Server
|
|||||||
│ │
|
│ │
|
||||||
│ sentSalt = currentSalt │
|
│ sentSalt = currentSalt │
|
||||||
│ currentSalt = next_salt │
|
│ currentSalt = next_salt │
|
||||||
│ prevHash = Blake3(sentSalt ║ H(n-1) ║ …│ ← must mirror server computation
|
│ prevHash = Blake3(sentSalt ║ H(n-1) ║ … │ ← must mirror server computation
|
||||||
```
|
```
|
||||||
|
|
||||||
### 3. Session Expiry
|
### 3. Session Expiry
|
||||||
|
|||||||
Reference in new issue
Block a user