All Topics  
Public-key cryptography

 

   Email Print
   Bookmark   Link






 

Public-key cryptography



 
 
Public-key cryptography is a method for secret communication between two parties without requiring an initial exchange
Key exchange

Key exchange is any method in cryptography by which key s are exchanged between users, allowing use of a cryptographic algorithm.If Alice and Bob wish to exchange encrypted messages, each must be equipped to decrypt received messages and to encrypt sent messages....
 of secret keys.






Discussion
Ask a question about 'Public-key cryptography'
Start a new discussion about 'Public-key cryptography'
Answer questions from other users
Full Discussion Forum



Encyclopedia


Public Key Making
Public Key Encryption
Public Key Signing
Public Key Shared Secret
Public-key cryptography is a method for secret communication between two parties without requiring an initial exchange
Key exchange

Key exchange is any method in cryptography by which key s are exchanged between users, allowing use of a cryptographic algorithm.If Alice and Bob wish to exchange encrypted messages, each must be equipped to decrypt received messages and to encrypt sent messages....
 of secret keys. It can also be used to create digital signatures
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....
. Public key cryptography is a fundamental and widely used technology around the world, and enables secure transmission
Transport Layer Security

Transport Layer Security and its predecessor, Secure Sockets Layer , are cryptographic protocols that provide security and data integrity for communications over Internet Protocol Suite networks such as the Internet....
 of information on the Internet
Internet

The Internet is a global network of interconnected computers, enabling users to share information along multiple channels. Typically, a computer that connects to the Internet can access information from a vast array of available server and other computers by moving information from them to the computer's local memory....
.

It is also known as asymmetric key cryptography because 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 to encrypt
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 message differs from the key used to decrypt it. In public key cryptography, a user has a pair of cryptographic keys — a public key and a private key. The private key is kept secret, while the public key may be widely distributed. Messages are encrypted
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 ....
 with the recipient's public key and can only be decrypted with the corresponding private key. The keys are related mathematically, but the private key cannot be feasibly (ie, in actual or projected practice) derived from the public key.

Symmetric cryptography
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....
 uses a single secret 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....
 for both encryption and decryption. To use a symmetric encryption scheme, the sender and receiver must share a key in advance. Because symmetric encryption is less computationally intensive and requires less bandwidth, it is common to exchange a key using a key-exchange algorithm and transmit data using an enciphering scheme.

Description


The two main branches of public key cryptography are:
  • Public key encryption — a message encrypted with a recipient's public key cannot be decrypted by anyone except a possessor of the matching private key -- presumably, this will be the owner of that key and the person associated with the public key used. This is used for confidentiality
    Confidentiality

    Confidentiality has been defined by the International Organization for Standardization as "ensuring that information is accessible only to those authorized to have access" and is one of the cornerstones of information security....
    .
  • 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....
    s — a message signed with a sender's private key can be verified by anyone who has access to the sender's public key, thereby proving that the sender had access to the private key (and therefore is likely to be the person associated with the public key used), and the part of the message that has not been tampered with. On the question of authenticity
    Authentication

    Authentication is the act of establishing or confirming something as authentic, that is, that claims made by or about the subject are true....
    , see also message digest.


An analogy to public-key encryption is that of a locked mailbox
Letter box

A letter box, letterbox, letter plate, mail slot, or mailbox is a receptacle for receiving incoming mail at a private residence or business....
 with a mail slot. The mail slot is exposed and accessible to the public; its location (the street address) is in essence the public key. Anyone knowing the street address can go to the door and drop a written message through the slot; however, only the person who possesses the key can open the mailbox and read the message.

An analogy for digital signatures is the sealing of an envelope with a personal wax seal
Seal (device)

A seal can mean a wax seal bearing an impressed figure, or an embossed figure in paper, with the purpose of authenticating a document, but the term can also mean any device for making such impressions or embossments, essentially being a Molding that has the mirror image of the figure in counter-relief, such as mounted on rings known a...
. The message can be opened by anyone, but the presence of the seal authenticates the sender.

A central problem for use of public-key cryptography is confidence (ideally proof) that a public key is correct, belongs to the person or entity claimed (i.e., is 'authentic'), and has not been tampered with or replaced by a malicious third party. The usual approach to this problem is to use a public-key infrastructure
Public key infrastructure

The Public Key Infrastructure is a set of hardware, software, people, policies, and procedures needed to create, manage, store, distribute, and revoke digital certificates ....
 (PKI), in which one or more third parties, known as certificate authorities
Certificate authority

In cryptography, a certificate authority or certification authority is an entity which issues Public key certificates for use by other parties....
, certify ownership of key pairs. Another approach, used by PGP
Pretty Good Privacy

Pretty Good Privacy is a computer program that provides cryptographic privacy and authentication. PGP is often used for signing, encrypting and decrypting e-mails to increase the security of e-mail communications....
, is the "web of trust
Web of trust

In cryptography, a web of trust is a concept used in Pretty Good Privacy, GNU Privacy Guard, and other OpenPGP-compatible systems to establish the authenticity of the binding between a public key and a user....
" method to ensure authenticity of key pairs.

