All Topics  
Key (cryptography)

 

   Email Print
   Bookmark   Link






 

Key (cryptography)



 
 
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....
, a key is a piece of information (a parameter
Parameter

In mathematics, statistics, and the mathematical sciences, a parameter is a quantity that defines certain characteristics of systems or function s....
) that determines the functional output of a cryptographic algorithm
Algorithm

In mathematics, computing, linguistics and related subjects, an algorithm is a sequence of finite instructions, often used for calculation and data processing....
 or 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....
. Without a key, the algorithm would have no result. In encryption
Encryption

In cryptography, encryption is the process of transforming information using an algorithm to make it unreadable to anyone except those possessing special knowledge, usually referred to as a key ....
, a key specifies the particular transformation of 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....
 into ciphertext, or vice versa during decryption. Keys are also used in other cryptographic algorithms, such as digital signature
Digital signature

A digital signature or digital signature scheme is a type of asymmetric key algorithm. For messages sent through an insecure channel, a properly implemented digital signature gives the receiver reason to believe the message was sent by the claimed sender....
 schemes and message authentication code
Message authentication code

A cryptography message authentication code is a short piece of information used to authenticate a message.A MAC algorithm accepts as input a secret key and an arbitrary-length message to be authenticated, and outputs a MAC ....
s.

Need for secrecy
In designing security systems, it is wise to assume that the details of the cryptographic algorithm are already available to the attacker.






Discussion
Ask a question about 'Key (cryptography)'
Start a new discussion about 'Key (cryptography)'
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....
, a key is a piece of information (a parameter
Parameter

In mathematics, statistics, and the mathematical sciences, a parameter is a quantity that defines certain characteristics of systems or function s....
) that determines the functional output of a cryptographic algorithm
Algorithm

In mathematics, computing, linguistics and related subjects, an algorithm is a sequence of finite instructions, often used for calculation and data processing....
 or 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....
. Without a key, the algorithm would have no result. In encryption
Encryption

In cryptography, encryption is the process of transforming information using an algorithm to make it unreadable to anyone except those possessing special knowledge, usually referred to as a key ....
, a key specifies the particular transformation of 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....
 into ciphertext, or vice versa during decryption. Keys are also used in other cryptographic algorithms, such as digital signature
Digital signature

A digital signature or digital signature scheme is a type of asymmetric key algorithm. For messages sent through an insecure channel, a properly implemented digital signature gives the receiver reason to believe the message was sent by the claimed sender....
 schemes and message authentication code
Message authentication code

A cryptography message authentication code is a short piece of information used to authenticate a message.A MAC algorithm accepts as input a secret key and an arbitrary-length message to be authenticated, and outputs a MAC ....
s.

Need for secrecy


In designing security systems, it is wise to assume that the details of the cryptographic algorithm are already available to the attacker. This principle is 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....
 — "only secrecy of the key provides security", or, reformulated as Shannon's maxim, "the enemy knows the system". The history of cryptography
History of cryptography

