Security Levels Explained
What is a Security Level?
A security strength of s bits means that the best known attack against a specified security goal is estimated to require work on the order of 2^s in the stated attack model.
The security goal matters. Recovering an encryption key, finding a hash preimage, finding a collision and forging a signature are different tasks. A key length or digest length alone does not describe the security of a complete application.
Unless stated otherwise, the estimates in this guide refer to classical attacks. They assume suitable parameters, sufficient key entropy and correct use. They do not account for implementation faults, side channels, exposed keys or protocol errors. [1]
Common Security Levels
128-bit Security
A work factor of 2^128 is approximately 3.4 x 10^38 operations in the chosen model. Work on this scale is far beyond any foreseeable classical computation.
Examples of approximately 128-bit classical strength include:
- AES-128 against key recovery.
- SHA-256 against collision search.
- BLAKE3 with its default 256-bit output against collision search.
- Ed25519 against signature forgery.
- X25519 against recovery of the shared secret from the public exchange.
The strength of an actual construction also depends on its parameters and how it is used. [1-5, 16]
192-bit Security
Examples include AES-192 against key recovery, P-384 for appropriate elliptic-curve operations, and SHA-384 against collision search. [1, 2]
256-bit Security
Examples include:
- AES-256 against key recovery.
- IETF ChaCha20 with its 256-bit key against generic key search.
- SHA-256 against preimage search.
- BLAKE3 with its default 256-bit output against preimage search, according to the implementation’s stated security intent.
- SHA-512 and SHA3-512 against collision search.
These describe different security goals. A hash with 256-bit preimage resistance can have 128-bit collision resistance. [1-3, 5]
Hash Function Security
For an ideal hash with an n-bit output, the generic classical attack costs are:
| Property | Attacker’s goal | Approximate work |
|---|---|---|
| Preimage resistance | Given a digest, find any message that produces it | 2^n |
| Second-preimage resistance | Given a message, find a different message with the same digest | 2^n |
| Collision resistance | Find any two different messages with the same digest | 2^(n/2) |
Real hash functions have their own stated bounds, which can differ from these. [2]
Preimage Resistance
Given a digest H, a preimage attack finds a message M for which hash(M) = H. It need not recover the original message.
The generic estimate assumes a suitable target and a sufficiently large search space. Passwords usually come from a much smaller, non-uniform space. An attacker can test likely passwords directly; a 256-bit password-hash output does not give a password 256 bits of guessing resistance.
Use a password-hashing scheme such as Argon2id with a unique random salt and memory and time parameters chosen for the deployment. [11, 14]
Second-Preimage Resistance
Given a particular message M, a second-preimage attack finds a different message M’ with the same digest.
The ideal-function estimate is about 2^n work. For actual SHA-256 and SHA-512, NIST gives message-length-dependent second-preimage bounds. For very long messages the bound is lower than 2^n. [2]
Collision Resistance
A collision attack finds any pair of different messages with the same digest. The birthday bound gives a generic classical cost of about 2^(n/2) work.
Collision resistance is important in many hash-then-sign, certificate and Merkle-tree constructions. A hash collision does not break every signature scheme; PureEdDSA, for example, is designed to resist hash collisions. [2, 4]
Examples
| Hash and output length | Classical preimage strength | Classical collision strength |
|---|---|---|
| SHA-256, 256 bits | Approximately 256 bits | Approximately 128 bits |
| SHA-384, 384 bits | Approximately 384 bits | Approximately 192 bits |
| SHA-512, 512 bits | Approximately 512 bits | Approximately 256 bits |
| SHA3-256, 256 bits | Approximately 256 bits | Approximately 128 bits |
| SHA3-512, 512 bits | Approximately 512 bits | Approximately 256 bits |
| BLAKE3, default 256 bits | Intended 256 bits | Intended 128 bits |
The BLAKE3 specification states a conservative 128-bit target across all security goals. Its implementation documentation describes an N-bit output as intended to provide N-bit first- and second-preimage resistance and N/2-bit collision resistance for N up to 256. The table shows that implementation intent, which is stronger than the specification’s claim. Truncation reduces the intended strengths, and requesting more than 256 output bits does not increase them. [2, 3, 19]
Post-Quantum Security
Quantum attacks must be assessed by the task being attacked and the resources available.
Key Search and Preimage Search
Grover’s algorithm provides a quadratic reduction in the number of oracle evaluations for generic unstructured search. In an idealised model:
| Task | Approximate classical work | Approximate quantum oracle evaluations |
|---|---|---|
| Search a 128-bit key space | 2^128 | 2^64 |
| Search a 256-bit key space | 2^256 | 2^128 |
| Find a preimage of an ideal 256-bit hash | 2^256 | 2^128 |
These exponents are theoretical search estimates. Practical attacks also require reversible circuits, error correction and substantial serial computation. Query counts are not interchangeable with elapsed time, gate counts or practical security ratings.
NIST continues to permit AES-128, AES-192 and AES-256. Its guidance explains why practical restrictions on Grover’s algorithm make a blanket description of AES-128 as weak misleading. AES-256 provides a larger key-search margin where that is required. [6, 8]
Collision Search
Collision search has a different quantum bound. The Brassard, Høyer and Tapp algorithm achieves an order of 2^(n/3) oracle evaluations under its collision-search model and resource assumptions.
For a 256-bit hash, this is approximately 2^85.3 queries. This is a theoretical query bound with substantial storage and access requirements. A practical assessment must specify its memory, circuit, parallelism and depth assumptions.
Do not apply a blanket halving rule to classical collision strength. [7, 8]
Traditional Public-Key Algorithms
A sufficiently large, fault-tolerant quantum computer running Shor’s algorithm would break the mathematical assumptions used by RSA, ECDSA, ECDH, Ed25519 and X25519.
For post-quantum key establishment, ML-KEM is a key-encapsulation mechanism. ML-DSA is a digital signature scheme. These serve different protocol roles. A KEM alone does not authenticate the other party.
Use an authenticated protocol that supports the chosen post-quantum or hybrid construction. For confidentiality that must survive a future quantum adversary, include the risk of an attacker recording encrypted traffic now and recovering traditional key-establishment secrets later. [9, 10, 13]
Post-Quantum Security Categories
NIST security categories compare attack resources against reference primitives; they are not direct conversions into a single number of quantum security bits. [8]
| Category | Reference attack |
|---|---|
| 1 | Key search against AES-128 |
| 2 | Collision search against SHA-256 or SHA3-256 |
| 3 | Key search against AES-192 |
| 4 | Collision search against SHA-384 or SHA3-384 |
| 5 | Key search against AES-256 |
ML-KEM-512, ML-KEM-768 and ML-KEM-1024 target categories 1, 3 and 5 respectively. ML-DSA-44, ML-DSA-65 and ML-DSA-87 target categories 2, 3 and 5 respectively, subject to the standards’ requirements. State the parameter set when describing their strength. [9, 10]
Key Size vs Security Level
Symmetric Ciphers
For AES, the conventional classical key-recovery strengths are approximately 128, 192 and 256 bits for the corresponding key sizes. IETF ChaCha20 uses a 256-bit key.
These estimates assume sufficiently unpredictable keys. A long key derived from a weak password is limited by the password and the derivation scheme.
Authentication must be assessed separately. ChaCha20-Poly1305 requires its complete 128-bit tag: RFC 8439 states “Tag truncation MUST NOT be done”. AES-GCM commonly uses 128-bit tags, and SP 800-38D also permits shorter ones. Forgery bounds also depend on message lengths, verification attempts and other usage limits. A 256-bit encryption key does not imply 256-bit authentication strength. [1, 5, 15]
Hash Functions
For an ideal fixed-output hash, the generic classical preimage and collision strengths are approximately n bits and n/2 bits respectively.
For real functions, use the function’s stated security bounds. SHA-256 has a 256-bit output and approximately 128-bit collision strength. BLAKE3’s default output is also 256 bits, with the limits described above. [2, 3]
Public-Key Cryptography
The following are conventional classical strength comparisons for well-chosen parameters. The sizes measure different things: an RSA modulus, an elliptic-curve group parameter and a symmetric key. [1]
| Approximate classical strength | RSA modulus size | ECC example or size | Symmetric reference |
|---|---|---|---|
| At most 80 bits, legacy | 1024 bits | About 160 bits | Historical two-key TDEA comparison |
| 112 bits | 2048 bits | P-224 | Historical three-key TDEA comparison |
| 128 bits | 3072 bits | P-256 | AES-128 |
| 192 bits | 7680 bits | P-384 | AES-192 |
| 256 bits | 15360 bits | P-521 | AES-256 |
The TDEA entries are historical comparisons. DES has 56 effective key bits. NIST withdrew TDEA approval for applying new cryptographic protection from 1 January 2024. [1, 12, 17]
Ed25519 has a 32-byte public-key encoding and a nominal classical strength of approximately 128 bits. Its key encoding length is not its security strength. [4]
Practical Recommendations
Choose algorithms according to the required security properties, protocol, data lifetime and current policy. A security strength alone does not establish a fixed number of safe years. [1, 13]
| Purpose | Guidance |
|---|---|
| Authenticated encryption | Use an established construction such as AES-GCM or ChaCha20-Poly1305. Follow its nonce, tag and data limits. |
| Hashing | Choose SHA-256, SHA-384, SHA-512, SHA-3 or BLAKE3 according to the required property and output-length limits. |
| Password storage | Use Argon2id with a unique random salt and parameters selected for the deployment. |
| Traditional signatures | Ed25519 or ECDSA with an appropriate curve can provide classical security; plan migration where quantum resistance is required. |
| Traditional key agreement | X25519 or ECDH with an appropriate curve can provide classical security; assess the required confidentiality lifetime. |
| Post-quantum key establishment | Use a supported ML-KEM parameter set or an appropriate hybrid KEM within an authenticated protocol. |
| Post-quantum signatures | Use a supported ML-DSA parameter set, or another suitable standardised post-quantum signature scheme. |
Follow the requirements of the protocol you deploy. [1-6, 9-11, 13, 15, 16]
Avoid These for New Designs
- DES and 3DES/TDEA for new encryption.
- MD5 or SHA-1 where collision resistance is required, including new signatures and certificates.
- RSA-1024 for new cryptographic protection.
- Direct use of a fast general-purpose hash for password storage.
- Nonce reuse where the authenticated-encryption construction requires uniqueness.
Collision attacks on MD5 and SHA-1 do not directly break HMAC-MD5 or HMAC-SHA1, but existing uses still need assessment and a migration plan. [1, 2, 5, 11, 12, 18]
Interpreting Security Estimates
Security estimates describe attack cost within a model. Comparisons must identify the security goal, the attacker’s access and the resource being counted.
Increasing an exponent by one doubles the estimated work in that model. It does not provide an expiry date or a universal elapsed-time estimate.
A complete assessment also includes key generation and handling, authentication tags, nonce management, data limits, implementation quality and the security of the surrounding protocol. [1, 8, 15]
See Also
- Security Concepts: practical security guidance.
- Algorithm Selection Guide: selecting algorithms for the required security properties.
- BLAKE3: 128-bit conservative security target; implementation documentation describes intended 256-bit preimage and 128-bit collision strength for the default output.
- Argon2: password hashing.
- Ed25519: approximately 128-bit classical signature strength.
References
- NIST SP 800-57 Part 1 Revision 5: Recommendation for Key Management, especially sections 5.6.1 to 5.6.3.
- NIST: Hash Functions, Security Strengths of Approved Hash Functions.
- BLAKE3 implementation documentation, blake3 crate 1.8.7: OutputReader security notes.
- RFC 8032: Edwards-Curve Digital Signature Algorithm, especially sections 1 and 8.5.
- RFC 8439: ChaCha20 and Poly1305 for IETF Protocols, especially sections 2.3 and 4.
- NIST: Post-Quantum Cryptography FAQs, question on doubling AES key lengths.
- Brassard, Høyer and Tapp: Quantum Algorithm for the Collision Problem.
- NIST: Post-Quantum Cryptography Security Evaluation Criteria.
- FIPS 203: Module-Lattice-Based Key-Encapsulation Mechanism Standard.
- FIPS 204: Module-Lattice-Based Digital Signature Standard.
- RFC 9106: Argon2 Memory-Hard Function for Password Hashing and Proof-of-Work Applications.
- NIST: Withdrawal of SP 800-67 Revision 2.
- RFC 9958: Post-Quantum Cryptography for Engineers, especially sections 3, 9 and 13.
- NIST SP 800-63B-4: Threats and Security Considerations.
- NIST SP 800-38D: Galois/Counter Mode and GMAC.
- RFC 7748: Elliptic Curves for Security.
- FIPS 46-3: Data Encryption Standard, withdrawn; cited for historical DES key size.
- RFC 6151: Updated Security Considerations for MD5 and HMAC-MD5.
- BLAKE3 specification, section 4.1: Security Goals.