All known public key techniques are much more computationally intensive than their secret-key
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....
 counterparts, but can be made fast enough for a wide variety of applications. In practice, public-key cryptography is often used in combination with secret-key methods for efficiency reasons. Such combinations are called hybrid cryptosystem
Hybrid cryptosystem

In cryptography, public-key cryptography are convenient in that they do not require the sender and receiver to share a common secret in order to communicate securely ....
s. For encryption, the sender encrypts the message with a secret-key algorithm using a randomly generated key, and that random key is then encrypted with the recipient's public key. For digital signatures, the sender hashes the message (using a cryptographic hash function
Cryptographic hash function

A cryptographic hash function is a algorithm that takes an arbitrary block of data and returns a fixed-size bit string, the hash value, such that an accidental or intentional change to the data will almost certainly change the hash value....
) and then signs the resulting "hash value". Before verifying the signature, the recipient also computes the hash of the message, and compares this hash value with the signed hash value to check that the message has not been tampered with.

History

For most of 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....
, a key would be agreed upon using a secure, but non-cryptographic, method; for example, a face-to-face meeting or a trusted courier. This key, which must be kept absolutely secret, could then be used to exchange encrypted messages. There are a number of significant practical difficulties in this approach to distributing keys
Key distribution

In symmetric key cryptography, both parties must possess a secret key which they must exchange prior to using any encryption. Distribution of secret keys has been problematic until recently, because it involved face-to-face meeting, use of a trusted courier, or sending the key through an existing encryption channel....
. Public-key cryptography was invented to address these drawbacks — with public-key cryptography, users can communicate securely over a public channel without having to agree upon a shared key beforehand.

In 1874, a book by William Stanley Jevons
William Stanley Jevons

William Stanley Jevons , England economist and logician, was born in Liverpool. He expounded in his book The Theory of Political Economy the "final" utility theory of value....
  described the relationship of one-way function
One-way function

In cryptography, a one-way function is a function that is easy to compute on every input, but hard to invert given the image of a random input....
s to cryptography and went on to discuss specifically the factorization
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....
 problem used to create the trapdoor function
Trapdoor function

A trapdoor function is a function that is easy to compute in one direction, yet believed to be difficult to compute in the opposite direction without special information, called the "trapdoor"....
 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. In July 1996, one observer commented on the Jevons book in this way:

In his book The Principles of Science: A Treatise on Logic and Scientific Method, written and published in the 1890s , William S. Jevons observed that there are many situations where the 'direct' operation is relatively easy, but the 'inverse' operation is significantly more difficult. One example mentioned briefly is that enciphering (encryption) is easy while deciphering (decryption) is not. In the same section of Chapter 7: Introduction titled 'Induction an Inverse Operation', much more attention is devoted to the principle that multiplication of integers is easy, but finding the (prime
Prime number

In mathematics, a prime number is a natural number which has exactly two distinct natural number divisors: 1 and itself. An infinitude of prime numbers exists, as demonstrated by Euclid around 300 BC....
) factors of the product is much harder. Thus, Jevons anticipated a key feature of the RSA Algorithm for public key cryptography, though he certainly did not invent the concept of public key cryptography.


The first invention of asymmetric key algorithms was by James H. Ellis
James H. Ellis

James H. Ellis was an engineer and mathematician. In 1970, while working at GCHQ he conceived of the possibility of "non-secret encryption", more commonly termed public-key cryptography....
, Clifford Cocks
Clifford Cocks

Clifford Christopher Cocks, Order of the Bath, is a British mathematician and cryptographer at GCHQ who invented the widely-used encryption algorithm now commonly known as RSA, about three years before it was independently developed by Ronald Rivest, Adi Shamir, and Leonard Adleman at Massachusetts Institute of Technology....
, and Malcolm Williamson
Malcolm J. Williamson

Malcolm J. Williamson discovered in 1974 what is now known as Diffie-Hellman key exchange. He was then working at Government Communications Headquarters....
 at GCHQ in the UK
United Kingdom

The United Kingdom of Great Britain and Northern Ireland, commonly known as the United Kingdom , the UK or Britain,is a sovereign state located off the northwestern coast of continental Europe....
 in the early 1970s; these inventions were what later became known as Diffie-Hellman key exchange, and a special case of 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....
. The GCHQ cryptographers referred to the technique as "non-secret encryption". These inventions were not publicly disclosed at the time, and the fact that they had been developed was kept secret until 1997. Jevons' book seems to have had little influence on the GCHQ folk, nor on Diffie, Hellman, or Merkle, and so seems to be an example of a pioneer neglected.

An asymmetric-key cryptosystem was published in 1976 by Whitfield Diffie
Whitfield Diffie

Bailey Whitfield 'Whit' Diffie is a United States cryptographer and one of the pioneers of public-key cryptography.He received a Bachelor of Science degree in mathematics from the Massachusetts Institute of Technology in 1965....
 and Martin Hellman
Martin Hellman

