paint-brush
Symmetric and Asymmetric Encryptionby@rafaelcpalmeida
29,300 reads
29,300 reads

Symmetric and Asymmetric Encryption

by Rafael AlmeidaDecember 9th, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Nowadays we hear the word <strong>encryption</strong> in almost everywhere. But what is encryption? Well, according to <a href="https://en.wikipedia.org/wiki/Encryption" target="_blank">Wikipedia</a>, encryption is:
featured image - Symmetric and Asymmetric Encryption
Rafael Almeida HackerNoon profile picture

Photo by Markus Spiske on Unsplash

Nowadays we hear the word encryption in almost everywhere. But what is encryption? Well, according to Wikipedia, encryption is:

In cryptography, encryption is the process of encoding a message or information in such a way that only authorized parties can access it and those who are not authorized cannot.

In another word, this means that encryption is a method or mechanism that enables you to hide your message or data in a way that only the authorized people can access it. For instance: you want to send a message to your granny saying you love her but you don’t anyone else to read the message. In this article, I’m going to write, in an abstract and simple way, about two encryption methods: symmetric encryption and asymmetric encryption.

Symmetric encryption

In symmetric encryption, you use the same key for both encryption and decryption of your data or message. Taking the example I gave above, sending a secure message to your granny, both of you need to have the same key in order to encrypt and decrypt the messages that you may exchange with each other.

Have a look at the following image:

Asymmetric encryption

Asymmetric encryption is quite the opposite to the symmetric encryption as it uses not one key but a pair of keys: a private one and a public one. One might ask:

Why do you need two keys?

You use one to encrypt your data, which is called public key, and the other to decrypt the encrypted message, which is called the private key.

When you encrypt your message using, let’s say, your granny’s public key, that same message can only be decrypted using her private key.

Private keys

Your private key, as the name states, is yours and it must be kept private, as it’s the only key that can decrypt any messaged that was encrypted with your public key.

Public keys

Public keys as, yet again, the name states, are public and thus no security is required because of it should publicly available and can be passed over the internet. The public key is used to encrypt a message that can only be decrypted using, as I written above, its private counterpart.

In order to understand what I’ve written above take a look at the image below:

In this article, I’ve covered the most basics of symmetric and asymmetric encryption in a very simple and abstract way. Please let me know if you have any comments or doubts that you want to share.

Cheers,