Encryption Observer

Glossary The basics

Keys and key length

A key is a very long random number. The longer it is, the more possible keys there are, and the harder it is to guess. Security is often described in 'bits'. 128-bit security means an attacker would need to try around 2 to the power of 128 possibilities.

Think of it like this

A combination lock. Adding one more digit makes it ten times harder to guess. Adding one more bit to a key doubles the work.

Key length against brute forceBroken by trying every keyBeyond any known computerEvery extra bit doubles the work, which is why 56-bit keys fell and 128-bit keys are out of reach.
  1. 40-bit About a trillion possible keys. The 'export-grade' size US rules forced on software sold abroad in the 1990s. Record: Cracked in about 8 days in 1995 on about 120 French research workstations Left traces in software that caused attacks in 2015.
  2. 56-bit DES About 72 quadrillion possible keys. The US standard cipher from 1977. Record: 56 hours in 1998, on a $250,000 machine Retired in favour of AES.
  3. 64-bit About 18 billion billion keys, 256 times as many as DES. Record: About five years of volunteer computing, finished in 2002 Too short for anything that matters today.
  4. 128-bit AES About 3.4 × 10^38 keys: 18 billion billion times as many as 64-bit. Record: No known way, even with all the world's computers Grover's algorithm would still leave it far out of practical reach.
  5. 256-bit AES Recommended where data must stay secret for decades. Record: Beyond reach, even with a quantum computer The default in many government systems.

Why it matters

Key length is how experts compare different algorithms. A 3,072-bit RSA key and a 128-bit AES key are considered roughly equal in strength, because the attacks against them are different.

Where you meet it

Settings menus and product sheets that say 'AES-256' or 'RSA-2048'.

The life of a cryptographic keyPredictable random numbers, keys left in config files, missed rotations and forgotten backups have each caused real breaches.
  1. 1Generate Created from a strong random source, ideally inside secure hardware. Common failure: Predictable random numbers The Debian bug left only about 32,768 possible keys.
  2. 2Store Kept where it cannot be copied out, separate from the data it protects. Common failure: Keys left in code or config files HSMs and cloud key services exist for this.
  3. 3Rotate Replaced on a schedule, and at once if it may have leaked. Common failure: Nobody knows where the key is used Shorter certificate lifetimes push towards automation, though a renewed certificate can keep the old key.
  4. 4Destroy Retired keys are securely deleted, along with every backup copy. Common failure: Old copies in backups Destroying a key can erase data instantly.
Go deeper history and technical detail

2 to the power of 128 is about 340 undecillion (a 3 followed by 38 digits). Trying that many keys is beyond any conceivable ordinary computer. Public-key algorithms need much longer keys than symmetric ones for the same strength because cleverer attacks exist against them. NIST's guidance (SP 800-57) lists these equivalences.

Read or watch next

Related terms

Cite this page Encryption Observer, “Keys and key length”, encryption.observer/terms/keys/, checked December 2026.