Martin Edward Hellman is a cryptology, famous for his invention of public key cryptography in cooperation with Whitfield Diffie and Ralph Merkle....
, who, influenced by Ralph Merkle
Ralph Merkle

Ralph C. Merkle is a pioneer in public key cryptography, and more recently a researcher and speaker on molecular nanotechnology and cryonics. Merkle appears in the science fiction novel The Diamond Age, as one of the heroes of the world where nanotechnology is ubiquitous....
's work on public-key distribution, disclosed a method of public-key agreement. This method of key exchange, which uses exponentiation in a finite field, came to be known as Diffie-Hellman key exchange
Diffie-Hellman key exchange

Diffie-Hellman key exchange is a cryptographic protocol that allows two parties that have no prior knowledge of each other to jointly establish a shared secret key over an insecure communications channel....
. This was the first published practical method for establishing a shared secret-key over an authenticated (but not private) communications channel without using a prior shared secret. Merkle's public-key-agreement technique became known as Merkle's Puzzles, and was invented in 1974 and published in 1978.

A generalisation of Cocks' scheme was independently invented in 1977 by Rivest
Ron Rivest

Ronald Linn Rivest is a cryptography. He is the Andrew and Erna Viterbi Professor of Computer Science at Massachusetts Institute of Technology's MIT School of Engineering#Electrical Engineering and Computer Science and a member of MIT's MIT Computer Science and Artificial Intelligence Laboratory ....
, Shamir
Adi Shamir

Adi Shamir is an Israeli cryptography. He was one of the inventors of the RSA algorithm , one of the inventors of the Feige-Fiat-Shamir Identification Scheme , one of the inventors of differential cryptanalysis and has made numerous contributions to the fields of cryptography and computer science....
 and Adleman
Leonard Adleman

Leonard Max Adleman is a theoretical computer science and professor of computer science and molecular biology at the University of Southern California....
, all then at MIT
Massachusetts Institute of Technology

The Massachusetts Institute of Technology is a private university research university located in Cambridge, Massachusetts, Massachusetts, United States....
. The latter authors published their work in 1978, and the algorithm appropriately came to be known as 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....
. RSA uses exponentiation modulo a product of two large primes
Prime number

In mathematics, a prime number is a natural number which has exactly two distinct natural number divisors: 1 and itself. An infinitude of prime numbers exists, as demonstrated by Euclid around 300 BC....
 to encrypt and decrypt, performing both public key encryption and public key digital signature, and its security is connected to the presumed difficulty of factoring large integers
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....
, a problem for which there is no known efficient (i.e., practicably fast) general technique.

Since the 1970s, a large number and variety of encryption, digital signature, key agreement, and other techniques have been developed in the field of public-key cryptography. The ElGamal cryptosystem
ElGamal encryption

In cryptography, the ElGamal encryption system is an asymmetric key encryption algorithm for public-key cryptography which is based on the Diffie-Hellman key agreement....
 (invented by Taher ElGamal
Taher Elgamal

Dr. Taher Elgamal is an Egyptian cryptographer. Elgamal is sometimes written as El Gamal or ElGamal, but Elgamal is now preferred....
) relies on the (similar, and related) difficulty of the discrete logarithm problem, as does the closely related DSA
Digital Signature Algorithm

The Digital Signature Algorithm is a Federal government of the United States Federal Information Processing Standard or Federal Information Processing Standard for digital signatures....
 developed at NSA and published by NIST as a proposed standard. The introduction of 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....
 by Neal Koblitz
Neal Koblitz

Neal Koblitz is a Professor of Mathematics at the University of Washington in the Department of Mathematics. He is also an adjunct professor with the Centre for Applied Cryptographic Research at the University of Waterloo....
 and Victor Miller
Victor Miller

Victor Miller may refer to:* Victor A. Miller, Attorney General of Wisconsin* Victor J. Miller, Mayor of Saint Louis* Victor S. Miller, independent co-creator of elliptic curve cryptography...
 independently and simultaneously in the mid 1980s has yielded new public-key algorithms based on the 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....
 problem. Although mathematically more complex, elliptic curves provide smaller 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....
s and faster operations for equivalent estimated security.

Security

Some encryption schemes can be proven secure based on the presumed hardness of a mathematical problem like factoring
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....
 the product of two large primes or computing 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. Note that "secure" here has a precise mathematical meaning, and there are multiple different (meaningful) definitions of what it means for an encryption scheme to be secure. The "right" definition depends on the context in which the scheme will be deployed.

In contrast to 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....
, no public-key encryption scheme has been shown to be secure against eavesdroppers with unlimited computational power. Proofs of security for asymmetric key cryptography therefore hold only with respect to computationally-limited adversaries, and can give guarantees (relative to particular mathematical assumptions) of the form "the scheme cannot be broken using a desktop computer in 1000 years", or "this algorithm is secure if no improved method of (for instance, integer factoring) is found".

The most obvious application of a public key encryption system is confidentiality
Confidentiality

Confidentiality has been defined by the International Organization for Standardization as "ensuring that information is accessible only to those authorized to have access" and is one of the cornerstones of information security....
; a message which a sender encrypts using the recipient's public key can be decrypted only by the recipient's paired private key (assuming, of course that no flaw is discovered in the basic algorithm used).

