What is Public Key Encryption
Encryption is the conversion of data into a secret code which is called cipher text that cannot be easily understood by any unauthorized person. It is one of the most effective ways to achieve data security. A file after passing through encryption process is called an encrypted file and to read this encrypted file, the user must have access to a secret key or password that enables the user to decrypt it. (Decryption is the process of converting encrypted data back into its original form, so it can be understood). The simple or unencrypted data is called plain text.
Public key encryption is the process where two keys are used. One key is to encrypt the data, and the other one is to decrypt it. The sender asks the receiver for the encryption key, and then encrypts the message using that key, and sends the encrypted message to the receiver. Only the receiver can then decrypt the message – even the sender cannot read the encrypted message.
It means that the public key encryption involves using separate keys for encryption and decryption and for that the sender and the recipient must have the same software. The recipient makes a pair of public and private keys. Public key is the key which can be used by anyone to encrypt the message and these keys are freely distributed as these are only used to encrypt the data. The private key is only used by the recipient in decrypting the data or message which is received and these keys are never distributed as the messages which these keys decrypt are usually confidential and are limited to certain persons only.
Different algorithms are used to encrypt the public key. Public key encryption algorithms are incredibly slow and it is not feasible to use them to encrypt large amounts of data. However, these two i.e. public key and private key encryption can be used together. In that case, public key algorithm is used to encrypt a randomly generated encryption key and the random key is used to encrypt the actual message using a private key algorithm.
Without knowledge of the key (either public or private), it is very difficult for the receiver to decrypt the cipher text so that it becomes readable.