The Wayback Machine - https://web.archive.org/web/20241122140106/https://www.geeksforgeeks.org/working-of-ssl/
Open In App

Working of SSL

Last Updated : 06 Oct, 2023
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

With the ever-increasing reliance on the internet for conversation and online transactions, making sure the safety of our data has become more important than ever. One technology that plays a crucial role in safeguarding our information is SSL, which stands for Secure Sockets Layer. This article will delve into the workings of SSL and explore the way it presents a stable channel between web browsers and servers. Knowing how SSL operates, you'll gain valuable insight into the measures taken to guard your sensitive facts online.

What is SSL?

SSL stands for Secure Sockets Layer, and it works as a digital handshake between your browser and the website you are visiting. It ensures that any data transmitted between the two parties remains private and encrypted.

Secure Sockets Layer (SSL) is an encryption security protocol. It provides security to the data that is transferred between web browser and server. SSL encrypts the link between a web server and a browser which ensures that all data passed between them remain private and free from attack.

SSL is an Internet security protocol that utilizes encryption. Originally created by Netscape in 1995, its main objective is to guarantee privacy, authentication, and data integrity in online communications. SSL paved the way for the current TLS encryption that we rely on today. To identify a website that employs SSL/TLS, simply look for HTTPS in its URL instead of the traditional HTTP.

How Does SSL/TLS Work?

When you visit a website with SSL enabled, your browser requests a secure connection from the web server. The server responds by sending its public key certificate to authenticate itself. Your browser then generates a random session key to encrypt data before sending it over the network. This encrypted data can only be decrypted by the web server using its private key, an exclusive secret code known only to itself. With this complex dance of keys and encryption algorithms, SSL creates an impenetrable armor around your online interactions.

One vital aspect of SSL is trust. In order for it to function properly, web browsers need to trust the identity of websites they communicate with through authentication certificates issued by trusted third-party organizations called Certificate Authorities (CAs). This trust ensures that when you see that little padlock symbol or https:// in your browser's address bar, it means the website has been authenticated by a trusted CA and all communications are secured using SSL/TLS protocols.

  • In order to guarantee a superior level of privacy, SSL employs encryption techniques for data transmitted online. As a result, any individual attempting to intercept this data will only perceive an unintelligible amalgamation of characters that is nearly impossible to unravel.
  • The SSL protocol establishes a trustworthy connection between two devices by initiating an authentication process called a handshake, guaranteeing that both devices are genuinely representing their claimed identities.
  • In order to ensure the integrity of data, SSL also employs digital signatures to verify that the data remains unaltered until it reaches its intended recipient.

Difference Between TLS and SSL

SSL has undergone multiple iterations, with each subsequent version being more secure than its predecessor. In 1999, SSL was enhanced and transformed into TLS.

The original security protocol for HTTP was SSL, which has since been replaced by TLS. Although the SSL name is still commonly used, SSL handshakes are now referred to as TLS handshakes.

TLS Handshake

TLS Handshake
TLS Handshake

TLS is a robust encryption and authentication protocol specifically developed to enhance the security of Internet communications. The initiation of a communication session that employs TLS is marked by a TLS handshake. This crucial process involves an exchange of messages between the two parties involved, serving to acknowledge and verify each other's identities, determine the cryptographic algorithms to be utilized, and establish session keys. The significance of TLS handshakes cannot be overstated as they form the bedrock of HTTPS functionality.

When is a TLS handshake initiated?

Whenever a user accesses a website using HTTPS, a TLS handshake occurs as the browser initiates communication with the website's origin server. Additionally, any other HTTPS communications such as API calls and DNS over HTTPS queries also trigger a TLS handshake. These handshakes take place after establishing a TCP connection through a TCP handshake.

Steps In TLS Handshake

During a TLS handshake, a client and server exchange datagrams or messages to establish a secure connection. This process involves multiple steps as the necessary information is exchanged between the two parties, enabling further communication.