Another type of applications in public-key cryptography are 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. Digital signature schemes can be used for sender authentication
Authentication

Authentication is the act of establishing or confirming something as authentic, that is, that claims made by or about the subject are true....
 and non-repudiation
Non-repudiation

Non-repudiation is the concept of ensuring that a party in a dispute cannot repudiate, or refute the validity of a statement or contract. Although this concept can be applied to any transmission, including television and radio, by far the most common application is in the verification and trust of signatures....
. In such a scheme a user who wants to send a message computes a digital signature of this message and then sends this digital signature together with the message to the intended receiver. Digital signature schemes have the property that signatures can only be computed with the knowledge of a private key. To verify that a message has been signed by a user and has not been modified the receiver only needs to know the corresponding public key. In some cases (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....
) there exist digital signature schemes with many similarities to an encryption schemes. In other cases (e.g. DSA
Digital Signature Algorithm

The Digital Signature Algorithm is a Federal government of the United States Federal Information Processing Standard or Federal Information Processing Standard for digital signatures....
) the algorithm does not resemble any encryption scheme.

To achieve authentication, and confidentiality, the sender could first sign the message using his private key, then encrypt the message and signature using the recipient's public key.

These characteristics can be used to construct many other, sometimes surprising, cryptographic protocols and applications, like digital cash, password-authenticated key agreement
Password-authenticated key agreement

In cryptography, a password-authenticated key agreement method is an interactive method for two or more parties to establish cryptographic keys based on one or more party's knowledge of a password....
, multi-party key agreement, time stamping service, non-repudiation protocols, etc.

Practical considerations


A postal analogy

An analogy which can be used to understand the advantages of an asymmetric system is to imagine two people, Alice and Bob
Alice and Bob

Placeholder names are commonly used for archetypal characters in fields such as cryptography and physics. The names are used for convenience, since explanations such as "Person A wants to send a message to person B" can be difficult to follow in complex systems involving many steps....
, sending a secret message through the public mail. In this example, Alice wants to send a secret message to Bob, and expects a secret reply from Bob.

With a symmetric key system, Alice first puts the secret message in a box, and locks the box using a padlock
Padlock

Padlocks are portable Lock used to protect against theft, vandalism, sabotage, espionage, unauthorized use, and harm. They are designed to protect against some degree of forced and surreptitious entry....
 to which she has a key. She then sends the box to Bob through regular mail. When Bob receives the box, he uses an identical copy of Alice's key (which he has somehow obtained previously, maybe by a face-to-face meeting) to open the box, and reads the message. Bob can then use the same padlock to send his secret reply.

In an asymmetric key system, Bob and Alice have separate padlocks. First, Alice asks Bob to send his open padlock to her through regular mail, keeping his key to himself. When Alice receives it she uses it to lock a box containing her message, and sends the locked box to Bob. Bob can then unlock the box with his key and read the message from Alice. To reply, Bob must similarly get Alice's open padlock to lock the box before sending it back to her.

The critical advantage in an asymmetric key system is that Bob and Alice never need to send a copy of their keys to each other. This prevents a third party (perhaps, in the example, a corrupt postal worker) from copying a key while it is in transit, allowing said third party to spy on all future messages sent between Alice and Bob. So in the public key scenario, Alice and Bob need not trust the postal service as much. In addition, if Bob were careless and allowed someone else to copy his key, Alice's messages to Bob would be compromised, but Alice's messages to other people would remain secret, since the other people would be providing different padlocks for Alice to use.

In another kind of asymmetric key system, Bob and Alice have separate padlocks. First, Alice puts the secret message in a box, and locks the box using a padlock to which only she has a key. She then sends the box to Bob through regular mail. When Bob receives the box, he adds his own padlock to the box, and sends it back to Alice. When Alice receives the box with the two padlocks, she removes her padlock and sends it back to Bob. When Bob receives the box with only his padlock on it, Bob can then unlock the box with his key and read the message from Alice. This three-pass protocol
Three-pass protocol

In cryptography, the three-pass protocol for sending messages is a framework which allows one party to securely send a message to a second party without the need to exchange or distribute key ....
 is typically used during key exchange
Key exchange

Key exchange is any method in cryptography by which key s are exchanged between users, allowing use of a cryptographic algorithm.If Alice and Bob wish to exchange encrypted messages, each must be equipped to decrypt received messages and to encrypt sent messages....
.

Actual algorithms—two linked keys

Not all asymmetric key algorithms operate in precisely this fashion. The most common ones have the property that Alice and Bob each own two keys, one for encryption and one for decryption. In a secure asymmetric key encryption scheme, the private key should not be deducible from the public key. This is known as public-key encryption, since an encryption key can be published without compromising the security of messages encrypted with that key.

In the analogy above, Bob might publish instructions on how to make a lock ("public key"), but the lock is such that it is impossible (so far as is known) to deduce from these instructions how to make a key which will open that lock ("private key"). Those wishing to send messages to Bob use the public key to encrypt the message; Bob uses his private key to decrypt it.

