December 22nd, 2022
Cryptography is the process used to protect data during communication and transmission. This is another growing field as we learn how to protect so much new data and information.
The 2 essential functions of cryptography are encryption and decryption. In this article, we will mostly discuss cryptography in terms of messages and data sent over the internet.
Generally, the message is first transformed into an unrecognizable encrypted message. At the receiving end, the message is then decrypted to its original form. This is a simplified version but this is how most simple messages are sent on servers like Whatsapp where only you and the person you're messaging see the exact message. A WhatsApp server technician and others can only see gibberish and not the real message.
Let's learn more about the specifics of encryption and decryption.
When a message is sent it is converted to unreadable text locked by a key. Then it must be opened by a unique algorithm to be read. In Whatsapp, the unique algorithm is on the receiving end’s phone where it automatically decrypts the message so you can read it properly. However, since this key is only there on your device nobody at Whatsapp can view the message the way you and the sender see it. The process is somewhat like this:
As you can see, there are various types of keys involved in these processes. These keys might be involved in encryption or decryption depending on the type of keys. Only someone with the correct key can unlock the information which was locked by the encryption key.
Before we dive into the different types of keys, let’s look at some of the benefits of encryption.
Helps you protect confidential login credentials.
Ensures that the document or file sent has not been altered.
It also prevents plagiarism and protects your IP (unique number for your internet or device)
Types of Keys:
Symmetric Key: These keys are encryption algorithms which use the same cryptographic keys for encryption of plain text and decryption of the ciphertext (encrypted messages)
Asymmetric Key: This encryption uses two pairs of keys for encryption. The public key is available to anyone while the secret key is only available to the receiver of the message. (Whatsapp uses something similar to this, as shown in figure 2)
Public Key: This is an encryption system which is based on two pairs of keys. Public keys are used to encrypt messages for a receiver.
Private Key: This might be part of a public/private asymmetric key pair. It can be used in asymmetric encryption to decrypt data. If used in symmetric algorithms, the same key can be used to encrypt and decrypt the data.
Pre-shared Key: This is a shared secret which was earlier shared between the two parties in a secured channel before it is used.