The specific sequence of actions in a TLS handshake may differ based on the type of key exchange algorithm employed and the cipher suites supported by both parties. The RSA key exchange algorithm, although regarded as insecure at present, was utilized in earlier versions of TLS prior to 1.3. Here's basically how it goes:

  • The 'client hello' message: The client commences the handshake process by transmitting a "hello" message to the server. This message will contain information regarding the TLS version supported by the client, the cipher suites it can utilize, as well as a string of randomly generated bytes referred to as the client random.
  • The 'server hello' message: The server responds to the client's hello message by sending a message that includes the server's SSL certificate, the cipher suite selected by the server, and the server random - an additional random string of bytes generated by the server.
  • Authentication: The client conducts a verification process of the server's SSL certificate through the certificate authority responsible for its issuance. This serves to validate the server's identity and ensure that the client is engaging with the legitimate owner of the domain.
  • The Premaster Secret: The client transmits an additional string of bytes, known as the premaster secret. This premaster secret is encrypted using the server's public key and can only be decrypted using the corresponding private key held by the server. (The client obtains the public key from the SSL certificate issued by the server.)
  • Private Key Used: The premaster secret is decrypted by the server.
  • Session Keys Created: Both the client and server utilize the client random, server random, and premaster secret to independently generate session keys. It is expected that they will obtain identical outcomes.
  • Client is ready: The client securely transmits a message labeled as "finished" by encrypting it with a session key.
  • Server is ready: The server securely dispatches a message with the label "finished", employing a session key for encryption.
  • Secure Symmetric Encryption Achieved: The handshake has been successfully executed, and further communication will be conducted using the session keys.

Every TLS handshake utilizes asymmetric cryptography, which involves the use of both public and private keys. However, it is not necessary for every handshake to involve the private key in the generation of session keys.

Handshake in TLS 1.3

TLS 1.3 excludes support for RSA, as well as other cipher suites and parameters that possess vulnerabilities to potential attacks. Additionally, it enhances the efficiency and security of the TLS handshake process, resulting in a faster and more secure TLS handshake.

The fundamental stages of a TLS 1.3 handshake are as follows:

  • Client hello: The client transmits a client hello message containing the protocol version, client random, and a roster of cipher suites. As TLS 1.3 no longer supports insecure cipher suites, the available options for cipher suites are significantly limited. Additionally, the client hello includes the parameters necessary for computing the premaster secret. Essentially, the client assumes it is aware of the server's preferred key exchange method (which is highly likely given the simplified list of cipher suites). This reduction in handshake length is a significant distinction between TLS 1.3 handshake and those of TLS 1.0, 1.1, and 2.0 handshakes.
  • Server Generates Master Secret: The server has successfully received the client random, client's parameters, and cipher suites. It already possesses the server random as it can generate it independently. Consequently, the server is now able to generate the master secret.
  • Server hello and "Finished": The server's hello message contains the server's certificate, digital signature, server random, and chosen cipher suite. In addition to this, it also sends a Finished message as it already possesses the master secret.
  • Final steps and client "Finished": The client conducts an authentication procedure by verifying the signature and certificate, generates a master secret, and then transmits a message labeled as Finished.
  • Secure Symmetric Encryption Achieved

0-RTT( Zero Round-Trip Time)

TLS 1.3 introduces a faster version of the TLS handshake that eliminates the need for any back-and-forth communication between client and server. In cases where the client and server have previously connected, they can generate an additional shared secret called the resumption main secret from their initial session. Additionally, during this initial session, the server provides the client with a session ticket. In subsequent sessions, the client can utilize this shared secret to securely transmit encrypted data to the server in its first message, along with presenting the session ticket. As a result, TLS seamlessly resumes between the client and server.

FAQs On SSL

Q.1: What is SSL?

Answer:

SSL stands for Secure Sockets Layer. It's a security protocol used to establish an encrypted connection between a web server and a web browser, ensuring that data exchanged between them remains private and secure.

Q.2: What is SSL certificate?

Answer:

An SSL certificate is a digital certificate that verifies the authenticity of a website's identity. It contains the website owner's public key and is used to initiate secure connections with browsers.

Q.3: How do I obtain an SSL certificate?

Answer:

You can get an SSL certificate from a trusted Certificate Authority (CA) or through your web hosting provider. The process typically involves generating a Certificate Signing Request (CSR) and following the CA's validation process.

Q.4: How often do SSL certificates expire?

Answer:

SSL certificates typically have a validity period of one to two years. After that, they must be renewed to maintain a secure connection.

Q.5: What happens when an SSL certificate expires?

Answer:

When an SSL certificate expires, the secure connection will no longer work, and visitors may see security warnings when accessing your site. It's essential to renew it promptly.

Q.6: Is SSL the same as TLS (Transport Layer Security)?

Answer:

SSL and TLS are closely related protocols, with TLS being the newer and more secure version. However, the term "SSL" is still commonly used to refer to both protocols.


Similar Reads