Weaknesses

Of course, there is a possibility that someone could "pick" Bob's or Alice's lock. Among symmetric key encryption algorithms, only 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....
 can be proven to be secure against any adversary, no matter how much computing power is available. Unfortunately, there is no public-key scheme with this property, since all public-key schemes are susceptible to brute force key search attack
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....
. Such attacks are impractical if the amount of computation needed to succeed (termed 'work factor' by Claude Shannon) is out of reach of potential attackers. In many cases, the work factor can be increased by simply choosing a longer key. But other attacks may have much lower work factors, making resistance to brute force attack irrelevant, and some are known for some public key encryption algorithms. Both 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....
 and ElGamal encryption
ElGamal encryption

In cryptography, the ElGamal encryption system is an asymmetric key encryption algorithm for public-key cryptography which is based on the Diffie-Hellman key agreement....
 have known attacks which are much faster than the brute force approach. Such estimates have changed both with the decreasing cost of computer power, and new mathematical discoveries.

In practice, these insecurities can be generally avoided by choosing key sizes large enough that the best known attack would take so long that it is not worth any adversary's time and money to break the code. For example, if an estimate of how long it takes to break an encryption scheme is one thousand years, and it were used to encrypt your credit card details, they would be safe enough, since the time needed to decrypt the details will be rather longer than the useful life of those details, which expire after a few years. Typically, the key size needed is much longer for public key algorithms than for symmetric key algorithms.

Aside from the resistance to attack of a particular keypair, the security of the certification hierarchy
Hierarchy

A 'hierarchy' is an arrangement of items The word derives from the Greek language , from ?e?????? , "president of sacred rites, high-priest" and that from , "sacred" + , "to lead, to rule"....
 must be considered when deploying public key systems. Some certificate authority (usually a purpose built program running on a server computer) vouches for the identities assigned to specific private keys by producing a digital certificate. Public key digital certificates are typically valid for several years at a time, so the associated private keys must be held securely over that time. When a private key used for certificate creation higher in the PKI server hierarchy is compromised or accidentally disclosed then a man in the middle attack is possible, making any subordinate certificate wholly insecure.

Major weaknesses have been found for several formerly promising asymmetric key algorithms. The 'knapsack packing' algorithm
Merkle-Hellman

Merkle-Hellman was one of the earliest public key cryptography and was invented by Ralph Merkle and Martin Hellman in 1978. Although its ideas are elegant, and far simpler than RSA, it has been broken....
 was found to be insecure when a new attack was found. Recently, some attacks based on careful measurements of the exact amount of time it takes known hardware to encrypt plain text have been used to simplify the search for likely decryption keys (see side channel attack
Side channel attack

In cryptography, a side channel attack is any attack based on information gained from the physical implementation of a cryptosystem, rather than brute force attack or theoretical weaknesses in the algorithms ....
). Thus, mere use of asymmetric key algorithms does not ensure security; it is an area of active research to discover and protect against new attacks.

Another potential security vulnerability in using asymmetric keys is the possibility of a man in the middle attack, in which communication of public keys is intercepted by a third party and modified to provide different public keys instead. Encrypted messages and responses must also be intercepted, decrypted and re-encrypted by the attacker using the correct public keys for different communication segments in all instances to avoid suspicion. This attack may seem to be difficult to implement in practice, but it's not impossible when using insecure media (e.g. public networks such as the Internet
Internet

The Internet is a global network of interconnected computers, enabling users to share information along multiple channels. Typically, a computer that connects to the Internet can access information from a vast array of available server and other computers by moving information from them to the computer's local memory....
 or wireless communications). A malicious staff member at Alice or Bob's ISP might find it quite easy to carry out.

One approach to prevent such attacks is the use of a certificate authority
Certificate authority

In cryptography, a certificate authority or certification authority is an entity which issues Public key certificates for use by other parties....
, a trusted third party
Trusted third party

In cryptography, a trusted third party is an entity which facilitates interactions between two parties who both trust the third party; they use this trust to secure their own interactions....
 responsible for verifying the identity of a user of the system and issuing a tamper resistant and non-spoofable digital certificate for participants. Such certificates are signed
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....
 data blocks stating that this public key belongs to that person, company or other entity. This approach also has weaknesses. For example, the certificate authority issuing the certificate must be trusted to have properly checked the identity of the key-holder, the correctness of the public key when it issues a certificate, and has made arrangements with all participants to check all certificates before protected communications can begin. Browser
Browser

Browser can refer to:*Browsing , a type of predation*A user interface on a computer that allows navigation of objects**Web browser, used to access the World Wide Wiz Web...
s, for instance, are supplied with many self-signed identity certificates from PKI providers; these are used to check certificate's bonafides (issued properly by the claimed central PKI server?) and then, in a second step, the certificate of a potential communicant. An attacker who could subvert the certificate authority into issuing a certificate for a bogus public key could then mount a man in the middle attack as easily as if the certificate scheme were not used at all. Despite its problems, this approach is widely used; examples include SSL and its successor, TLS
Transport Layer Security

