blog posts

What is HTTPS? Getting to know HTTPS

When talking about HTTPS and SSL, some users ask the question, what is HTTPS? And how does it work? In fact, the question that arises for most users is what happens in the secure HTTPS protocol, which is said to increase the security of websites? In order to get familiar with how HTTPS works, you should know that this is a cryptographic issue, which is a complex issue in the field of security. And for a better understanding of the issue, you can get acquainted with the concept and how HTTPS works with a simple example that has been around for centuries and most of us have experienced it.

In this article from Hostfa’s knowledge base, I am going to discuss how the secure HTTPS protocol works using the carrier pigeon method. 😀 I will also introduce a film based on the life story of a famous person who, if this person could have lived longer, surely the world of technology and computers would have been several years ahead.

What is HTTPS? | Getting to know HTTPS by carrier pigeon method

The operation of the secure HTTPS protocol is exactly the same as what happens to the carrier pigeon, and if you fully focus on this issue, you can familiarize yourself with the operation of this protocol. But before I talk about pigeons, you should know that every activity you do on the internet is done as a message sent and received. When you are reading this article, or you want to buy goods online, or you want to send a photo to your friends using messaging apps, all these things are done on the server platform by sending and receiving messages.

Sending messages over the HTTP platform

If Sina intends to send a message to Peyman, after preparing the letter, he ties the letter to the feet of the pigeon and after giving the pigeon enough water and food, he sends it to Peyman. Finally, the carrier pigeon after traveling long distances from the surface of the land and the sea reaches the presence of Peyman Mashraf and the matter of sending the message ends happily and goes away. If Peyman has an answer, he will send it to Sina in the same way.

But in your opinion, if something happens to the pigeon and someone named Mr. Ryan, who has a lot of information about code reading, catches this pigeon? Surely, after catching the pigeon, Mr. Ryan can read the letter and find out about the matter, which even on a wider level, he is able to manipulate the message and send the pigeon to the agreement. This method is exactly the same way HTTP works, that anyone can listen and read messages on the server platform.

Hiding messages

Sina and Peyman, knowing each other, do not expect such manipulated answers at all. So, if they are a little smart, they know that this message is manipulated, so they try to send their messages through hiding and encryption tricks. For example, they choose symmetric key cryptography, in this method, instead of writing the main letters of a message, all the letters of the text are shifted to the previous three letters and sent. For example, instead of writing the letter D, they use the letter A. Or instead of writing the letter E, they use the letter B. So in this case, if Sina sends a secret message to the agreement, it should be written in the form of pbzobq jbppxdb in the text of the message and tied to the pigeon’s foot. This type of encryption used for message text Caesar cipher . is known as

So, in this case, when Mr. Ryan manages to catch a pigeon again on the way, he sees the meaningless message pbzobq jbppxdb . Until he learns how to encrypt and hide the messages, he does not know what message Sina and Peyman sent to each other. they change So, until the sender and the receiver are not in communication with each other and they do not agree on the way of coding that is done on the messages, they will not be able to read the message. Therefore, Sina and Peyman must have coordinated with this message encryption method.

Send a message as a package

Because Sina and Peyman have not met each other before and they are not compatible with each other’s encryption method, so they think of a solution and the solution that comes to their mind is as follows.

  1. Sina sends a carrier pigeon for the agreement, which does not carry any letter or message.
  2. After the arrival of the pigeon, Peyman ties a box with an open lock to the pigeon’s leg instead of a letter and sends it to Sina, while the key to this lock is only in Peyman’s hand.
  3. Sina receives the pigeon and the box with an open lock, and after writing her message, she puts it inside the box and locks it.
  4. Peyman receives the pigeon along with the letter that is locked inside the box, and because he only has the key to this box, he opens the box and sees the message.

At this stage, Mr. Ryan failed and because he does not have the key to these boxes, he cannot open the box and read the messages. Now, the same steps that started from Sina and ended with receiving the letter by Peyman after 4 steps are done in the opposite way, and both parties can send messages to each other with the special key of the lock they have.

This method of sending encrypted messages is called asymmetric key cryptography. This method is called asymmetric because if you encrypt a message (lock the box), you can no longer decrypt it (unlock the box). In this case, the public key box is called the public key, and the key that opens it is called the private   key.

Is the box reliable?

If you pay attention, when Peyman tied a box with an open lock to a pigeon’s foot instead of a letter and sent it to Sina, how should Sina know that Peyman sent this received box? In this case, with this idea, Mr. Ryan can put his own box instead of the one Peyman sent and receive messages with Sina, which Sina is completely unaware of.