3Public key cryptography

The public key cryptography evolved to address the security issues posed by symmetric cryptography. This method solves the problem of secret key cryptography by using two keys instead of a single key. Public key cryptography uses a pair of keys. In this process, one key is used for encryption, and the other key is used for decryption.

This process is known as public key cryptography or asymmetric cryptography because both the keys are required to complete the process. These two keys are collectively known as the key pair. In asymmetric cryptography, one of the keys is freely distributable. This key is called the public key. Hence, this method of encryption is also called public key encryption. The second key is the secret or private key. The private key is not distributable. This key, like its name suggests, must remain confidential to its respective owner. Because the key pair is mathematically related, whatever is encrypted with a public key may only be decrypted by its corresponding private key and vice versa. It is important to point out that it is virtually impossible to deduce the private key from the knowledge of the public key.

There is a basic flaw in public-key encryption: given enough time and computing power, it will be possible figure out the secret key from the public key and decrypt the message. For this reason public-key encryption relies on keys that are really big, usually the keys are made up of 1024 or 2048 bits. The longer the used keys (that is, the more bits they have), the tougher the encryption.

The algorithms for public key cryptography are based on mathematical problems that currently admit no efficient solution. It is computationally easy for a user to generate a public and private key-pair and to use it for encryption and decryption. These complex mathematical problems make it extremely difficult for a properly generated private key to be determined based only on the knowledge of the public key. The security of public key cryptography is ensured in this way; the strength of the algorithm lies in such difficulty. Thus the public key may be published without compromising security. Security depends only on keeping the private key private. Public key algorithms, unlike symmetric key algorithms, do not require a secure for the initial exchange of one (or more) secret keys between the parties.

Two common uses of public key cryptography are public key encryption and digital signatures. Public key encryption is when a secret message is encrypted using a public key but only the person who possesses the secret key can decode and read the secret message. Digital signature is a message that is signed with a sender's private key and can be verified by anyone with access to the sender's public key. Both of these applications are examples of confidentiality and authenticity of public key encryption.

Public key algorithms are slow compared with symmetric ones. Often, in order to solve this problem, public key is used to distribute the symmetric key. This symmetric key will be used to cipher the user information.

While key management is much simpler in public key cryptography compared with symmetric cryptography, there is a common misconception that key management is trivial with public key cryptography. Moreover, some users mistakenly believe that public key cryptography encryption is more secure from cryptanalysis than symmetric encryption. In fact the security of any system depends on key length and the computational work involved in breaking the cipher.

The most common public key algorithm is RSA.