Transport Layer Security and its predecessor, Secure Sockets Layer , are cryptographic protocols that provide security and data integrity for communications over Internet Protocol Suite networks such as the Internet....
, which are commonly used to provide security in web browsers, for example, to securely send credit card details to an online store.

Computational cost

Public key algorithms known thus far are relatively computationally costly compared with most symmetric key algorithms of apparently equivalent security. The difference factor is typically quite large. This has important implications for their practical use. Most are used in hybrid cryptosystems for reasons of efficiency; in such a cryptosystem, a shared secret key ("session key") is generated by one party and this much briefer session key is then encrypted by each recipient's public key. Each recipient uses the corresponding private key to decrypt the session key. Once all parties have obtained the session key they can use a much faster symmetric algorithm to encrypt and decrypt messages. In many of these schemes, the session key is unique to each message exchange, being randomly chosen for each message.

Associating public keys with identities

The binding between a public key and its 'owner' must be correct, lest the algorithm function perfectly and yet be entirely insecure in practice. As with most cryptography, the protocols used to establish and verify this binding are critically important. Associating a public key with its owner is typically done by protocols implementing a public key infrastructure
Public key infrastructure

The Public Key Infrastructure is a set of hardware, software, people, policies, and procedures needed to create, manage, store, distribute, and revoke digital certificates ....
; these allow the validity of the association to be formally verified by reference to a trusted third party
Trusted third party

In cryptography, a trusted third party is an entity which facilitates interactions between two parties who both trust the third party; they use this trust to secure their own interactions....
, either in the form of a hierarchical certificate authority
Certificate authority

In cryptography, a certificate authority or certification authority is an entity which issues Public key certificates for use by other parties....
 (e.g., X.509
X.509

In cryptography, X.509 is an ITU-T standard for a public key infrastructure for single sign-on and Privilege Management Infrastructure . X.509 specifies, amongst other things, standard formats for public key certificates, certificate revocation lists, attribute certificates, and a certification path validation algorithm....
), a local trust model (e.g., SPKI
Simple public key infrastructure

Simple public key infrastructure was born out of a joint effort to overcome the overcomplication and scalability problems of traditional X.509 public key infrastructure....
), or a web of trust
Web of trust

In cryptography, a web of trust is a concept used in Pretty Good Privacy, GNU Privacy Guard, and other OpenPGP-compatible systems to establish the authenticity of the binding between a public key and a user....
 scheme (e.g., that originally built into PGP
Pretty Good Privacy

Pretty Good Privacy is a computer program that provides cryptographic privacy and authentication. PGP is often used for signing, encrypting and decrypting e-mails to increase the security of e-mail communications....
 and GPG
GNU Privacy Guard

GNU Privacy Guard is a free software alternative to the Pretty Good Privacy suite of cryptography software. GnuPG is compliant with RFC 4880, which is the current Internet Engineering Task Force standards track specification of OpenPGP....
 and still to some extent usable with them). Whatever the cryptographic assurance of the protocols themselves, the association between a public key and its owner is ultimately a matter of subjective judgement on the part of the trusted third party, since the key is a mathematical entity whilst the owner, and the connection between owner and key, are not. For this reason, the formalism of a public key infrastructure
Public key infrastructure

The Public Key Infrastructure is a set of hardware, software, people, policies, and procedures needed to create, manage, store, distribute, and revoke digital certificates ....
 must provide for explicit statements of the policy
Policy

A policy is typically described as a deliberate plan of action to guide decisions and achieve rational outcome. However, the term may also be used to denote what is actually done, even though it is unplanned....
 followed when making this judgement. For example, the complex and never fully implemented X.509
X.509

In cryptography, X.509 is an ITU-T standard for a public key infrastructure for single sign-on and Privilege Management Infrastructure . X.509 specifies, amongst other things, standard formats for public key certificates, certificate revocation lists, attribute certificates, and a certification path validation algorithm....
 standard allows a certificate authority
Certificate authority

In cryptography, a certificate authority or certification authority is an entity which issues Public key certificates for use by other parties....
 to identify its policy by means of an object identifier
Object identifier

In computing, an object identifier or OID is an identifier used to name an object . Structurally, an OID consists of a node in a hierarchically-assigned Namespace , formally defined using the ITU-T's Abstract syntax notation one standard....
 which functions as an index into a catalogue of registered policies. Policies may exist for many different purposes, ranging from anonymity to military classification.

Relation to real world events

A public key will be known to a large and, in practice, unknown set of users. All events requiring revocation or replacement of a public key can take a long time to take full effect with all who must be informed (i.e. all those users who possess that key). For this reason, systems which must react to events in real time (e.g. safety-critical systems or national security systems) should not use public-key encryption without taking great care. There are four issues of interest:

