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.

Who is attacking?
Time to find the key

21 days

on average, trying half of 7.2 × 10¹⁶ possible keys

  1. instantly
  2. under a day
  3. under a year
  4. a lifetime
  5. longer than history
  6. longer than the universe
  7. far, far longer

Cracked in 22 hours in 1999 by a special machine plus volunteers.

The short answer

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.

Where the eight strategies aim: 6 at the person, 5 and 6 at the device, 4 and 5 at the software, 1 and 3 at the key or password, 2 and 8 at the algorithm, 7 at stored data.Person6Device56Software45Key or password13Algorithm28Stored data7
Every strategy aims at a different link in the chain. The numbers lead to the sections below.
#StrategyAims atWorks in practice?What stops it
1Try every keyThe keyOnly against short keys and weak passwordsKeys of 128 bits or more
2Attack the mathThe algorithmAlways against old ciphers, almost never against AESStandard, well-studied algorithms
3Guess the passwordThe password behind the keyVery oftenLong random passwords, slow hashes
4Exploit mistakesHow the cipher is usedOftenAuthenticated encryption, good libraries
5Make it leakHardware and codeSometimes, and very costly when it doesUpdates, constant-time code
6Go around itPeople and devicesThe most common wayUpdates, passkeys, encrypted backups
7Store now, decrypt laterRecorded dataHappening now, pays off laterPost-quantum key exchange
8Use a quantum computerRSA and elliptic curvesNot yet (December 2026)Post-quantum cryptography
Strategy 1

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.
Where it works

Short keys (DES, 40-bit export keys), PINs without a lockout, and passwords that are short and random-looking but not long.

What stops it

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

Strategy 2

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.
Where it works

Classic ciphers always, and old or homemade algorithms: RC4, DES, MD5 and SHA-1 for signatures, or "our own secret algorithm".

What stops it

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

Strategy 3

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

Where it works

Short or human-made passwords, passwords used on several sites, fast unsalted hashes like MD5, and keys from a poor random generator.

What stops it

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

Strategy 4

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:

ECB mode

Equal blocks of plain text give equal blocks of ciphertext, so patterns stay visible. See the picture

A nonce used twice

With stream ciphers, CTR and GCM, two messages under the same key and nonce can be XORed together and the key stream cancels out.

No integrity check

Without a MAC, an attacker can flip bits in CBC or CTR ciphertext and change the decrypted text in a predictable way.

Talkative errors

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.
Where it works

Hand-written crypto code, old protocol versions, ECB, fixed IVs, and encryption without authentication.

What stops it

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

Strategy 5

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.
Where it works

Smart cards and devices in the attacker's hands, shared servers, and software that is not kept up to date.

What stops it

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.

Strategy 6

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.

Malware and spyware

Software on the phone or laptop reads messages after decryption. End-to-end encryption does not help once the end itself is compromised.

Phishing

A fake login page asks for the password and the one-time code. Passkeys stop this, because they only work on the real site.

People and law

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.

Backdoors

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.

Where it works

Devices without updates, accounts with password only, backups in the cloud without end-to-end encryption, and anyone with access who can be pressured.

What stops it

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

Strategy 7

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.

years
Examples:
years
Until every system that encrypts this data uses post-quantum key exchange. Large organizations plan with 5 to 10 years.
years
Nobody knows. Pick your own guess and watch how the answer changes.

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).
Strategy 8

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.

AlgorithmUsed forQuantum attackResultStatus
RSA (any size)Key exchange, signatures, certificatesShorBroken: the private key follows from the public keyBreaks
Elliptic curves (ECDH, ECDSA, X25519, Ed25519)TLS, SSH, Signal, Bitcoin, passkeysShorBroken, and with fewer qubits than RSABreaks
Diffie-Hellman (classic)Older VPNs and TLSShorBrokenBreaks
AES-128Data encryptionGroverIn theory 64-bit strength; in practice still counted as safe by NISTFine for now
AES-256, ChaCha20Data encryptionGroverStill 128-bit strength: safeSafe
SHA-256, SHA-3, bcrypt, Argon2Hashes and passwordsGroverSafe; weak passwords stay weak either waySafe
ML-KEM, ML-DSA, SLH-DSAThe new post-quantum standardsnone knownDesigned to resist bothSafe

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:

YearEstimate byTargetPhysical qubitsTime
2012Fowler et al.surface codeRSA-2048about 1 billion–
2019Gidney & Ekerå (Google)surface codeRSA-204820 million8 hours
2025Gidney (Google)same hardware assumptions as 2019RSA-2048under 1 millionunder 1 week
Feb 2026Pinnacle architectureqLDPC codesRSA-2048about 100,000about 1 month
Mar 2026Babbush, Gidney, Boneh et al. (Google)about 1,200 to 1,450 logical qubitsECC-256under 500,000minutes
Sep 2026IonQtrapped ions, 1,457 logical qubitsECC-256about 19,40026 days per try
Oct 2026Alice & Bobcat qubitsRSA-204822,5933.1 days
Oct 2026Alice & Bobcat qubitsECC-25629,588about 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:

WhoWhatBy
EU (roadmap of the member states, June 2025)First steps, inventory and pilotsend of 2026
EUHigh-risk systems such as critical infrastructure on post-quantum cryptographyend of 2030
EUMedium- and low-risk systems, as far as feasibleend of 2035
USA (NIST IR 8547, draft)RSA and elliptic curves with 112-bit security deprecatedafter 2030
USA (NIST IR 8547, draft)All quantum-vulnerable public-key algorithms disallowedafter 2035
UK (NCSC)Discovery and plan, early high-priority moves, migration complete2028, 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 to do

What actually protects you

For everyone

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.

For developers

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.

Learn by breaking

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.

FAQ

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

Sources

Last updated 3 December 2026. The quantum section reflects the state of research at that date and is reviewed regularly.

Searches the list of pages on this site. What you type stays in your browser.