All Topics  
Key size

 

   Email Print
   Bookmark   Link






 

Key size



 
 
In cryptography
Cryptography

Cryptography is the practice and study of hiding information. In modern times cryptography is considered a branch of both mathematics and computer science and is affiliated closely with information theory, computer security and engineering....
, key size or key length is the size (usually measured in bits or bytes) of the key
Key (cryptography)

In cryptography, a key is a piece of information that determines the functional output of a cryptographic algorithm or cipher. Without a key, the algorithm would have no result....
 used in a cryptographic algorithm (such as a cipher
Cipher

In cryptography, a cipher is an algorithm for performing encryption and decryption — a series of well-defined steps that can be followed as a procedure....
). An algorithm's key length is distinct from its cryptographic security, which is a logarithmic measure of the fastest known computational attack on the algorithm, also measured in bits. The security of an algorithm cannot exceed its key length (since any algorithm can be cracked by brute force
Brute force attack

In cryptanalysis, a brute force attack is a method of defeating a cryptographic scheme by systematically trying a large number of possibilities; for example, a large number of the possible key s in a key space in order to decrypt a message....
), but it can be smaller.






Discussion
Ask a question about 'Key size'
Start a new discussion about 'Key size'
Answer questions from other users
Full Discussion Forum



Encyclopedia


In cryptography
Cryptography

Cryptography is the practice and study of hiding information. In modern times cryptography is considered a branch of both mathematics and computer science and is affiliated closely with information theory, computer security and engineering....
, key size or key length is the size (usually measured in bits or bytes) of the key
Key (cryptography)

In cryptography, a key is a piece of information that determines the functional output of a cryptographic algorithm or cipher. Without a key, the algorithm would have no result....
 used in a cryptographic algorithm (such as a cipher
Cipher

In cryptography, a cipher is an algorithm for performing encryption and decryption — a series of well-defined steps that can be followed as a procedure....
). An algorithm's key length is distinct from its cryptographic security, which is a logarithmic measure of the fastest known computational attack on the algorithm, also measured in bits. The security of an algorithm cannot exceed its key length (since any algorithm can be cracked by brute force
Brute force attack

In cryptanalysis, a brute force attack is a method of defeating a cryptographic scheme by systematically trying a large number of possibilities; for example, a large number of the possible key s in a key space in order to decrypt a message....
), but it can be smaller. For example, Triple DES
Triple DES

In cryptography, Triple DES is a block cipher formed from the Data Encryption Standard cipher by using it three times....
 has a key size of 168 bits but provides at most 112 bits of security, since an attack of complexity 2112 is known. This property of Triple DES is not a weakness provided 112 bits of security is sufficient for an application. Most symmetric-key algorithm
Symmetric-key algorithm

Symmetric-key algorithms are a class of algorithms for cryptography that use trivially related, often identical, cryptographic keys for both decryption and encryption....
s in common use are designed to have security equal to their key length. No asymmetric-key algorithms with this property are known; elliptic curve cryptography
Elliptic curve cryptography

Elliptic curve cryptography is an approach to public-key cryptography based on the algebraic structure of elliptic curves over finite fields. The use of elliptic curves in cryptography was suggested independently by Neal Koblitz and Victor S....
 comes the closest with an effective security of roughly half its key length.

Significance

Keys
Key (cryptography)

In cryptography, a key is a piece of information that determines the functional output of a cryptographic algorithm or cipher. Without a key, the algorithm would have no result....
 are used to control the operation of a cipher so that only the correct key can convert encrypted text (ciphertext) to plaintext
Plaintext

In cryptography, plaintext is the information which the sender wishes to transmit to the receiver. Before the computer era, plaintext simply meant text in the language of the communicating parties....
. Many ciphers are based on publicly known algorithm
Algorithm

In mathematics, computing, linguistics and related subjects, an algorithm is a sequence of finite instructions, often used for calculation and data processing....
s or are open source
Open source

Open source is an approach to design, development, and distribution offering practical accessibility to a product's source . Some consider open source as one of various possible design approaches, while others consider it a critical Strategy element of their business operations....
, and so it is only the difficulty of obtaining the key that determines security of the system, provided that there is no analytic attack (i.e., a 'structural weakness' in the algorithms or protocols used), and assuming that the key is not otherwise available (such as via theft, extortion, or compromise of computer systems). The widely accepted notion that the security of the system should depend on the key alone has been explicitly formulated by Auguste Kerckhoffs (in the 1880s) and Claude Shannon (in the 1940s); the statements are known as Kerckhoffs' principle
Kerckhoffs' principle