What is SSL Tunneling?
SSL Tunneling involves a client that requires an SSL connection to a backend service or secure server via a proxy server. This proxy server opens the connection between the client and the backend service and copies the data to both sides without any direct interference in the SSL connection. A diagram that demonstrates SSL Tunneling is given as fol
3 min read
Is SSL enough for Cloud Security?
Web sites are highly functional applications, which rely on a two-way flow of information, between server and browser. For example: from login, registration, financial transactions, personal information storage, browsing habits of users, to the insight of user’s social life, etc. All these are done to present users tailored specific contents. This
6 min read
Difference between IPSec and SSL
IPSec Protocol is an Internet Engineering Task Force standard suite of protocols between two communication points. It can also be defined as encrypted, decrypted, and authenticated packets. It generally uses cryptographic security services to protect communications. It can be seen that network-level peer and data origin authentication, data integri
2 min read
Difference between Kerberos and SSL
1. Kerberos : Kerberos is a computer-network authentication system which is used for the authentication of users information while logging into the system. Kerberos is based on symmetric key cryptography and depends on a reliable third party and works on the private key encryption during phases of authentication. Different versions of Kerberos are
4 min read
SSL Certificate
An SSL certificate is a Digital certificate that can be used for authentication of a website, and it creates a secure connection between client and web server. When a certificate is installed it makes the website from HTTP to HTTPS. Working process of SSL certificate : The SSL certificate enables the encryption of data which is then sent to the ser
2 min read
Need of IoT SSL Certificates and its Concerns
Internet of Things or IoT is one of the most prominent innovations in recent times that has enhanced industrial automation. Due to sensor-based advancements and innovations in cloud technologies, the data exchange between remote machines and on-site systems has improved. Similarly, the mobile era has boosted IoT technology in several ways with the
5 min read
How to Fix the SSL/TLS Handshake Failed Error?
Secure Sockets Layer (SSL): It is an internet security protocol based on encryption. It was developed in the year 1996 by Netscape to ensure privacy, authentication, and data integrity. It is the predecessor to TLS encryption. It provides a secure channel between two devices or machines communicating over the Internet or even an internal network. S
3 min read
SSL vs HTTPS - Which One is More Secure?
In this article, we will learn about the difference between HTTPS and SSL and then finally discuss which one of them is more reliable and secure. HTTPSHTTPS stands for Hypertext Transfer Protocol Secure. It is the basic Internet protocol used by websites on web browsers. HTTPS is the secure version of the HTTP protocol. It is encrypted so it keeps
3 min read
At Which Layer does SSL VPN Operates?
Answer : SSL VPN operates at the Transport Layer -Layer 4 of the OSI model.SSL VPN operates primarily at the Transport Layer - Layer 4 of the OSI model, but its implementation can extend to the Application Layer - Layer 7 as well. Transport Layer - Layer 4SSL VPN creates a secure and encrypted connection between the client and the server at this la
1 min read
Secure Socket Layer (SSL)
Secure Socket Layer (SSL) provides security to the data that is transferred between web browser and server. SSL encrypts the link between a web server and a browser which ensures that all data passed between them remain private and free from attack. In this article, we are going to discuss SSL in detail, its protocols, the silent features of SSL, a
11 min read
What is SSL/TLS Handshake?
The network is important for office, home, and business networks. The problem is at the utmost places wireless communication is used or we can say the wireless network is used which is effortlessly hackable and the router can be freely exploited if not secured rightly. So there's a need for security in the network. To fulfill this need we can use s
6 min read
Difference Between Secure Socket Layer (SSL) and Transport Layer Security (TLS)
SSL stands for Secure Socket Layer while TLS stands for Transport Layer Security. Both Secure Socket Layer and Transport Layer Security are the protocols used to provide security between web browsers and web servers. The main difference between Secure Socket Layer and Transport Layer Security is that, in SSL (Secure Socket Layer), the Message diges
4 min read
Difference between SSH and SSL
Although both SSH and SSL are cryptographically designed for the protection of data transmission, they have been put to serve different purposes and run in different contexts. An understanding of the differences between SSH and SSL will enable the use of the right tool in different scenarios to secure communication and protect data. This guide expl
6 min read
What is the full form of SSL?
SSL or Secure Sockets Layer is Netscape's protocol for creating an encrypted connection between a web server and a web browser. The term 'sockets' also refers to socket method of exchanging information between a client and a server program: either in a network or between processes on the same device. SSL is an industry standard that safely and reli
5 min read
Difference between Secure Socket Layer (SSL) and Secure Electronic Transaction (SET)
When it comes to online security, two important technologies are available i.e Secure Socket Layer (SSL) and Secure Electronic Transaction (SET). Both are designed to protect sensitive information during online transactions, but they serve different purposes and have distinct features. This article will cover both technology, their advantages and d
3 min read
Working Of Different layers in Computer Network
Ever wondered how different layers of network work together to send a message. Lets understand some basic terms before getting into details. A Default Gateway serves as an access point or IP router that a networked computer uses to send information to a computer in another network or the internet. Address Resolution Protocol (ARP) request is a prot
5 min read
Working and Types of Smart Card
Smart Card is a physical electronic authorization device used to control data accessing and data manipulation. It is basically plastic embedded with an integrated circuit. On the smart card, either a memory chip or a microprocessor is fabricated to store the data and connect with the system. Smart Card working process:Step-1: Smart card is inserted
4 min read
Privacy Enhanced Mail (PEM) and it's Working
Privacy Enhanced Mail (PEM) is an email security standard to provide secure electronic mail communication over the internet. Security of email messages has become extremely important nowadays. In order to deal with the security issues of emails the internet architecture board has adopted it. The PEM mainly provides the following services - Confiden
3 min read
Working of Web Request
To connect to a Web Page on Internet, following steps and protocols play a vital role : Computer connecting to a network cannot perform anything without an IP address. So, Dynamic Host Configuration Protocol (DHCP) runs on client computer to obtain IP address, address of first-hop router, and address of DNS server. Step-1: DHCP Server Discovery. He
4 min read
Working of Spanning Tree Protocol (STP)
Spanning Tree Protocol (STP) prevents the looping of the frame by putting the interfaces of the switch in either forwarding or blocking state. How Switch is able to decide which interface should be in forwarding or blocking state. We’ll learn the answer to this question in this article. Before we further proceed, we must know some terms. BID – It s
3 min read
Working of Dynamic Host Configuration Protocol
Dynamic Host Configuration Protocol (DHCP) is a network management protocol used in networks to dynamically assign IP addresses & other network configuration information like default gateway, mask, DNS server address etc. DHCP server automatically assigns IP address to various devices in network. This in turn reduces work of Network Administrat
3 min read
Working of Domain Name System (DNS) Server
Prerequisite - Domain Name System (DNS) in Application Layer In the world of networking, computers do not represent by names like humans do, they represent by numbers because that is how computers and other similar devices talk and identify with each other over a network, which is by using numbers such as IP addresses. Humans on the other hand are
7 min read
Working of Manets AODV Reactive Routing Protocol
In this article, we will discuss the overview of Manets AODV Reactive Routing Protocol and our main focus will be on Working of Manets AODV Reactive Routing Protocol. Also, will cover its routing types. Let's discuss it one by one. Prerequisite - Difference between manet and Vanet. Introduction : In this, we will discuss the overview of Manets AODV
3 min read
What is Syslog server and its working ?
All network devices such as routers, servers, firewalls, etc. create or prompt logs about statuses and the events that occur. For a small system tracking these logs is not a problem, the problem arises when we are dealing with big systems where tracking all these logs and information becomes challenging. To overcome this problem we use Syslog with
5 min read
Working of Email
The email refers to the electronic means of communication of sending and receiving messages over the Internet. Email is the most common form of communication nowadays. An email has significantly evolved over the past couple of years. There are now stronger sync and messaging features along with stronger security and spam-related features. Component
4 min read
Working of Explicit Congestion Notification
Explicit Congestion Notification (ECN) is an extension to the Internet Protocol and to the Transmission Control Protocol. It is defined in RFC 3168. It allows end-to-end notification of network congestion without dropping packets. ECN is an optional feature that may be used between two ECN - enabled endpoints when the underlying network infrastruct
6 min read
FTP Server Working and its Benefits
FTP is a group of standard protocols that allow interconnected or networked computers to transfer files and communicate over the internet. FTP server is a computer that offers access services and file storage on the internet, it handles all the data transmission between networked computers. FTP server waits for the client to connect to it and it us
8 min read
What is a Bios Shadow? Working and Fixing
The term BIOS shadow refers to a technique used in computing to increase the speed of the system's BIOS (Basic Input/Output System) operations. It enhances performance by copying ROM (random-access memory) contents to the RAM, so the CPU (central processing unit) may access the information quickly. The primary advantage of this method is the increa
6 min read
What is a Security Key? Working and Advantages
A security key is a physical USB drive that you may attach to your devices, such as desktops and laptops, to authenticate your identity and gain access to specified network services. What is a Security Key? A security key is used to authenticate and provide access to a network or service. It's a form of two-factor authentication (2FA) that enhances
6 min read
What is a Mount? Working and Types
Mounting is a basic concept in computing, particularly in operating systems. It involves making files and directories from one file system available to use within another file system. This process is essential for allowing us to interact effectively with our digital devices, providing the flexibility to access various files and folders seamlessly.
6 min read
Article Tags :
three90RightbarBannerImg