You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DESIGN-E2EE.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,13 @@ Owner: Kyaw
16
16
- Out of scope initial: traffic analysis resistance; plaintext content scanning; hardware tamper beyond platform enclaves.
17
17
18
18
## 3. Cryptographic Primitives and Libraries
19
+
20
+
### 3.1 Argon2id Parameters (desktop vs mobile)
21
+
- Desktop/Web: m=64 MiB, t=3, p=1 — balances user-perceived latency with robust GPU/ASIC resistance for key wrapping. Typical derivation latency ~200–500 ms on contemporary laptops.
22
+
- Mobile: m=32 MiB, t=3, p=1 — reduces memory pressure and thermal impact while keeping meaningful resistance. Target latency ~300–700 ms depending on device class.
23
+
- Salt length: 16 bytes (random per vault). Output length: 32 bytes (KEK).
24
+
- Rationale: Memory-hardness is the dominant cost lever; t=3 provides reasonable compute amplification without excessive energy draw on battery devices.
25
+
19
26
- Ed25519 (signing) for identities and devices.
20
27
- X25519 (ECDH) for key agreement; sealed boxes for key wrapping (HPKE-ready abstraction).
21
28
- Messaging: Signal/Double Ratchet via libsignal-client (WASM) for 1:1/small groups.
@@ -47,6 +54,12 @@ Transitions:
47
54
- Group sender keys: per-room sender key rotated on membership change and every 7 days; per-recipient key wraps.
48
55
49
56
## 6. File Encryption and Sharing
57
+
See also Mermaid diagrams in docs/diagrams for provisioning, file-share, and rekey flows.
58
+
59
+
### 5.1 Canonicalization (signatures & tokens)
60
+
- Manifest signing: Canonical JSON per RFC 8785 (JSON Canonicalization Scheme, JCS). Remove the `sig` field before canonicalization; sign the result with device Ed25519. Verification recomputes canonical JSON and verifies the signature.
61
+
- PASETO payload normalization: When computing or verifying detached request signatures or audit hashes, canonicalize the JSON payload using the same JCS rules and sort header fields if applicable. Avoid including transient fields (e.g., `iat` skew-adjusted values) in hash commitments.
0 commit comments