In cryptography, Kerckhoffs' principle was stated by Auguste Kerckhoffs in the 19th century: a cryptosystem should be secure even if everything about the system, except the cryptographic key, is public knowledge....
 and Shannon's Maxim respectively.

A key should therefore be large enough that a brute force attack (possible against any encryption algorithm) is infeasible – i.e, would take too long to execute. Shannon's work on information theory
Information theory

Information theory is a branch of applied mathematics and electrical engineering involving the quantification of information. Historically, information theory was developed by Claude E....
 showed that to achieve perfect secrecy, it is necessary for the key length to be at least as large as the message to be transmitted and only used once (this algorithm is called the One-time pad
One-time pad

In cryptography, the one-time pad is an encryption algorithm where the plaintext is combined with a random key or "pad" that is as long as the plaintext and used only once....
). In light of this, and the practical difficulty of managing such long keys, modern cryptographic practice has discarded the notion of perfect secrecy as a requirement for encryption, and instead focuses on computational security. Under this definition, the computational requirements of breaking an encrypted text must be infeasible for an attacker.

The preferred numbers commonly used as key sizes (in bits) are powers of two, potentially multiplied with a small odd integer.

Key size and encryption system

Encryption systems are often grouped into families. Common families include symmetric systems (e.g. AES
Advanced Encryption Standard

In cryptography, the Advanced Encryption Standard is an encryption standard adopted by the Federal government of the United States. The standard comprises three block ciphers, AES-128, AES-192 and AES-256, adopted from a larger collection originally published as Rijndael. Each AES cipher has a 128 bit block size, with key sizes of 128...
) and asymmetric systems (e.g. RSA
RSA

In cryptography, RSA is an algorithm for public-key cryptography. It is the first algorithm known to be suitable for digital signature as well as encryption, and one of the first great advances in public key cryptography....
), or may be grouped according to the central algorithm
Algorithm

In mathematics, computing, linguistics and related subjects, an algorithm is a sequence of finite instructions, often used for calculation and data processing....
 used (e.g. elliptic curve cryptography
Elliptic curve cryptography

Elliptic curve cryptography is an approach to public-key cryptography based on the algebraic structure of elliptic curves over finite fields. The use of elliptic curves in cryptography was suggested independently by Neal Koblitz and Victor S....
).

As each of these is of a different level of cryptographic complexity, it is usual to have different key sizes for the same level of security, depending upon the algorithm used. For example, the security available with a 1024-bit key using asymmetric RSA is considered approximately equal in security to an 80-bit key in a symmetric algorithm (Source: RSA Security
RSA Security

RSA, The Security Division of EMC Corporation, is headquartered in Bedford, Massachusetts, United States, and maintains offices in Ireland, Israel, the United Kingdom, Singapore, India, China, Hong Kong and Japan....
).

The actual degree of security achieved over time varies, as more computational power and more powerful mathematical analytic methods become available. For this reason cryptologists tend to look at indicators that an algorithm or key length shows signs of potential vulnerability, to move to longer key sizes or more difficult algorithms. For example , a 1039 bit integer was factored, with the special number field sieve
Special number field sieve

The special number field sieve is a special-purpose integer factorization algorithm. The general number field sieve was derived from it.The special number field sieve is efficient for integers of the form re ± s, where r and s are small ....
 using 400 computers over 11 months. The factored number was of a special form, the special number field sieve cannot be used on RSA keys. The computation is roughly equivalent to breaking a 700 bit RSA key. However, this might be an advanced warning that 1024 bit RSA used in secure online commerce, should be deprecated
Deprecation

In computer software standards and documentation, the term deprecation is applied to software features that are superseded and should be avoided....
 since they may become breakable in the near future. Cryptography professor Arjen Lenstra
Arjen Lenstra

Arjen Klaas Lenstra is a Dutch mathematician. He studied mathematics at the University of Amsterdam.He is currently a professor at the EPFL , in the Laboratory for Cryptologic Algorithms, and...
 observed that "Last time, it took nine years for us to generalize from a special to a nonspecial, hard-to-factor number" and when asked whether 1024-bit RSA keys are dead, said: "The answer to that question is an unqualified yes."

Brute force attack

Even if a symmetric cipher is currently unbreakable by exploiting structural weaknesses in its algorithm, it is possible to run through the entire space of keys in what is known as a brute force attack. Since longer symmetric keys require exponentially more work to brute force search, a sufficiently long symmetric key will prevent this line of attack.