Privilege of key revocation
A malicious (or erroneous) revocation of some or all of the keys in the system is likely, or in the second case, certain, to cause a complete failure of the system. If public keys can be revoked individually, this is a possibility. However, there are design approaches which can reduce the practical chance of this occurring. For example, by means of certificates we can create what is called a "compound principal"; one such principal could be "Alice and Bob have Revoke Authority". Now only Alice and Bob (in concert) can revoke a key, and neither Alice nor Bob can revoke keys alone. However, revoking a key now requires both Alice and Bob to be available, and this creates a problem of reliability. In concrete terms, from a security point of view, there is now a single point of failure in the public key revocation system. A successful Denial of Service attack against either Alice or Bob (or both) will block a required revocation. In fact, any partition of authority between Alice and Bob will have this effect, regardless of how it comes about.

Because the principal having revocation authority for keys is very powerful, the mechanisms used to control it should involve both as many participants as possible (to guard against malicious attacks of this type), while at the same time as few as possible (to ensure that a key can be revoked without dangerous delay). Public key certificates which include an expiry date are unsatisfactory in that the expiry date may not correspond with a real world revocation need, but at least such certificates need not all be tracked down system wide, nor must all users be in constant contact with the system at all times.

Distribution of a new key
After a key has been revoked, or when a new user is added to a system, a new key must be distributed in some predetermined manner. Assume that Carol's key has been revoked (e.g. automatically by exceeding its use-before date, or less so, because of a compromise of Carol's matching private key). Until a new key has been distributed, Carol is effectively out of contact. No one will be able to send her messages without violating system protocols (i.e. without a valid public key, no one can encrypt messages to her), and messages from her cannot be signed for the same reason. Or, in other words, the "part of the system" controlled by Carol is essentially unavailable. Security requirements have been ranked higher than system availability in such designs.

One could leave the power to create (and certify) keys as well as revoke them in the hands of each user, and the original PGP design did so, but this raises problems of user understanding and operation. For security reasons, this approach has considerable difficulties; if nothing else, some users will be forgetful or inattentive or confused. On one hand, a message revoking a public key certificate should be spread as fast as possible while, on the other hand, (parts of) the system might be rendered inoperable before a new key can be installed. The time window can obviously be reduced to zero by always issuing the new key together with the certificate that revokes the old one, but this requires co-location of both authority to revoke and to generate new keys.

It is most likely a system-wide failure if the (possibly combined) principal that issues new keys fails by issuing keys improperly. It is an instance of a common mutual exclusion; a design can make the reliability of a system high, but only at the cost of system availability, and vice versa.

Spreading the revocation
Notification of a key certificate revocation must be spread to all those who might potentially hold it, and as rapidly as possible.

There are two means of spreading information (e.g., a key revocation here) in a distributed system: either the information is pushed to users from a central point(s), or it is pulled from a central point(s) to end users.

Pushing the information is the simplest solution in that a message is sent to all participants. However, there is no way of knowing that all participants will actually receive the message, and if the number of participants is large and some of their physical or network distance great, the probability of complete success (which is, ideally, required for system security) will be rather low. In a partially updated state, the system is particularly vulnerable to denial of service attacks as security has been breached, and a vulnerability window will continue to exist as long as some users have not 'gotten the word'. In other words, pushing certificate revocation messages is neither easy to secure nor very reliable.

