How the SSL works in 5 steps

What is SSL?

A Secure Socket Layer ( SSL ) is a bridge that helps Web-Browser or
Web-Client to securely communicate with the Web-Server.

It means the third person will not be able to understand what data is being sent between the 2 parties because the data will be in encrypted form.

SSL real-world example

Suppose we want to access Gmail. So whenever we type www.gmail.com, we will see a lock on the address bar which indicates the site is secured and we will have safe communication with the Gmail server.

If we check on the top left of the address bar it says HTTPS instead of HTTP.

This extra “s” means “secure”.

Thus HTTPS gives an assurance that whatever data we are sending to the Gmail server will be in an encrypted format and no third person can understand it.

How the SSL works in 5 steps?

We will try to understand how the SSL works and what happens in the background when we trigger www.gmail.com in 5 simple steps :

1 ) We type in https://www.gmail.com and click ENTER it means we are requesting a Gmail server for a secured connection between our Browser and the Gmail server.

2 ) Gmail server sends back a public key with an SSL Certificate to our browser.

Note* Gmail server creates a pair of a private key and public key before the communication even starts. Out of the 2 keys, the public key will be sent to the Web-Browser.

What is a public key?

It is a numerical value that helps to encrypt plain data using some encryption algorithm. The public key along with the Encryption algorithm encrypts the plain text.

What is an SSL Certificate?

It is a certificate issued by a trusted third party that verifies and authenticates the Web-Server and its public Key.

Note * Gmail server has sent its public Key with a Digitally Signed SSL certificate to the Browser.

3 ) Once Browser receives the SSL Certificate, the browser verifies the Digital Signature of the Issuer to make sure the Webserver is trustable.

Note * Certificate authority generates a digital signature for a Web-Server using its own private key. So we require a public key of the Certificate authority to verify the signature.

An interesting fact everyone should know is that our browser stores the public keys of many major Certificate authorities. Hence using that public Key, the Signature can be verified. Now as the Signature is verified browser can trust the Web-Server.

4 ) Now our browser will create a secret key. Our browser has to share this secret key with the Web-Server. Our browser cannot send this secret key as plain text. So our browser encrypts the secret key using the public key which was sent by Web-Server earlier.

5 ) When the Web-Server receives the encrypted secret key, it will make use of its private key to decrypt it. Now the Web-Server gets the secret key. From now on all the data between the Web-Server and the Browser will be encrypted and decrypted using the same secret key.

FAQ

is SSL an encryption technique?

Yes, SSL is encryption and verification ( signature ).
SSL is of 2 types: 1-way SSL and 2-way SSL.
1-way SSL verifies the server whereas in 2-way SSL both the server and client verify each other.

In this article, we have covered How SSL works. I hope you found this article interesting and valuable. Please share this article with your friends and help me grow. If you are having any concerns or questions about this article please comment below. If you want to get in touch with me please visit the Contact Me page and send me an email.

Leave a Comment