Anti-Quantum Encryption · For the People
MEDINA is a new encryption architecture designed from first principles to resist both classical and quantum attacks. Not by making keys bigger — by making the problem fundamentally harder.
The Problem
Bitcoin, Ethereum, TLS, SSH, your bank — all rely on elliptic curve cryptography. Shor's algorithm on a fault-tolerant quantum computer recovers private keys from public keys in polynomial time. Not weakened. Broken.
Cryptographically relevant quantum computers are estimated by 2035–2050. But "harvest now, decrypt later" attacks are happening today. Adversaries are already collecting encrypted traffic to decrypt when quantum arrives.
NIST's post-quantum standards (Dilithium, Kyber) make keys bigger and rely on new hard problems. But they follow the same paradigm — a single mathematical trapdoor. MEDINA takes a fundamentally different approach.
The Architecture
Quantum computers threaten encryption through two distinct capabilities: massive parallelism (Shor's algorithm) and search speedup (Grover's algorithm). MEDINA defeats each one separately, then combines them.
Kills Quantum Parallelism
Encryption is applied in sequential, dependent layers — like Russian nesting dolls. Each layer's key is derived from the output of the previous layer.
Kn = KDF(outputn-1 || saltn || context)
Shor's algorithm gains its power from exploring many quantum states simultaneously. But when each step depends on the previous step's result, parallelism is useless. A quantum computer with a million qubits still has to go one layer at a time.
Kills Quantum Search
The decryption path is a binary sequence through a massive graph of indistinguishable nodes. At each node, choose 0 or 1. No node reveals whether you're on the right path.
path_key = "01101001...10" // length = N decision points
Grover's algorithm provides quadratic search speedup — but it requires an oracle that confirms "yes, this is correct." Blind Souk gives minimal feedback at any intermediate point. Every wrong path looks identical to the right one until the very end.
Matryoshka forces serial execution. Blind Souk removes effective search. Together, a quantum computer attacking MEDINA has no parallelism advantage and no meaningful search advantage — reducing it to the same capability as a classical machine, but facing an exponentially harder problem.
Implications
MEDINA isn't just for blockchain. Every system that relies on encryption — which is every system — needs quantum resistance.
HTTPS, API security, certificate authorities. Every secure connection on the internet uses key exchange algorithms that quantum computing will break. MEDINA can replace the vulnerable layer.
Interbank transfers, payment processing, card security. Financial infrastructure is built on RSA and ECC. A quantum breach here isn't theoretical — it's existential.
Classified communications, intelligence systems, diplomatic channels. Nation-states are already stockpiling encrypted traffic for future quantum decryption.
Patient records, genomic data, research IP. Medical data has a long shelf life — records encrypted today must remain private for decades.
Transaction signing, wallet security, consensus mechanisms. Billions in value protected by ECDSA that will eventually fall.
End-to-end encrypted messaging, email, file storage. The promise of privacy means nothing if the underlying encryption has a known expiration date.
A Tribute
MEDINA is a Moroccan project. It carries the name of the ancient walled cities — the medinas — that have protected communities for over a thousand years. This project exists because of the foundations laid by Morocco's leadership in education, technology, and national development.
الحسن الثاني
Thank you for building the schools. Thank you for opening the doors. The universities, the bridges to the world, the belief that a nation's greatest resource is its people's minds. You gave us the foundation. We built on it.
محمد السادس
Thank you for the digital Morocco. The fiber optic, the tech hubs, the polytechnic university, the strategy that said "this country will not be left behind." You gave a generation the tools to create. This is one of the things we created.
Thank you both. MEDINA is Moroccan.
This is what your investment in a nation looks like when it grows.
How We Compare
An honest comparison against every major encryption standard in use or proposed today.
| Property | RSA-2048 | ECDSA | AES-256 | Dilithium | Kyber | MEDINA |
|---|---|---|---|---|---|---|
| Year | 1977 | 1985 | 2001 | 2022 | 2022 | 2026 |
| Type | Asymmetric | Asymmetric | Symmetric | Signature | Key Exchange | Hybrid |
| Shor's | BROKEN | BROKEN | N/A | Resistant | Resistant | N/A (symmetric) |
| Grover's | Weakened | Weakened | 128-bit | Resistant | Resistant | Minimal oracle |
| Parallelism defense | None | None | None | None | None | Sequential chains |
| Approach | Single trapdoor | Single trapdoor | Single trapdoor | New trapdoor | New trapdoor | Two combined pillars |
Good first step. Based on lattice problems believed to be quantum-hard. But they follow the same paradigm — one mathematical trapdoor. If that trapdoor falls (as RSA's will), there's no second layer.
Different philosophy entirely. Not a new trapdoor — two combined mechanisms that each neutralize a specific quantum advantage. Defense in depth, not defense in hope.
Standing on Giants
MEDINA exists because these came first. Every encrypted message, every secure transaction, every protected secret — traces back to these minds.
The word algorithm is his name, Latinized. Working in Baghdad's House of Wisdom around 820 AD, al-Khwarizmi wrote Kitab al-Jabr — giving us the word algebra. Every algorithm ever written, including MEDINA, descends from his work.
The idea that changed everything: two strangers can agree on a secret over a public channel. Before Diffie-Hellman, secure communication required physically exchanging keys.
The first practical public-key cryptosystem. For nearly 50 years, RSA has protected banking, government, and military communications. Its vulnerability to quantum computing is MEDINA's reason for existing.
The workhorse of modern encryption. AES protects everything from classified government documents to your Wi-Fi password. MEDINA uses AES-256 as its core layer cipher. We don't replace AES. We armor it.
Proved that cryptography can replace trust. Bitcoin showed the world that math can be money. Its vulnerability to quantum computing is one of MEDINA's motivations.
End-to-end encryption for the masses. The Signal Protocol powers WhatsApp, Signal, and Facebook Messenger — protecting billions of conversations.
From al-Khwarizmi's algebra to Signal's double ratchet —
1,200 years of building the secure world.
MEDINA is the next chapter.
License
MEDINA is currently released under the MEDINA Open Audit License (MOAL v1.0). You can read it, audit it, attack it, and publish your findings. But you cannot copy the code, create derivative works, or use it commercially without permission.
We believe in Kerckhoffs's principle: a cryptographic system must be secure even if everything about the system, except the key, is public knowledge. The algorithm is transparent. The implementation is ours — for now.
Roadmap
Architecture design, threat modeling, mathematical foundations. Working reference implementation with live challenges.
Mathematical security proofs. Rust reference implementation. Independent third-party audit.
Drop-in libraries for TLS, SSH, web applications, and blockchain systems. Making quantum resistance accessible.
Commercial licensing for enterprise integration. Compliance certification partnerships. Revenue generation.
IETF RFC submissions, NIST evaluation track, potential open-sourcing under permissive license.
Honest Assessment
Good cryptography is built on honesty, not hype. Here's what we know we need to solve.
Sequential layers mean slower encryption/decryption. We need to find the right balance between security depth and practical speed.
Large path keys are enormous. We're researching compression strategies and hierarchical path structures to make key management practical.
Security claims must hold under timing attacks, power analysis, and cache-based attacks. This requires careful constant-time implementation.
Mathematical security reduction to known hard problems. We need to prove, not just argue, that MEDINA's security guarantees hold.
Live Challenges
We encrypted two files with MEDINA and published everything — the algorithm, the code, the encrypted output. All you need are the keys.
8 layers. 16-bit path. Deliberately weakened for humans to crack. The master key is a SHA256 of something guessable. First to decrypt and post with #MEDINAChallenge gets credited.
718 bytes · 216 paths · 8 AES layers
Take the Challenge →64 layers. 256-bit path. 256-bit random key. Full-strength MEDINA. No classical or quantum computer can crack this. Not now. Not ever.
4,334 bytes · 2256 paths · 64 AES layers
See the Forever File →MEDINA is in active development. Review the code, break our assumptions, join the mission.
Get in Touch
We welcome cryptographers, researchers, enterprises, and anyone who cares about the future of encryption.
◆ MARRAKECH ◆
مراكش
MEDINA is named for the ancient walled cities of Morocco — where the souks are labyrinths by design, where every alley looks the same to outsiders, and where the only way through is to know the path.
The Blind Souk routing algorithm is a tribute to Marrakech — the Red City, founded in 1070, approaching its thousandth year. Almost a millennium of walls that still stand.
Est. 1070 — 956 years and counting