Security level explained

In cryptography, security level is a measure of the strength that a cryptographic primitive - such as a cipher or hash function - achieves. Security level is usually expressed as a number of "bits of security" (also security strength),[1] where n-bit security means that the attacker would have to perform 2n operations to break it,[2] but other methods have been proposed that more closely model the costs for an attacker.[3] This allows for convenient comparison between algorithms and is useful when combining multiple primitives in a hybrid cryptosystem, so there is no clear weakest link. For example, AES-128 (key size 128 bits) is designed to offer a 128-bit security level, which is considered roughly equivalent to a RSA using 3072-bit key.

In this context, security claim or target security level is the security level that a primitive was initially designed to achieve, although "security level" is also sometimes used in those contexts. When attacks are found that have lower cost than the security claim, the primitive is considered broken.[4] [5]

In symmetric cryptography

Symmetric algorithms usually have a strictly defined security claim. For symmetric ciphers, it is typically equal to the key size of the cipher — equivalent to the complexity of a brute-force attack.[6] Cryptographic hash functions with output size of n bits usually have a collision resistance security level n/2 and a preimage resistance level n. This is because the general birthday attack can always find collisions in 2n/2 steps.[7] For example, SHA-256 offers 128-bit collision resistance and 256-bit preimage resistance.

However, there are some exceptions to this. The Phelix and Helix are 256-bit ciphers offering a 128-bit security level.[8] The SHAKE variants of SHA-3 are also different: for a 256-bit output size, SHAKE-128 provides 128-bit security level for both collision and preimage resistance.[9]

In asymmetric cryptography

The design of most asymmetric algorithms (i.e. public-key cryptography) relies on neat mathematical problems that are efficient to compute in one direction, but inefficient to reverse by the attacker. However, attacks against current public-key systems are always faster than brute-force search of the key space. Their security level isn't set at design time, but represents a computational hardness assumption, which is adjusted to match the best currently known attack.

Various recommendations have been published that estimate the security level of asymmetric algorithms, which differ slightly due to different methodologies.

Typical levels

The following table are examples of typical security levels for types of algorithms as found in s5.6.1.1 of the US NIST SP-800-57 Recommendation for Key Management.[16]

Comparable Algorithm Strengths
Security BitsSymmetric KeyFinite Field/Discrete Logarithm
(DSA, DH, MQV)
Integer Factorization
(RSA)
Elliptic Curve
(ECDSA, EdDSA, ECDH, ECMQV)
802TDEAL = 1024, N = 160k = 1024160 ≤ f ≤ 223
1123TDEAL = 2048, N =224k = 2048224 ≤ f ≤ 255
128AES-128L = 3072, N = 256k = 3072256 ≤ f ≤ 383
192AES-192L = 7680, N = 384k = 7680384 ≤ f ≤ 511
256AES-256L = 15360, N = 511k = 15360f ≥ 512

Under NIST recommendation, a key of a given security level should only be transported under protection using an algorithm of equivalent or higher security level.[14]

The security level is given for the cost of breaking one target, not the amortized cost for group of targets. It takes 2128 operations to find a AES-128 key, yet the same number of amortized operations is required for any number m of keys. On the other hand, breaking m ECC keys using the rho method require sqrt(m) times the base cost.[15] [17]

Meaning of "broken"

A cryptographic primitive is considered broken when an attack is found to have less than its advertised level of security. However, not all such attacks are practical: most currently demonstrated attacks take fewer than 240 operations, which translates to a few hours on an average PC. The costliest demonstrated attack on hash functions is the 261.2 attack on SHA-1, which took 2 months on 900 GTX 970 GPUs, and cost US$75,000 (although the researchers estimate only $11,000 was needed to find a collision).[18]

Aumasson draws the line between practical and impractical attacks at 280 operations. He proposes a new terminology:[19]

Further reading

See also

Notes and References

  1. https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-57pt1r5.pdf NIST Special Publication 800-57 Part 1, Revision 5. Recommendation for Key Management: Part 1 – General
  2. News: Key Lengths: Contribution to The Handbook of Information Security. Lenstra. Arjen K.. Arjen Lenstra.
  3. Book: https://cr.yp.to/nonuniform/nonuniform-20130914.pdf. Advances in Cryptology - ASIACRYPT 2013. Bernstein. Daniel J.. Lange. Tanja. Tanja Lange. 4 June 2012. 978-3-642-42044-3. Lecture Notes in Computer Science. 321–340. en. Non-uniform cracks in the concrete: the power of free precomputation. 10.1007/978-3-642-42045-0_17. Daniel J. Bernstein.
  4. Cryptanalysis vs. Reality. Jean-Philippe. Aumasson. Black Hat Abu Dhabi. 2011.
  5. Understanding brute force. Bernstein. Daniel J.. Daniel J. Bernstein. 25 April 2005. ECRYPT STVL Workshop on Symmetric Key Encryption.
  6. Book: Lenstra, Arjen K.. Advances in Cryptology — ASIACRYPT 2001. 2248. 9 December 2001. Springer, Berlin, Heidelberg. 978-3-540-45682-7. 67–86. en. Unbelievable Security: Matching AES Security Using Public Key Systems. 10.1007/3-540-45682-1_5. https://www.iacr.org/archive/asiacrypt2001/22480067.pdf. Lecture Notes in Computer Science.
  7. Book: Handbook of Applied Cryptography. 336. Chapter 9 - Hash Functions and Data Integrity. http://cacr.uwaterloo.ca/hac/about/chap9.pdf. . . .
  8. Book: Fast Software Encryption. 2887. Ferguson. Niels. Whiting. Doug. Schneier. Bruce. Kelsey. John. Lucks. Stefan. Kohno. Tadayoshi. 24 February 2003. Springer, Berlin, Heidelberg. 978-3-540-20449-7. 330–346. en. Helix: Fast Encryption and Authentication in a Single Cryptographic Primitive. 10.1007/978-3-540-39887-5_24. https://www.schneier.com/academic/paperfiles/paper-phelix.pdf. Lecture Notes in Computer Science.
  9. SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions. August 2015. 23. 10.6028/nist.fips.202. Dworkin. Morris J..
  10. Barker. Elaine. NIST. Recommendation for Key Management, Part 1: General. January 2016. 53. 10.6028/nist.sp.800-57pt1r4. 10.1.1.106.307.
  11. Book: 2013. ENISA. Algorithms, key size and parameters report – 2014. 37. Publications Office. 10.2824/36822. 978-92-9204-102-1 .
  12. Determining Strengths For Public Keys Used For Exchanging Symmetric Keys. Hilarie. Orman. Paul. Hoffman. RFC 3766 (IETF). April 2004. 10.17487/RFC3766 .
  13. Web site: Keylength - Compare all Methods. Giry. Damien. keylength.com. 2017-01-02.
  14. Web site: Implementation Guidance for FIPS 140-2 and the Cryptographic Module Validation Program.
  15. Web site: The rho method . 21 February 2024.
  16. Barker. Elaine. NIST. Recommendation for Key Management, Part 1: General. May 2020. 158. 10.6028/nist.sp.800-57pt1r5. 10.1.1.106.307.
  17. Web site: After ECDH with Curve25519, is it pointless to use anything stronger than AES-128? . Cryptography Stack Exchange . en.
  18. Gaëtan Leurent . Thomas Peyrin . 2020-01-08 . SHA-1 is a Shambles: First Chosen-Prefix Collision on SHA-1 and Application to the PGP Web of Trust .
  19. Aumasson . Jean-Philippe . Too Much Crypto . 2020 . Real World Crypto Symposium.