The alternative to pushing is pulling. In the extreme, all certificates contain all the keys needed to verify that the public key of interest (i.e. the one belonging to the user to whom one wishes to send a message, or whose signature is to be checked) is still valid. In this case, at least some use of the system will be blocked if a user cannot reach the verification service (i.e. one of those systems which can establish the current validity of another user's key). Again, such a system design can be made as reliable as one wishes, at the cost of lowering security (the more servers to check for the possibility of a key revocation, the longer the window of vulnerability).

Another trade-off is to use a somewhat less reliable, but more secure, verification service but to include an expiry date for each of the verification sources. How long this timeout should be is a decision which embodies a trade-off between availability and security that will have to be decided in advance, at system design time.

Recovery from a leaked key
Assume that the principal authorized to revoke a key has decided that a certain key must be revoked. In most cases this happens after the fact; for instance, it becomes known that at some time in the past an event occurred that endangered a private key. Let us denote the time at which it is decided that the compromise occurred with T.

Such a compromise has two implications. Messages encrypted with the matching public key (now or in the past) can no longer be assumed to be secret. One solution to avoid this problem is to use a protocol that has perfect forward secrecy
Perfect forward secrecy

In an authenticated key-agreement protocol that uses public key cryptography, perfect forward secrecy is the property that ensures that a session key derived from a set of long-term public and private keys will not be compromised if one of the private keys is compromised in the future....
. Second, signatures made with the no longer trusted to be actually private key after time T, can no longer be assumed to be authentic without additional information about who, where, when, etc of the events leading up to digital signature. These will not always be available, and so all such digital signatures will be less than credible. A solution to reduce the impact of leaking a private key of a signature scheme is to use timestamps
Trusted timestamping

Trusted timestamping is the process of computer security keeping track of the creation and modification time of a document. Security here means that no one?not even the owner of the document?should be able to change it once it has been recorded provided that the timestamper's integrity is never compromised....
.

Loss of secrecy and/or authenticity, even for a single user, has system-wide security implications, and a strategy for recovery must thus be established. Such a strategy will determine who has authority and under what conditions to revoke a public key certificate, how to spread the revocation, but also, ideally, how to deal with all messages signed with the key since time T (which will rarely be known precisely). Messages sent to that user (which require the proper, now compromised, private key to decrypt) must be considered compromised as well, no matter when they were sent.

Such a recovery procedure can be quite complex, and while it is in progress the system will likely be vulnerable against Denial of Service attacks, among other things.

Examples

Examples of well-regarded asymmetric key techniques for varied purposes include:
  • Diffie-Hellman key exchange protocol
  • DSS (Digital Signature Standard), which incorporates the Digital Signature Algorithm
    Digital Signature Algorithm

    The Digital Signature Algorithm is a Federal government of the United States Federal Information Processing Standard or Federal Information Processing Standard for digital signatures....
  • ElGamal
    ElGamal encryption

    In cryptography, the ElGamal encryption system is an asymmetric key encryption algorithm for public-key cryptography which is based on the Diffie-Hellman key agreement....
  • Various Elliptic Curve
    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....
     techniques
  • Various Password-authenticated key agreement
    Password-authenticated key agreement

    In cryptography, a password-authenticated key agreement method is an interactive method for two or more parties to establish cryptographic keys based on one or more party's knowledge of a password....
     techniques
  • Paillier cryptosystem
    Paillier cryptosystem

    The Paillier cryptosystem, named after and invented by Pascal Paillier in 1999, is a probabilistic asymmetric algorithm for public key cryptography....
  • 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 (PKCS#1
    PKCS1

    In cryptography, PKCS#1 is the first of a family of standards called PKCS, published by RSA Laboratories. It provides the basic definitions of and recommendations for implementing the RSA algorithm for public-key cryptography....
    )
  • Cramer-Shoup
    Cramer-Shoup cryptosystem

    The Cramer-Shoup system is an asymmetric key encryption algorithm, and was the first efficient scheme proven to be secure against adaptive chosen ciphertext attack using standard cryptographic assumptions....
     encryption


Examples of notable yet insecure asymmetric key algorithms include:
  • Merkle-Hellman
    Merkle-Hellman

    Merkle-Hellman was one of the earliest public key cryptography and was invented by Ralph Merkle and Martin Hellman in 1978. Although its ideas are elegant, and far simpler than RSA, it has been broken....
     the 'knapsack' algorithms


Examples of protocols using asymmetric key algorithms include:
  • GPG
    GNU Privacy Guard

    GNU Privacy Guard is a free software alternative to the Pretty Good Privacy suite of cryptography software. GnuPG is compliant with RFC 4880, which is the current Internet Engineering Task Force standards track specification of OpenPGP....
    , an implementation of OpenPGP
  • IKE
    Ike

    IKE or Ike can refer to:...
  • PGP
    Pretty Good Privacy

    Pretty Good Privacy is a computer program that provides cryptographic privacy and authentication. PGP is often used for signing, encrypting and decrypting e-mails to increase the security of e-mail communications....
  • ZRTP
    ZRTP

    ZRTP is a key-agreement protocol to negotiate the cryptographic keys to encrypt VoIP phone calls. ZRTP describes a method of Diffie-Hellman key exchange for Secure Real-time Transport Protocol ....
    , a secure VoIP protocol
  • Secure Socket Layer, now implemented as an IETF standard TLS
    Transport Layer Security

    Transport Layer Security and its predecessor, Secure Sockets Layer , are cryptographic protocols that provide security and data integrity for communications over Internet Protocol Suite networks such as the Internet....
  • SILC
    SILC (protocol)

    SILC is a protocol that provides secure synchronous conferencing services over the Internet....
  • SSH
    Secure Shell

    Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices. Used primarily on Linux and Unix based systems to access shell accounts, SSH was designed as a replacement for TELNET and other Computer security remote Shell s, which send information, notably passwords, in...


See also


External links

  • , Charles Babbage Institute
    Charles Babbage Institute

    The Charles Babbage Institute is a research center at the University of Minnesota specializing in the history of information technology, particularly the history since 1935 of digital computing, programming/software, and computer networking....
    , University of Minnesota. Leading cryptography scholar Martin Hellman
    Martin Hellman

    Martin Edward Hellman is a cryptology, famous for his invention of public key cryptography in cooperation with Whitfield Diffie and Ralph Merkle....
     discusses the circumstances and fundamental insights of his invention of public key cryptography with collaborators Whitfield Diffie
    Whitfield Diffie

    Bailey Whitfield 'Whit' Diffie is a United States cryptographer and one of the pioneers of public-key cryptography.He received a Bachelor of Science degree in mathematics from the Massachusetts Institute of Technology in 1965....
     and Ralph Merkle
    Ralph Merkle

    Ralph C. Merkle is a pioneer in public key cryptography, and more recently a researcher and speaker on molecular nanotechnology and cryonics. Merkle appears in the science fiction novel The Diamond Age, as one of the heroes of the world where nanotechnology is ubiquitous....
     at Stanford University in the mid-1970s.