How encryption gets broken
Modern ciphers are almost never cracked head-on. Attackers guess the password, exploit a mistake, read the data before it is encrypted, or simply record it and wait. Here are all eight strategies, from brute force to quantum computers, and what actually stops each one.
21 days
on average, trying half of 7.2 × 10¹⁶ possible keys
- instantly
- under a day
- under a year
- a lifetime
- longer than history
- longer than the universe
- far, far longer
Cracked in 22 hours in 1999 by a special machine plus volunteers.
Eight strategies, and where they aim
Encryption gets broken in eight ways: trying every key, attacking the math, guessing the password, exploiting mistakes in how it is used, making the hardware or code leak, going around it, storing the data until it can be decrypted, and, in the future, quantum computers. Against AES-256 with a random key, only strategies 4 to 7 work, and none of them attacks the cipher itself.
| # | Strategy | Aims at | Works in practice? | What stops it |
|---|---|---|---|---|
| 1 | Try every key | The key | Only against short keys and weak passwords | Keys of 128 bits or more |
| 2 | Attack the math | The algorithm | Always against old ciphers, almost never against AES | Standard, well-studied algorithms |
| 3 | Guess the password | The password behind the key | Very often | Long random passwords, slow hashes |
| 4 | Exploit mistakes | How the cipher is used | Often | Authenticated encryption, good libraries |
| 5 | Make it leak | Hardware and code | Sometimes, and very costly when it does | Updates, constant-time code |
| 6 | Go around it | People and devices | The most common way | Updates, passkeys, encrypted backups |
| 7 | Store now, decrypt later | Recorded data | Happening now, pays off later | Post-quantum key exchange |
| 8 | Use a quantum computer | RSA and elliptic curves | Not yet (December 2026) | Post-quantum cryptography |
Try every key (brute force)
The simplest attack: try one key after another until the text makes sense. It always works in the end. The only question is how long it takes, and that depends on one number: the key length. Every extra bit doubles the work. A Caesar cipher has 25 keys, a 4-digit PIN 10,000, DES 256 (72 quadrillion), AES-128 2128, a number with 39 digits.
The calculator above shows what this means. DES fell to brute force in 1998. AES-128 would keep every Bitcoin miner on Earth busy for about 5 billion years. That is why nobody attacks a modern 128-bit or 256-bit key by trying: it is the one strategy that is truly off the table.
- 1997Software exported from the US was limited to 40-bit keys. A Berkeley student cracks a 40-bit challenge in 3.5 hours on the university's computers.
- 1998The EFF builds "Deep Crack" for about $250,000 and finds a DES key in 56 hours. In January 1999, together with volunteers of distributed.net, it takes 22 hours.
- todayPhones block brute force against the short PIN with delays and lockouts, because 10,000 tries take seconds otherwise.
Short keys (DES, 40-bit export keys), PINs without a lockout, and passwords that are short and random-looking but not long.
Keys of 128 bits or more, which every modern cipher uses. For PINs and passwords: rate limits, lockouts and slow password hashes.
Try it hereBrute-force a Caesar cipherEncrypt with AES-256-GCMKey length explained
Attack the math (cryptanalysis)
Instead of trying all keys, find a shortcut: a pattern in the ciphertext that gives the key or the text away. This is how every cipher before computers fell. Language leaves fingerprints: in English, E is the most common letter, so a simple substitution falls to counting letters. For a modern cipher, a "break" means any attack faster than brute force, even if it is still useless in practice.
Cryptanalysts classify attacks by what they have: only ciphertext (ciphertext-only), some pairs of plain text and ciphertext (known-plaintext), or the chance to encrypt texts of their choice (chosen-plaintext). A good modern cipher holds up even in the strongest of these settings.
- 9th centuryAl-Kindi describes frequency analysis. Every simple substitution cipher is broken from then on.
- 1863Friedrich Kasiski publishes how to break the Vigenère cipher, which was called "indecipherable" for 300 years.
- 1932 to 1945Polish mathematicians, then Alan Turing and the team at Bletchley Park, break the Enigma. Their trick: guessed words in the messages, such as weather reports (known plaintext).
- 2004 to 2017MD5 and SHA-1 lose their collision resistance. The Flame malware used an MD5 collision in 2012 to fake a Microsoft signature.
- 2011The best attack on full AES-128 needs about 2126 steps instead of 2128: a "break" on paper, harmless in practice.
Classic ciphers always, and old or homemade algorithms: RC4, DES, MD5 and SHA-1 for signatures, or "our own secret algorithm".
Standard, well-studied algorithms: AES, ChaCha20, SHA-256 and SHA-3. Thousands of researchers have tried to break them for decades. Never invent your own.
Try it hereFrequency analysis in classCrack classical ciphers (CTF)All cipher families and their status
Guess the password
Most encryption that people use is unlocked by a password: a ZIP file, a laptop, a password manager, a Wi-Fi network. The key may have 256 bits, but if it comes from Summer2026!, the attacker only has to guess that. And attackers do not try all combinations: they start with passwords that leaked from other sites, then add common patterns like a capital letter at the start and a year and an exclamation mark at the end.
Two defenses make guessing expensive. A salt makes every stored hash unique, so precomputed tables (rainbow tables) are useless. A slow hash like bcrypt, scrypt or Argon2 makes each guess cost thousands of times more: pick "slow password hash" in the calculator above and compare. The other weak spot is the key itself: if the random generator is bad, there are far fewer keys than it seems.
- 2008A bug in Debian's OpenSSL leaves only about 32,000 possible keys per key type. Every SSH and TLS key made on Debian since 2006 can be guessed in minutes.
- 2009The RockYou site leaks 32 million passwords in plain text. The list is still the starting point of password crackers today.
- 2017The ROCA flaw: chips by Infineon generate RSA keys with a hidden structure. About 750,000 Estonian ID cards have to be updated.
A note on the tools on this site: for compatibility with the old site, the cipher tools use your secret directly as the key, padded with zero bytes. A short secret therefore makes a weak key, whatever the cipher. Real software derives the key from a password with Argon2 or PBKDF2. More about this
Short or human-made passwords, passwords used on several sites, fast unsalted hashes like MD5, and keys from a poor random generator.
Long random passwords or passphrases from a password manager, a salt and a slow hash for stored passwords, two-factor or passkeys, and keys from the operating system's random generator.
Try it hereIs it a common password? (MD5)bcrypt generatorArgon2 generatorCourse: Hashing & passwords
Exploit mistakes in how it is used
A strong cipher can be used in a weak way. The algorithm stays unbroken, but the result leaks anyway. These mistakes are common because the dangerous options often look harmless in code:
Equal blocks of plain text give equal blocks of ciphertext, so patterns stay visible. See the picture
With stream ciphers, CTR and GCM, two messages under the same key and nonce can be XORed together and the key stream cancels out.
Without a MAC, an attacker can flip bits in CBC or CTR ciphertext and change the decrypted text in a predictable way.
If a server tells "wrong padding" apart from other errors, an attacker can decrypt a CBC message byte by byte: a padding oracle.
- 1940sSoviet spies reuse pages of their one-time pads. US codebreakers (project Venona) read parts of thousands of messages over the following decades.
- 2001WEP, the first Wi-Fi encryption, falls: it combines RC4 with a 24-bit IV that soon repeats. By 2007 a key can be recovered in about a minute.
- 2014POODLE uses a padding oracle in SSL 3.0 to read cookies from encrypted connections.
- 2015FREAK and Logjam trick servers into using 512-bit "export" crypto from the 1990s.
Hand-written crypto code, old protocol versions, ECB, fixed IVs, and encryption without authentication.
Authenticated encryption (AES-GCM or ChaCha20-Poly1305) with a fresh nonce per message, TLS 1.3, and high-level libraries like libsodium instead of single building blocks.
Try it hereAES-256-ECB: see the patternXOR and key reuse (CTF)Cipher modes explained
Make the hardware or code leak
Encryption runs on real machines, and machines give things away: how long an operation takes, how much power the chip draws, what stays in memory. These side channels can reveal a key bit by bit without ever touching the math. Plain bugs do the same in a cruder way: they let an attacker read memory where the key happens to be.
- 1996Paul Kocher shows that the time an RSA operation takes reveals the private key (timing attack). In 1999 he does the same with the power use of smart cards.
- 2008Cold boot attack: memory chips keep their content for seconds after power-off, longer when cooled. Researchers read disk encryption keys from laptops this way.
- 2014Heartbleed: a bug in OpenSSL lets anyone read up to 64 KB of a server's memory per request, including private keys.
- 2018Spectre and Meltdown: processors leak data between programs through their speed-up tricks.
Smart cards and devices in the attacker's hands, shared servers, and software that is not kept up to date.
Constant-time code in well-maintained libraries, AES instructions in the processor, quick updates, keys in secure hardware (TPM, secure enclave, HSM), and shutting down instead of sleep for encrypted laptops.
Go around it
The easiest way to read encrypted data is to read it where it is not encrypted: on the screen, on the keyboard, in the app before it encrypts, or in a backup that was never encrypted end to end. That is why this is the most common way in, from police and intelligence services to criminals.
Software on the phone or laptop reads messages after decryption. End-to-end encryption does not help once the end itself is compromised.
A fake login page asks for the password and the one-time code. Passkeys stop this, because they only work on the real site.
Threats, bribes, insiders. In some countries a court can order you to hand over a key; in the UK refusing is an offence of its own.
A weakness built in on purpose. The random generator Dual_EC_DRBG was a NIST standard from 2006 and was withdrawn in 2014 after reports of an NSA backdoor.
And some things encryption never hides: who talks to whom, when, and how much. This metadata often tells more than the content.
Devices without updates, accounts with password only, backups in the cloud without end-to-end encryption, and anyone with access who can be pressured.
Updates, passkeys or two-factor, end-to-end encrypted backups, device encryption with a strong passcode, and the habit of checking where a login page really is.
Try it hereCourse: Account securityPassword managers compared
Store now, decrypt later
Some attackers do not need the content today. They record encrypted traffic and store it until they can decrypt it: when a key leaks, when an old cipher becomes weak, or when a quantum computer exists. Also called "harvest now, decrypt later". Storage is cheap, so states are assumed to be doing it already.
The part at risk is the key exchange. A connection (HTTPS, VPN, messenger) agrees on a fresh AES key with RSA or elliptic curves. Anyone who has recorded that handshake can recover the AES key once those can be broken, and with it the whole conversation. Forward secrecy helps against a stolen server key, but not against a quantum computer. Files encrypted with AES-256 and a password, where no RSA or elliptic curve is involved, are not at risk from this.
Mosca's rule: if x + y > z, data encrypted today will still be secret when it can be broken.
Whether you need to hurry depends on three numbers. Michele Mosca put them into one rule in 2015: add how long the data has to stay secret (x) and how long the switch will take (y). If that is more than the years until a quantum computer can break the key exchange (z), data you encrypt today is already at risk.
Already protected today
- Browsers: Chrome has used a hybrid post-quantum key exchange by default since 2024 (ML-KEM since version 131), and other major browsers and CDNs such as Cloudflare followed. A recorded connection between them stays secret.
- Messengers: Signal (PQXDH, 2023) and Apple iMessage (PQ3, 2024).
- SSH: OpenSSH uses a post-quantum key exchange by default since version 9.0 (2022), with ML-KEM since 10.0 (2025).
Use a quantum computer
A quantum computer is not a faster computer for everything. It is very good at a few kinds of math, and two of them matter here. Shor's algorithm (1994) factors large numbers and solves discrete logarithms quickly, which breaks RSA, Diffie-Hellman and elliptic curves completely. Grover's algorithm (1996) speeds up searching, which in theory halves the strength of a symmetric key: AES-256 drops to the level of 128 bits, still far out of reach.
| Algorithm | Used for | Quantum attack | Result | Status |
|---|---|---|---|---|
| RSA (any size) | Key exchange, signatures, certificates | Shor | Broken: the private key follows from the public key | Breaks |
| Elliptic curves (ECDH, ECDSA, X25519, Ed25519) | TLS, SSH, Signal, Bitcoin, passkeys | Shor | Broken, and with fewer qubits than RSA | Breaks |
| Diffie-Hellman (classic) | Older VPNs and TLS | Shor | Broken | Breaks |
| AES-128 | Data encryption | Grover | In theory 64-bit strength; in practice still counted as safe by NIST | Fine for now |
| AES-256, ChaCha20 | Data encryption | Grover | Still 128-bit strength: safe | Safe |
| SHA-256, SHA-3, bcrypt, Argon2 | Hashes and passwords | Grover | Safe; weak passwords stay weak either way | Safe |
| ML-KEM, ML-DSA, SLH-DSA | The new post-quantum standards | none known | Designed to resist both | Safe |
How close are we? (status: December 2026)
Nobody has built a quantum computer that can break RSA or elliptic curves, and Shor's algorithm has only ever run on tiny numbers like 15 and 21, with shortcuts. But the estimate of what such a machine needs keeps falling, mostly through better algorithms and error correction, not bigger hardware:
| Year | Estimate by | Target | Physical qubits | Time |
|---|---|---|---|---|
| 2012 | Fowler et al.surface code | RSA-2048 | about 1 billion | – |
| 2019 | Gidney & Ekerå (Google)surface code | RSA-2048 | 20 million | 8 hours |
| 2025 | Gidney (Google)same hardware assumptions as 2019 | RSA-2048 | under 1 million | under 1 week |
| Feb 2026 | Pinnacle architectureqLDPC codes | RSA-2048 | about 100,000 | about 1 month |
| Mar 2026 | Babbush, Gidney, Boneh et al. (Google)about 1,200 to 1,450 logical qubits | ECC-256 | under 500,000 | minutes |
| Sep 2026 | IonQtrapped ions, 1,457 logical qubits | ECC-256 | about 19,400 | 26 days per try |
| Oct 2026 | Alice & Bobcat qubits | RSA-2048 | 22,593 | 3.1 days |
| Oct 2026 | Alice & Bobcat qubits | ECC-256 | 29,588 | about 1 hour |
The estimates use different hardware (superconducting qubits, cat qubits, trapped ions), error rates and speeds, so they are not directly comparable. "ECC-256" means a 256-bit elliptic curve such as P-256 or secp256k1 (Bitcoin).
On the other side are today's machines. The largest error-corrected computations reported so far use tens of logical qubits; in July 2026, IBM and the University of Chicago ran one on 70. Breaking RSA-2048 or ECC-256 needs more than a thousand logical qubits that run without failing for hours to days. The gap is still large, but it shrinks from both sides. That is why governments have set deadlines instead of waiting for the day it happens:
| Who | What | By |
|---|---|---|
| EU (roadmap of the member states, June 2025) | First steps, inventory and pilots | end of 2026 |
| EU | High-risk systems such as critical infrastructure on post-quantum cryptography | end of 2030 |
| EU | Medium- and low-risk systems, as far as feasible | end of 2035 |
| USA (NIST IR 8547, draft) | RSA and elliptic curves with 112-bit security deprecated | after 2030 |
| USA (NIST IR 8547, draft) | All quantum-vulnerable public-key algorithms disallowed | after 2035 |
| UK (NCSC) | Discovery and plan, early high-priority moves, migration complete | 2028, 2031, 2035 |
The answer: post-quantum cryptography
Post-quantum cryptography (PQC) means new algorithms that run on normal computers but rest on math problems that quantum computers cannot solve either, such as lattices and hash functions. NIST published the first three standards in August 2024: ML-KEM (FIPS 203) for key exchange, ML-DSA (FIPS 204) and SLH-DSA (FIPS 205) for signatures. In practice they are combined with a classical algorithm (hybrid, for example X25519 + ML-KEM), so a connection stays safe even if one of the two turns out to be weak.
Symmetric encryption and hashes need no new algorithms. The change is in key exchange and signatures, which is why it touches almost every system: certificates, VPNs, code signing, smart cards, passports.
Try it hereRSA in the glossaryKey exchangePGP keys and algorithms
What actually protects you
Use a password manager and long random passwords, turn on passkeys or two-factor, install updates quickly, encrypt your devices with a strong passcode, and turn on end-to-end encryption for backups where your phone offers it.
Use AES-256-GCM or ChaCha20-Poly1305 with a fresh nonce from a high-level library, hash passwords with Argon2id or bcrypt, keep a list of where you use RSA and elliptic curves, and turn on hybrid post-quantum key exchange where your TLS library and partners support it.
Practice where it is allowed
The best way to understand these attacks is to try them on puzzles made for it. Only attack data that is yours or that you have permission to test.
Frequently asked questions
Can AES-256 be cracked?
Not by trying keys, not with today's computers and not with a quantum computer. Data encrypted with AES-256 gets broken through something else: a guessable password, a mistake in the software, malware on the device, or a key that leaks.
Can quantum computers break encryption today?
No. As of December 2026, no quantum computer can break RSA, elliptic curves or AES. The largest error-corrected machines handle tens of logical qubits; breaking RSA-2048 needs about a thousand or more, running reliably for hours to days. The estimates keep falling, though, which is why the switch to post-quantum cryptography has already started.
What does "store now, decrypt later" mean?
Attackers record encrypted traffic today and keep it until they can decrypt it, for example with a future quantum computer. It matters for data that must stay secret for many years. The fix is post-quantum key exchange, which browsers, Signal, iMessage and OpenSSH already use.
Is AES quantum safe?
Yes. Grover's algorithm would cut AES-256 down to 128-bit strength, which is still far out of reach. NIST also counts AES-128 as safe, but if you choose now, take AES-256. What quantum computers break is RSA and elliptic curves, the part that exchanges keys and signs.
How long does it take to brute-force a 128-bit key?
Even with every Bitcoin miner on Earth (about 10²¹ guesses per second in late 2026) it would take about 5 billion years on average. Each extra bit doubles that, so a 256-bit key is out of reach for good.
What is the most common way encryption gets broken?
By going around it: stolen or guessed passwords, phishing, malware that reads data before it is encrypted, and mistakes in how software uses the cipher. Breaking the algorithm itself is the rarest case.
Is it legal to crack encryption?
On your own data, with permission, or in CTF challenges and courses: yes. Breaking into other people's data or systems is a crime in most countries. This page explains how attacks work so you can defend against them, it is not legal advice.
Sources
- NIST FIPS 203, 204, 205: the first post-quantum standards (ML-KEM, ML-DSA, SLH-DSA), August 2024
- NIST IR 8547 (draft): Transition to Post-Quantum Cryptography Standards
- EU: Coordinated Implementation Roadmap for the Transition to Post-Quantum Cryptography (June 2025)
- UK NCSC: Timelines for migration to post-quantum cryptography
- Gidney: How to factor 2048 bit RSA integers with less than a million noisy qubits (2025)
- Babbush et al.: Securing Elliptic Curve Cryptocurrencies against Quantum Vulnerabilities (2026)
- IBM and the University of Chicago: computation on 70 logical qubits (July 2026)
- Mosca: Cybersecurity in an era with quantum computers: will we be ready? (2015)
- Bogdanov, Khovratovich, Rechberger: Biclique Cryptanalysis of the Full AES (2011)
- EFF DES cracker "Deep Crack" (1998)
- The Heartbleed bug (2014)
- Hashrate Index: Bitcoin network hashrate, November 2026
Last updated 3 December 2026. The quantum section reflects the state of research at that date and is reviewed regularly.