What is Encryption
Encryption simply implies applying key to your plain messages in a clever way to produce an unbreakable cipher. On the other hand, decryption implies taking encrypted text and changing it back to your plain messages. Now, we'll try to understand some terms used in the above definition with the help of the following story.
Ram, Sita and Crypto!¶
Let's go back in the ancient times and see how the use of cryptography would had made a difference then.
Ram and Sita wanted to have a secure communication between them while Sita was in Lanka. The only way for exchanging messages between them was using pigeons as message carriers. But the evil Ravana got hold of the pigeons and read all their messages.
So now both of them decided to change their message using a secret code so that even if Ravana got hold of their messages he would not understand them.This way of converting simple messages to a secretive form is known as encryption. A message that is converted to hidden form is known as the plaintext. The hidden form of a message is known as the ciphertext. The secret code that is used to convert messages to a secret form is called as cipher.
Now suppose Ravana is intelligent enough to understand their secret way of converting messages and somehow cracks the secret messages. So now the couple will have to think of sending their messages to each other in more secured manner.
Let’s assume that the couple had a magical box which only opened with a specific key which both of them always had with them (as dangers come without telling). So now Ram planned to lock their letters in this magical box and the pigeon would carry it to Sita. At the other end, Sita would open it with the help of the key which she has. So Ravana again would have to figure out some another way to break the secret lock and get hold of their letters.
A key, in cryptography, is a sequence of bits used by a cryptographic algorithm (or a kind of a cipher) to transform plain text into cipher text or vice versa. A key is usually not shared publicly. A longer key ensures a secure encryption. We will see this in the next section.
Well, in real life scenarios, our everyday communication over Internet, phone calls or any other media takes place in a similar way as explained in the above story. It is done in such a way such that no intruder can understand them or get back the original messages.