FNP - Cryptography - M²-ORE Order-Revealing Encryption
Summary (Explain Like I’m 5)
Imagine you have secret numbers [3, 7, 2, 9, 1], and you want to send them to a friend encrypted so they can’t see the actual values, but they should still be able to sort them correctly. M²-ORE does this magic: You encrypt them as [🔒A, 🔒B, 🔒C, 🔒D, 🔒E], and your friend can determine: 🔒E < 🔒C < 🔒A < 🔒B < 🔒D ✓ (correct order, 1 < 2 < 3 < 7 < 9) The trick: Add special “noise” to each number that’s small enough to not flip the ordering but big enough to hide the exact value.Technical Deep Dive
M²-ORE (Module-LWE Order-Revealing Encryption) is a deterministic symmetric encryption scheme based on Learning With Errors that reveals message ordering without decryption. Parameters (Solution C - Hybrid):| Parameter | Value | Rationale |
|---|---|---|
| n (LWE dimension) | 1536 | Increased from Kyber’s 1024 to tolerate encryption noise |
| k (Module rank) | 4 | Kyber-1024 compatibility; module structure for security |
| q (Modulus) | 2^56 | Must satisfy q > 2^54 for signal >> noise determinism |
| β (Error) | ±1 (CBD) | Centered binomial: Pr[e=±1]=1/2, Pr[e=0]=1/2 |
Mermaid Diagrams
Key Terms
- Order-Revealing → Enables comparison without decryption; deterministic ordering preserved
- Module-LWE → Lattice problem with module structure; believed post-quantum hard
- Deterministic → Same message always encrypts to same ciphertext (no semantic security)
- Signal vs Noise → Signal = scaled message, Noise = error term; signal >> noise ensures correctness
- IND-OCPA → Indistinguishability under Order-Correlated Plaintext Attack; best possible security model for ORE
- Ephemeral Key → Short-lived key; M²-ORE ordering keys should be rotated monthly
- Quantum Security → 115 bits; approximately 2^115 quantum operations to break
Q/A
Q: Why not just use regular encryption? A: Regular encryption is “semantic secure” - identical messages encrypt to different ciphertexts each time, preventing server-side comparison. M²-ORE is deterministic specifically to enable ordering without decryption, sacrificing semantic security for functionality. Q: Can the server recover plaintext messages from encrypted positions? A: No. The noise added (±1 centered binomial) ensures the recovered message is only accurate if you know the secret key. Without sk, the lattice problem (Learning With Errors) is computationally hard. Q: Why is 115 bits quantum security okay for ordering but not for long-term confidentiality? A: Ordering is ephemeral - it’s only needed during active document editing. M²-ORE keys rotate monthly. Kyber (128-bit quantum) handles long-term content confidentiality, which needs to resist adversaries collecting ciphertexts now and decrypting later with quantum computers. Q: How does noise prevent collision attacks where two different messages encrypt identically? A: With q=2^56 and messages scaled to 54 bits, the “gap” between consecutive messages is ≈2^2. Noise is only ±1, so signal >> noise. Collisions are astronomically unlikely for distinct messages. Q: What happens if someone replays an old encrypted position? A: LSEQ identifiers include (digit, site, counter), and operations are timestamped with Lamport clocks. Replayed operations are detected as duplicates and rejected by the CRDT merge logic.Example / Analogy
Weighted Boxes Analogy: Your friend is organizing a library but you want to keep book titles secret:- Traditional encryption: Books in locked boxes, friend can’t sort them
- With M²-ORE: Books in locked boxes with hidden weights:
- Heavy box = important book (higher priority)
- Friend can sort by weight without opening boxes
- Weights slightly randomized so friend can’t guess exact title
- But weights are randomized carefully: a “War & Peace” box is always heavier than a “Sonnet” box
- Your edits are encrypted (only you read them)
- Server can still determine character positions and order (M²-ORE)
- Server merges edits deterministically
- Colleague sees encrypted positions, can’t read your content (maintains privacy)
- Both of you see correct document order
Cross-References: System Overview, LSEQ CRDT, Kyber-1024, FNP Protocol Flow, Halo2 Circuits Category: Cryptography | Protocol | Post-Quantum Difficulty: Intermediate ⭐⭐⭐ Updated: 2025-11-28