Difference between TLS, SSL and HTTPS
Tags: backenddevelopment, datasecurity, tls
Published: 2023-09-15 17:19:24

**Their differences, best use cases and how they protect our websites**

> What is HTTPS

We may be familiar with HTTP (Hypertext Transfer Protocol) as a request that browsers or internet devices use to communicate with data on the internet and load webpages.

HTTPS (Hypertext Transfer Protocol Secure) is a more secure way of communication between internet devices and data. Any website that handles sensitive data, such as login credentials and other personal information, should use **HTTPS**. Websites that are not secure are marked as 'Not Secure,' alerting users to exercise caution when sending information to such websites.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c1rpdphfx2g4dcami78t.png)

This communication is secured by digital certificates, which are typically obtained from security service providers known as Transport Layer Security (TLS), formerly known as Secure Sockets Layer (SSL).

TLS employs a cryptographic method called asymmetric encryption, which utilizes two keys: the public key and the private key.

The private key is owned by the website owner and resides on the web server. It is used to decrypt information that has been encrypted with the public key. The public key is visible to all individuals interacting with the website legally, and only the private key can decrypt information encrypted by the public key. Both keys work in tandem to maintain the security of information on the website.


> Public key encrypts, private key decrypts!

**How HTTPS works**
Under the hood, when a user opens a webpage, the webpage will send its SSL certificate, which contains the public key necessary to initiate a secure session. The two computers, the client and the server, then undergo a process called an SSL/TLS handshake, a series of back-and-forth communications used to establish a secure connection.  

1. Specify the version of TLS (TLS 1.0, 1.2, 1.3, etc.) they will use.
2. Decide on the cipher suites to be used.
3. Authenticate the server's identity using the server's public key and the SSL certificate authority's digital signature.
4. Generate session keys to enable symmetric encryption after the handshake is completed.


**Importance of HTTPS**
Since data transferred through the internet is basically in text i.e. _Hyper-text protocol_, HTTPS prevents websites from having their information broadcast in a way that’s easily viewed by anyone snooping on the network.

HTTPS also prevents ISP (Internet service providers) from adding or displaying unnecessary content (Ads) to the users.

**How to get TLS/SSL Certificates?**
There are handful of popular SSL certificate vendors like [Hostinger](https://www.hostinger.com/free-ssl-certificate), [NameCheap](https://www.googleadservices.com/pagead/aclk?sa=L&ai=DChcSEwiK3-zKj62BAxVa4u0KHaBYAgcYABAAGgJkZw&ae=2&gclid=CjwKCAjwgZCoBhBnEiwAz35Rwno6aQNCTNjRlSwTCbtsOSAFbMdMUOZYGGbnL9nl9gOEbyNI6cHO5xoCIfEQAvD_BwE&ohost=www.google.com&cid=CAESa-D2lGCaxkXE1OvBztPLvegixuG4IPXNf8s4BUSeEySiOoB0tv56lEYU01kJ1jJejK2V_ZPnMMB362VVXiyvXlHgA-EBhc0skkwpSvHw_zkpAFcpf8d1_c4WH8kKocHgvAtnX0KGM8VOw1QR&sig=AOD64_1bpaGRImjJ6jisNow3YU_XFRnyVA&q&adurl&ved=2ahUKEwiw9-bKj62BAxU1YEEAHecsAIMQ0Qx6BAgNEAE), [Domain](https://www.googleadservices.com/pagead/aclk?sa=L&ai=DChcSEwi83KPgj62BAxU3iVAGHY1zCRwYABACGgJkZw&ae=2&gclid=CjwKCAjwgZCoBhBnEiwAz35Rwr_YxM6hBWJN-AvrL_bZo-MxPhXrXMEi2t8fE8y5ixff55sU_py1vhoC91EQAvD_BwE&ohost=www.google.com&cid=CAESa-D2mENlhFMzWY2KtQiVjHDhyw5O62QXX3nTAg4eI1DOcIZD1QNHoSLhLIaQm_-P18l4KB30tNFOcXffTwLUr0vzXW9aWr-oxB835j3Axm8ReF32GgIvtPdumrQzzDGhh3O8VkqRoMlii4HC&sig=AOD64_2ScIw23VLBTt59H5g7NCqLyWw5qw&q&adurl&ved=2ahUKEwiO5Z7gj62BAxXKWEEAHYA_BRsQ0Qx6BAgIEAE) to name a few and they offer affordable prices. 

Hopefully you learned about SSL certificates and how important they are for your websites. To learn more about cryptography or asymmetric encryption, pls check out my [GitHub repo](https://github.com/BigVeezus/cryptography-101) and leave a star. Thank you