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.
A combination lock. Adding one more digit makes it ten times harder to guess. Adding one more bit to a key doubles the work.
Try it: how long to try every key?
Pick a key length and a guessing speed. Each extra bit doubles the number of keys.
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.
In plain words
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.
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'.
More diagrams: Key length against brute force · The life of a cryptographic key
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
- Encryption and HUGE numbersNumberphile, video
- Communication Theory of Secrecy SystemsClaude Shannon (1949), paper
- How secure is 256 bit security?3Blue1Brown, video
Related terms
Cite this page Encryption Observer, “Keys and key length”, encryption.observer/terms/keys/, checked December 2026.