With a key of length n bits, there are 2n possible keys. This number grows very rapidly as n increases. Moore's law
Moore's Law

Moore's law describes a long-term trend in the history of computing hardware. Since the invention of the integrated circuit in 1958, the number of transistors that can be placed inexpensively on an integrated circuit has increased exponential growth, doubling approximately every two years....
 suggests that computing power doubles roughly every 18 to 24 months, but even this doubling effect leaves the larger symmetric key lengths currently considered acceptable well out of reach. The large number of operations (2128) required to try all possible 128-bit keys is widely considered to be out of reach
Large numbers

Large numbers are numbers that are significantly larger than those ordinarily used in everyday life, for instance in simple counting or in monetary transactions....
 for conventional digital computing techniques for the foreseeable future. However alternative forms of computing technology are anticipated which may have superior processing power than classical computers. If a suitably sized quantum computer capable of running Grover's algorithm
Grover's algorithm

Grover's algorithm is a quantum algorithm for searching an sorting database with N entries in O time and using O storage space . It was invented by Lov K....
 reliably becomes available it would reduce a 128-bit key down to 64-bit security, roughly a DES equivalent. This is one of the reasons why AES supports a 256-bit key length. See the discussion on the relationship between key lengths and quantum computing attacks at the bottom of this page for more information.

Symmetric algorithm key lengths

US Government export policy has long restricted the 'strength' of cryptography
Export of cryptography

The export of cryptography is the transfer from one country to another of devices and technology related to cryptography.Since World War II, many governments, including the United States and its NATO allies, have regulated the export of cryptography for national security considerations, and, for a time, defined cryptography to be a munition...
 which can be sent out of the country. For many years the limit was 40 bits
40-bit encryption

40-bit encryption refers to a key size of forty bits, or five bytes, for symmetric encryption; this represents a relatively low level of security....
. Today, a key length of 40 bits offers little protection against even a casual attacker with a single PC. The restrictions have not been removed (in 2007, it is still illegal to export cryptographic software using key lengths greater than 64-bits without authorization from the U.S. Bureau of Industry and Security), but it became easier to gain authorization to export to certain countries in 1999/2000.

When the Data Encryption Standard
Data Encryption Standard