The history of cryptography begins thousands of years ago. Until recent decades, it has been the story of what might be called classical cryptography ? that is, of methods of encryption that use pen and paper, or perhaps simple mechanical aids....
 provides evidence that it can be difficult to keep the details of a widely-used algorithm secret (see security through obscurity
Security through obscurity

In cryptography and computer security, security through obscurity is a principle in security engineering, which attempts to use secrecy to provide security....
). A key is often easier to protect (it's typically a small piece of information) than an encryption algorithm, and easier to change if compromised. Thus, the security of an encryption system in most cases relies on some key being kept secret.

Keeping keys secret is one of the most difficult problems in practical cryptography; see key management
Key management

Key management is a term used to describe two different fields; cryptography, and Key management within building or campus access control....
. An attacker who obtains the key (by, for example, theft, extortion, dumpster diving
Dumpster diving

Dumpster diving is the practice of sifting through commercial or residential Waste to find items that have been discarded by their owners, but which may be useful to the Dumpster diver....
, social engineering or inspection of a Post-it note
Post-it note

The Post-it note is a piece of stationery with a re-adherable strip of adhesive on the back, designed for temporarily attaching notes to documents and to other surfaces: walls, desks and table-tops, computer displays, and so forth....
 stuck to the side of a terminal) can recover the original message from the encrypted data.

Encryption algorithms which use the same key for both encryption and decryption are known as symmetric key algorithms. A newer class of "public key" cryptographic algorithms was invented in the 1970s which uses a pair of keys, one to encrypt and one to decrypt. These asymmetric key algorithms allow one key to be made public while retaining the private key in only one location. They are designed so that finding out the private key is extremely difficult, even if the corresponding public key is known. A user of public key technology can publish their public key, while keeping their private key secret, allowing anyone to send them an encrypted message.

Key sizes


Main article: Key size
Key size

In cryptography, key size or key length is the size of the key used in a cryptographic algorithm . 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....


For 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....
 system the key must be at least as long as the message. In encryption systems that use 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....
 algorithm, messages can be much longer than the key. The key must, however, be long enough so that an attacker cannot try all possible combinations.

A key length of 80 bits is generally considered the minimum for strong security with symmetric encryption algorithms. 128-bit keys are commonly used and considered very strong. See the key size
Key size

In cryptography, key size or key length is the size of the key used in a cryptographic algorithm . 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....
 article for a fuller discussion.

The keys used in public key cryptography have some mathematical structure. For example, public keys used in 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....
 system are the product of two prime numbers. Thus public key systems require longer key lengths than symmetric systems for an equivalent level of security. 3072 bits is the suggested key length for systems based on factoring
Factorization

In mathematics, factorization or factoring is the decomposition of an object into a product of other objects, or factors, which when multiplication together give the original....
 and integer discrete logarithm
Discrete logarithm

In mathematics, specifically in abstract algebra and its applications, discrete logarithms are group analogues of ordinary logarithms. In particular, an ordinary logarithm loga is a solution of the equation ax = b over the real or complex numbers....
s which aim to have security equivalent to a 128 bit symmetric cipher. 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....
 may allow smaller-size keys for equivalent security, but these algorithms have only been known for a relatively short time and current estimates of the difficulty of searching for their keys may not survive. As of 2004, a message encrypted using a 109-bit key elliptic curve algorithm had been broken by brute force. The current rule of thumb is to use an ECC key twice as long as the symmetric key security level desired. Except for the random 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....
, the security of these systems has not been proven mathematically, so a theoretical breakthrough could make everything one has encrypted an open book. This is another reason to err on the side of choosing longer keys.

Key choice


To prevent a key from being guessed, keys need to be generated truly randomly and contain sufficient entropy. The problem of how to safely generate truly random keys is difficult, and has been addressed in many ways by various cryptographic systems. There is a RFC on generating randomness (RFC 1750, Randomness Recommendations for Security). Some operating systems include tools for "collecting" entropy from the timing of unpredictable operations such as disk drive head movements. For the production of small amounts of keying material, ordinary dice
Dice

A die is a small polyhedron object, usually cubic, used for generating Statistical randomnesss or other symbols. This makes dice suitable as gambling devices, especially for craps or sic bo, or for use in non-gambling tabletop games....
 provide a good source of high quality randomness.

When a password
Password

A password is a secret word or string of Character that is used for authentication, to prove identity or gain access to a resource . The password must be kept Secrecy from those not allowed access....
 (or passphrase
Passphrase

A passphrase is a sequence of words or other text used to access control to a computer system, program or data. A passphrase is similar to a password in usage, but is generally longer for added security....
) is used as an encryption key, well-designed cryptosystems first run it through a key derivation function
Key derivation function

In cryptography, a key derivation function is a function which derives one or more key s from a secret value and/or other known information such as a password or passphrase....
 which adds a salt
Salt (cryptography)

In cryptography, a salt comprises Random Number Generator bits that are used as one of the inputs to a key derivation function. The other input is usually a password or passphrase....
 and compresses or expands it to the key length desired, for example by compressing a long phrase into a 128-bit value suitable for use in a block cipher
Block cipher

In cryptography, a block cipher is a symmetric key algorithm cipher which operates on fixed-length groups of bits, termed blocks, with an unvarying transformation....
.

See also