Quantum Cryptography & Post-Quantum Encryption
Quantum cryptography and quantum computing, hands-on: send a key with photons (BB84) and catch an eavesdropper, watch Shor's algorithm factor a number and Grover's search find an answer, see which encryption is quantum-safe, and run real post-quantum ML-KEM (Kyber) and ML-DSA in your browser.
Send a secret key with single photons
Alice sends photons polarised in a random direction: + basis (↔ = 0, ↕ = 1) or × basis (⤢ = 0, ⤡ = 1). Bob measures each one in a random basis. Afterwards they compare bases (not bits) in public and keep only the photons where they matched. If Eve measures photons on the way, she disturbs about a quarter of the kept ones, and Alice and Bob see the errors.
The first photons, one by one
Green rows are kept (same basis). Orange = an error Alice and Bob will find when they compare a sample. A grey eye = Eve measured that photon.
Error rate vs how much Eve listens
Above about 11% errors no secret key can be distilled, so Alice and Bob throw the key away and try again. Below it, “privacy amplification” shrinks the key so Eve knows nothing about what is left (key rate 1 − 2·h(error)).
How a quantum computer factors a number
To factor N, pick a number a and find the period r of aˣ mod N (how often it repeats). The quantum computer finds r by putting every x in superposition at once and using the quantum Fourier transform; then plain maths turns r into the factors. This is simulated exactly here for N up to 255. To see the actual gates, open the Shor circuit in the Quantum Computer Simulator.
1. The repeating pattern aˣ mod N
2. What the quantum computer measures
3. From the period to the factors
Find one item in an unsorted list, √N times faster
All items start equally likely. Each Grover step flips the sign of the answer (the oracle), then reflects every amplitude about the average. The answer grows, the rest shrink. Stop at the right moment and measuring gives the answer almost surely; go too far and it shrinks again. The same algorithm as a real gate circuit: Grover search on 3 qubits.
What Grover means for passwords and keys
Which encryption survives a quantum computer?
Security in bits = about how many 2ⁿ steps the best known attack needs. Sizes are the public key and the ciphertext or signature, in bytes. Post-quantum keys are bigger: that is the main cost of switching.
Harvest now, decrypt later: is your data at risk? (Mosca's rule)
Attackers can record encrypted traffic today and decrypt it once a big enough quantum computer exists (“Q-Day”). If the years your data must stay secret plus the years it takes to switch to post-quantum encryption is more than the years until Q-Day, you are already late.
How big a quantum computer breaks RSA?
These are published estimates; they keep dropping as the algorithms improve. Today's largest machines have about a thousand noisy physical qubits, and nobody has factored anything bigger than tiny numbers with Shor's algorithm.
Check a website
Opens the Quantum-Safe Website Checker: does the site use post-quantum encryption today?
What happens to private text you save in Copy Text (and Watch, Favourites, the Workout Planner)
Short answer: the 🛡 Passphrase lock with “Make one for me” is safe for as long as anyone can foresee, quantum computers included. The 🔑 Memo-key lock is safe from everyone today, but a big quantum computer could open it later, and our best guess is that this becomes possible some time in the 2030s. A Hive backup can never be deleted, so pick the lock for how long the text must stay secret, not for today.
| Where your text is | Who can read it today | Once big quantum computers exist | Safe for about |
|---|---|---|---|
| Only in this browser the default: nothing is uploaded | Anyone who can use this device and browser profile | Makes no difference: it never travelled anywhere | As long as your device is safe |
| ☁ Sync to your Dropbox, OneDrive, Google Drive or a synced folder | You, the cloud company, and anyone who gets into that account (the file is not encrypted by MES) | Someone who recorded the upload could read it later if the connection did not use post-quantum encryption (see the checks below) | As long as your cloud account is safe |
| Hive backup, Encrypt off | Everyone, now and forever | Already public | Never: don't put anything private here |
| Hive backup, 🔑 Memo key | Only you (Hive Keychain unlocks it) | Your public memo key is printed on your Hive account. A big enough quantum computer can work the private memo key out from it (Shor's algorithm) and open every memo-key save you ever made, on every MES page, plus your encrypted transfer memos. | Our guess: until the 2030s. Could be sooner, could be 20+ years. |
| Hive backup, 🛡 Passphrase | Only someone who has the passphrase | No real help to an attacker: AES-256 keeps about 128 bits of strength even against Grover's search, and guessing the passphrase is still guessing | “Make one for me”: for good. Your own passphrase: see the calculator below. |
On Hive, everyone can still see that you saved something: when, from which MES page, and roughly how big. Only the contents are hidden.
How long would my passphrase hold?
Type a passphrase to test it. It stays on this page: it is not saved and not sent anywhere. This is the only thing standing between an attacker who downloads your passphrase-locked save and your text.
How these numbers are made: every guess has to run PBKDF2-SHA256 600,000 times (that is what the page does when you lock a save). A top gaming graphics card manages about 15,000 guesses a second at that, and renting one costs about $0.50 an hour. On average an attacker finds the passphrase after trying half of all possibilities. Hardware gets about twice as cheap every 2.5 years, which is where the future prices come from; special chips built for the job could be roughly 10× cheaper again. A quantum computer doesn't change this much: Grover's search would have to run all 600,000 rounds inside the quantum machine for every step, which is far slower than graphics cards. The strength in bits is a rough estimate from the length and the kinds of characters; a phrase from a song or a book is much weaker than it looks.
When could a quantum computer open a memo-key save, and what would it cost?
- Today: nobody can. Breaking a Hive memo key (256-bit elliptic curve) with normal computers takes about 2¹²⁸ steps: more than every computer on Earth could do before the Sun burns out.
- What it takes: about 2,330 error-free (“logical”) qubits for a 256-bit curve (Roetteler et al. 2017), which means roughly a million good physical qubits. The biggest machines today have about a thousand noisy ones, and the estimates keep dropping (RSA-2048 went from 20 million physical qubits in 2019 to under a million in 2025).
- When: nobody knows. Experts asked each year by the Global Risk Institute see a real chance within 10 years and think it more likely than not within about 15 to 20. NIST tells everyone to stop relying on elliptic curves by 2030 and to stop using them by 2035. Our planning guess: treat memo-key saves as readable by the mid-2030s.
- Cost: the first machines will cost billions, be few, and need hours to a day per key, so they will go after big targets first (exposed Bitcoin keys, government secrets). Within some years after that, opening one key should get cheap. Old saves don't expire: a save made today can be opened whenever that day comes.
- Hive itself uses the same curve for all account keys, so Hive will have to move to new keys before then. That protects your account and funds, but not saves already written to the chain: changing your memo key later does not re-lock old saves. To protect one, load it and save it again with the passphrase lock (the old copy stays on the chain, but it is still only memo-key locked, so for something very sensitive assume the old copy will be read one day).
What about the connection to mes.fm?
mes.fm itself already uses post-quantum encryption for its connections: check mes.fm (grade A, X25519MLKEM768). That protects the page while it loads. It is not what protects a Hive backup: the backup is locked in your browser before it goes anywhere, then written to the public Hive blockchain, where anyone can download it. Only the lock you picked keeps it private. For ☁ Sync the connection to your cloud does matter, so check it: Dropbox · OneDrive · Google Drive · a Hive API node.
Which lock for what
| What you save | Use |
|---|---|
| Things that don't matter in a few years: links, drafts, reminders, shopping lists | 🔑 Memo key is fine (easiest: nothing to remember) |
| Personal notes, addresses, phone numbers, anything you would not want public in 10 to 20 years | 🛡 Passphrase, with “Make one for me” or 6+ random words |
| Passwords, recovery codes, private keys, seed phrases | Best kept out of any online backup. If you must: 🛡 Passphrase with “Make one for me”, kept in a password manager, and don't tick “Remember it on this device” |
The passphrase is only as safe as where you keep it: if you tick “Remember it on this device”, anyone who can use that browser can open your saves. Lose the passphrase and nobody, not even MES, can open those saves again. Try it on Copy Text.
Real post-quantum key exchange: ML-KEM (Kyber)
The new NIST standard FIPS 203, running in your browser (the open-source noble-post-quantum library, loaded only when you press a button). Bob publishes a public key; Alice “encapsulates” a random secret to it; only Bob can “decapsulate” it. The same thing Chrome and Firefox do on every HTTPS visit to sites that support it.
Post-quantum signatures: ML-DSA (Dilithium) and SLH-DSA (SPHINCS+)
Is your own browser quantum-safe?
Asks Cloudflare which key exchange your browser just used to reach it (one small request to cloudflare.com).
Quantum computing and cryptography, explained
A quantum computer uses qubits, which can be in a mix (superposition) of 0 and 1 and can be entangled with each other. For most jobs that is no faster than a normal computer, but for a few problems it is enormously faster, and two of those problems hold up most of today's internet security. This page lets you try the ideas yourself: quantum key distribution, Shor's and Grover's algorithms, and the new post-quantum cryptography (also called quantum-safe, quantum-proof or quantum-resistant encryption) that replaces what quantum computers will break.
What a quantum computer breaks, and what it doesn't
- Shor's algorithm (1994) factors big numbers and solves discrete logarithms quickly. That breaks RSA, Diffie–Hellman and elliptic-curve cryptography (ECDSA, X25519, and the secp256k1 keys of Bitcoin and Hive): almost all public-key encryption and digital signatures in use today.
- Grover's algorithm (1996) searches √N times faster. It halves the strength of symmetric keys and hashes, so AES-256 stays safe (128 bits left) and AES-128 drops to a still-hard 64-bit level.
Quantum cryptography vs post-quantum cryptography
Quantum cryptography (quantum key distribution, QKD, like BB84) uses physics: single photons over a fibre or to a satellite, where any eavesdropper leaves errors. It needs special hardware and a direct link. Post-quantum cryptography is normal software built on maths problems that quantum computers are not known to solve, mostly lattices. It runs on any phone or server, which is why the internet is moving to it.
The new standards
In August 2024 NIST published the first post-quantum standards: FIPS 203 ML-KEM (from CRYSTALS-Kyber) for key exchange, FIPS 204 ML-DSA (from CRYSTALS-Dilithium) and FIPS 205 SLH-DSA (from SPHINCS+) for signatures. FN-DSA (Falcon) and the code-based HQC (chosen in March 2025 as a backup) follow. Browsers already combine ML-KEM-768 with X25519 (“X25519MLKEM768”) so a connection stays safe even if one of the two is ever broken. NIST plans to deprecate RSA and elliptic curves around 2030 and disallow them by 2035.
Questions people ask
- When will quantum computers break encryption (Q-Day)?
- Nobody knows. Estimates range from about 2030 to the 2040s. Published estimates for breaking RSA-2048 dropped from about 20 million noisy qubits (2019) to under one million (2025); today's machines have about a thousand. Data recorded now can be decrypted later, which is why the switch is happening already.
- Are MES "Save to Hive" backups quantum-safe?
- They can be. Copy Text, MES Watch, Favourites and the Workout Planner can encrypt a Hive backup two ways. Memo key wraps the AES key to your Hive memo key, which uses the same elliptic curve Shor's algorithm breaks, so a future quantum computer could open those saves (and Hive keeps them forever). Passphrase (quantum-safe) makes the AES-256 key from a passphrase with PBKDF2 (600,000 rounds) and stores no memo-key copy, so only the passphrase can open it. Every save keeps the lock it was made with: an old memo-key save stays a memo-key save, so re-save anything private with the passphrase lock. Try it on Copy Text, and see how long each lock is safe for.
- Is Bitcoin quantum-safe?
- Not yet. Its signatures use elliptic curves (secp256k1), which Shor's algorithm breaks. Coins whose public key is visible on the blockchain (reused or old addresses) would be at risk first. Hive keys use the same curve. Mining (SHA-256) is only slightly affected by Grover.
- Is AES quantum-proof?
- AES-256 is considered safe: Grover's search would still need about 2¹²⁸ steps. That is why the password tab of the Cryptography Lab uses AES-256.
- How do I know if a website is quantum-safe?
- Use the Quantum-Safe Website Checker: it tests whether the site's HTTPS accepts the post-quantum key exchange X25519MLKEM768.
- Does quantum key distribution make encryption unbreakable?
- In theory the key exchange is protected by physics, but real systems have been attacked through imperfect hardware, need a trusted link to authenticate who you are talking to, and cover limited distances. Security agencies such as the NSA and the UK NCSC recommend post-quantum cryptography instead for most uses.
Related: Quantum Computer Simulator (build circuits, Grover, Shor) · Cryptography Lab · Quantum-Safe Website Checker · MES Quantum Lab · Quantum Entanglement · Prime Numbers · Enigma Machine