The Data Encryption Standard is a block cipher that was selected by National Bureau of Standards as an official Federal Information Processing Standard for the United States in 1976 and which has subsequently enjoyed widespread use internationally....
 cipher was released in 1977, a key length of 56 bits was thought to be sufficient (though there was speculation at the time that the NSA
National Security Agency

The National Security Agency/Central Security Service is a Cryptology Intelligence agency of the Federal government of the United States, administered as part of the United States Department of Defense....
 has deliberately reduced the key size from the original value of 112 bits, in IBM's Lucifer cipher
Lucifer (cipher)

In cryptography, Lucifer was the name given to several of the earliest civilian block ciphers, developed by Horst Feistel and his colleagues at IBM....
, or 64 bits, in one of the versions of what was adopted as DES) so as to limit the 'strength' of encryption available to non-US users. The NSA has major computing resources and a large budget; some thought that 56 bits was NSA-breakable in the late '70s. However, by the late 90s, it became clear that DES could be cracked in a few days' time-frame with custom-built hardware such as could be purchased by a large corporation. The book Cracking DES (O'Reilly and Associates) tells of the successful attempt to break 56-bit DES by a brute force attack mounted by a cyber civil rights group with limited resources; see EFF DES cracker
EFF DES cracker

In cryptography, the EFF DES cracker is a machine built by the Electronic Frontier Foundation to perform a brute force attack search of Data Encryption Standard cipher's key space ? that is, to decrypt an encrypted message by trying every possible key....
. 56 bits is now considered insufficient length for symmetric algorithm
Symmetric-key algorithm

Symmetric-key algorithms are a class of algorithms for cryptography that use trivially related, often identical, cryptographic keys for both decryption and encryption....
 keys, and may have been for some time. More technically and financially capable organizations were surely able to do the same long before the effort described in the book. Distributed.net
Distributed.net

distributed.net is a worldwide distributed computing effort that is attempting to solve large scale problems using otherwise Idle time. It is officially recognized as a non-profit organization under U.S....
 and its volunteers broke a 64-bit RC5 key in several years, using about seventy thousand (mostly home) computers.

The NSA's Skipjack
Skipjack (cipher)

In cryptography, Skipjack is a block cipher — an algorithm for encryption — developed by the United States National Security Agency ....
 algorithm used in its Fortezza
Fortezza

Fortezza is an information security system based on a PC Card security token. Each individual who is authorized to see protected information is issued a Fortezza card that stores public key and other data needed to gain access....
 program employs 80 bit keys.

DES has been replaced in many applications by Triple DES
Triple DES

In cryptography, Triple DES is a block cipher formed from the Data Encryption Standard cipher by using it three times....
, which has 112 bits of security with 168-bit keys.

The Advanced Encryption Standard
Advanced Encryption Standard

In cryptography, the Advanced Encryption Standard is an encryption standard adopted by the Federal government of the United States. The standard comprises three block ciphers, AES-128, AES-192 and AES-256, adopted from a larger collection originally published as Rijndael. Each AES cipher has a 128 bit block size, with key sizes of 128...
 published in 2001 uses a key size of (at minimum) 128 bits. It also can use keys up to 256 bits (a specification requirement for submissions to the AES contest). 128 bits is currently thought, by many observers, to be sufficient for the foreseeable future for symmetric algorithms of AES's quality. The U.S. Government requires 192 or 256-bit AES keys for highly sensitive data.

In 2003 the U.S. National Institute for Standards and Technology, NIST, proposed that 80-bit keys should be phased out by 2015. As of 2005, 80-bit keys were allowed to be used only until 2010.

Asymmetric algorithm key lengths

The effectiveness of public key cryptosystems depends on the intractability (computational and theoretical) of certain mathematical problems such as integer factorization
Integer factorization

In number theory, integer factorization is the breaking down of a composite number into smaller non-trivial divisors, which when multiplied together equal the original integer....
. These problems are time consuming to solve, but usually faster than trying all possible keys by brute force. Thus, asymmetric algorithm keys must be longer for equivalent resistance to attack than symmetric algorithm keys. As of 2002, a key length of 1024 bits was generally considered the minimum necessary for the RSA
RSA

In cryptography, RSA is an algorithm for public-key cryptography. It is the first algorithm known to be suitable for digital signature as well as encryption, and one of the first great advances in public key cryptography....
 encryption algorithm.

RSA Security
RSA Security

RSA, The Security Division of EMC Corporation, is headquartered in Bedford, Massachusetts, United States, and maintains offices in Ireland, Israel, the United Kingdom, Singapore, India, China, Hong Kong and Japan....
 claims that 1024-bit RSA keys are equivalent in strength to 80-bit symmetric keys, 2048-bit RSA keys to 112-bit symmetric keys and 3072-bit RSA keys to 128-bit symmetric keys. RSA claims that 1024-bit keys are likely to become crackable some time between 2006 and 2010 and that 2048-bit keys are sufficient until 2030. An RSA key length of 3072 bits should be used if security is required beyond 2030. NIST key management guidelines further suggest that 15360-bit RSA keys are equivalent in strength to 256-bit symmetric keys.

The Finite Field Diffie-Hellman algorithm has roughly the same key strength as RSA for the same key sizes. The work factor for breaking Diffie-Hellman is based on the discrete logarithm problem, which is related to the integer factorization problem on which RSA's strength is based. Thus, a 3072-bit Diffie-Hellman key has about the same strength as a 3072-bit RSA key.

One of the asymmetric algorithm types, elliptic curve cryptography
Elliptic curve cryptography

Elliptic curve cryptography is an approach to public-key cryptography based on the algebraic structure of elliptic curves over finite fields. The use of elliptic curves in cryptography was suggested independently by Neal Koblitz and Victor S....
, or ECC, appears to be secure with shorter keys than those needed by other asymmetric key algorithms. NIST guidelines state that ECC keys should be twice the length of equivalent strength symmetric key algorithms. So, for example, a 224-bit ECC key would have roughly the same strength as a 112-bit symmetric key. These estimates assume no major breakthroughs in solving the underlying mathematical problems that ECC is based on. A message encrypted with an elliptic key algorithm using a 109-bit long key has been broken by brute force.

The NSA specifies that "Elliptic Curve Public Key Cryptography using the 256-bit prime modulus elliptic curve as specified in FIPS-186-2 and SHA-256 are appropriate for protecting classified information up to the SECRET level. Use of the 384-bit prime modulus elliptic curve and SHA-384 are necessary for the protection of TOP SECRET information."

Effect of quantum computing attacks on key strength

The two best known quantum computing attacks are based on Shor's algorithm
Shor's algorithm

Shor's algorithm, first introduced by mathematician Peter Shor, is a quantum computer algorithm for integer factorization. On a quantum computer, to factor an integer , Shor's algorithm takes polynomial time in , specifically , demonstrating that integer factorization is in the complexity class BQP....
 and Grover's algorithm
Grover's algorithm

Grover's algorithm is a quantum algorithm for searching an sorting database with N entries in O time and using O storage space . It was invented by Lov K....
. Of the two Shor's offers the greatest risk to current security systems.

Derivatives of Shor's algorithm are widely conjectured to be effective against all mainstream public-key algorithms including RSA
RSA

In cryptography, RSA is an algorithm for public-key cryptography. It is the first algorithm known to be suitable for digital signature as well as encryption, and one of the first great advances in public key cryptography....
, Diffie-Hellman and elliptic curve cryptography
Elliptic curve cryptography

Elliptic curve cryptography is an approach to public-key cryptography based on the algebraic structure of elliptic curves over finite fields. The use of elliptic curves in cryptography was suggested independently by Neal Koblitz and Victor S....
. According to Professor Gilles Brassard, an expert in quantum computing: "The time needed to factor an RSA integer is the same order as the time needed to use that same integer as modulus for a single RSA encryption. In other words, it takes no more time to break RSA on a quantum computer (up to a multiplicative constant) than to use it legitimately on a classical computer." The general consensus is that these public key algorithms are insecure at any key size if sufficiently large quantum computers capable of running Shor's algorithm become available. The implications of this attack is that all data encrypted using current standards based security systems such as the ubiquitous SSL used to protect e-commerce and Internet banking and SSH
SSH

SSH may refer to:* Secure Shell, a common network protocol for remote administration of Unix computers* Sharm el-Sheikh International Airport, in IATA airport code...
 used to protect access to sensitive computing systems is at risk. Encrypted data protected using these protocols can be archived and may be broken at a later time.

Mainstream symmetric ciphers (such as AES
Advanced Encryption Standard

In cryptography, the Advanced Encryption Standard is an encryption standard adopted by the Federal government of the United States. The standard comprises three block ciphers, AES-128, AES-192 and AES-256, adopted from a larger collection originally published as Rijndael. Each AES cipher has a 128 bit block size, with key sizes of 128...
 or Twofish
Twofish

In cryptography, Twofish is a Symmetric-key algorithm block cipher with a block size of 128 bits and key sizes up to 256 bits. It was one of the five finalists of the Advanced Encryption Standard process, but was not selected for standardisation....
) and collision resistant hash function (such as SHA
Sha

eading=Cyrillic letter Sha|Image=...
) are widely conjectured to offer greater security against known quantum computing attacks. They are widely conjectured to be most vulnerable to Grover's algorithm
Grover's algorithm

Grover's algorithm is a quantum algorithm for searching an sorting database with N entries in O time and using O storage space . It was invented by Lov K....
. Bennett, Bernstein, Brassard, and Vazirani proved in 1996 that a brute-force key search on a quantum computer cannot be faster than roughly 2n/2 invocations of the underlying cryptographic algorithm, compared with roughly 2n in the classical case. Thus in the presence of large quantum computers an n-bit key can provide at most n/2 bits of security. Quantum brute force is easily defeated by doubling the key length, which has little extra computational cost in ordinary use. This implies that at least a 160-bit symmetric key is required to achieve 80-bit security rating against a quantum computer.

See also

  • Key strengthening
    Key strengthening

    In cryptography, key strengthening or key stretching refer to techniques used to make a possibly-weak Key , typically a password or passphrase, more secure against a brute force attack by increasing the time it takes to test each possible key....


External links

  • (PDF
    Portable Document Format

    Portable Document Format is a file format created by Adobe Systems in 1993 for document exchange. PDF is used for representing two-dimensional documents in a manner independent of the application software, hardware, and operating system....
     file), available also in PostScript
    PostScript

    PostScript is a dynamically typed concatenative programming language programming language created by John Warnock and Charles Geschke in 1982. PostScript is best known for its use as a page description language in the electronic and desktop publishing areas....
     and other format
    Format

    :For help on formatting Wikipedia articles, see...
    s
  • NIST
  • The FreeS/WAN
    FreeS/WAN

    FreeS/WAN, for Free Secure Wide-Area Networking, was a free software project, which implemented a reference version of the IPsec network security layer for Linux and other Unix-like operating systems....
     project's
  • Burt Kaliski
    Burt Kaliski

    Burton S. "Burt" Kaliski, Jr. is a cryptographer, currently chair of the office of thechief technical officer and vice president of research at RSA Security, and chief...
    : (May 2003)