Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Aptitude
  • Engineering Mathematics
  • Discrete Mathematics
  • Operating System
  • DBMS
  • Computer Networks
  • Digital Logic and Design
  • C Programming
  • Data Structures
  • Algorithms
  • Theory of Computation
  • Compiler Design
  • Computer Org and Architecture
Open In App
Next Article:
What is SSL/TLS Handshake?
Next article icon

What is SSL/TLS Handshake?

Last Updated : 12 Aug, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

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 security protocols or cryptographic protocols to deliver authentication and data security.

What is Secure Socket Layer(SSL)?

It provides protection to the data that are aligned between the web browser and server. SSL encrypts the link between a web server and a browser which ensures that all data passed between them stay private and separate from attack.

Secure Socket Layer Protocols:

  • SSL record protocol
  • Handshake protocol
  • Change-cipher spec protocol
  • Alert protocol

Transport Layer Securities (TLS)

Transport Layer Securities (TLS) are aimed to give security at the transport layer. TLS was concluded from a security protocol called Secure Socket Layer (SSL). TLS ensures that no third affair may overhear or tampers with any communication.

When Does a TLS Handshake Occur?

In the startup of a protected relationship between a customer (such as an internet browser) and an expert organization (like a website), there is a TLS handshake. A secret exchange of greetings is like a handshake between two people, but in this case, it is where they agree on what information they want to keep safe before sharing anything. This process involves agreeing on ECMs through which they will communicate safely through the division of pairs while confirming identity integrity Through the use of encryption keys. The action of ensuring privacy besides safety measures for information being conveyed is also very significant.

What Happens During a TLS Handshake?

A secure connection is established by the client and server during TLS handshake. Here are the main steps :

​C​lientHello : ​This is where the client begins its handshake with a "hello" message sent to a server which includes supported encryption methods as well as other parameters.

​ServerHello : In response, the server also sends its own hello message selecting an encryption method before sending over its digital certificate for authentication.

Key Exchange : In this step, both client and server agree on a shared symmetric key that will be used for client data encryption/decryption during their session. It may involve Diffie-Hellman key exchange or other ways.

​Authentication : To prove its identity, the server presents a digital certificate. Then, it is up to the client to verify if such certificate is from a trusted source.

Sessio​n Key Generation : Both sides are able to use these exchanged keys in order to generate session keys that will be used for encryption/decryption of data while they are in session.

​Finished : To confirm that the handshake went through successfully and that encryption is properly established both parties send 'finished' message.

After finishing these steps, they create secure connection which allows safe transfer of information between client and server at all times.

What is the difference between SSL and TLS protocols?

There are always security issues between client and host so Secure Socket Layer and Transport Layer Security are the cryptographic protocols used to provide authentication and data security between the web browser and web server and it encrypts the communication between a client and server, mainly between web browsers and web applications. 

There are many differences between SSL and TLS protocols. 

Secure Socket Protocol supports Fortezza Algorithms where Transport layer Protocol do not, also the versions of both protocols are very different SSL is version 3.0 and TLS is version 1.0 protocol.

The difference between SSL and TLS is that. In SSL the Message digest is used to create a master secret and provides the security services in communication. which are Authentication and confidentiality. While in TLS a randomly generated Pseudo function is used to create a master secret which provides higher security as compared to SSL.

What is SSL/TLS Handshake?

The SSL and TLS handshake establishes a system for SSL/TLS clients and servers to start communication between them in other words it is a negotiation between two parties on a network. Handshake Protocol is used to establish sessions. This protocol allows the client and server to verify each other by transferring a series of messages to each distance. Handshake protocol uses four phases to finalize its circle.

Steps enable the SSL or TLS client and server to communicate with each other:

SSL/TLS Handshake
  • Phase-1: Deciding which version of the Protocol to use. The system decides which protocol to use. Client and Server exchange hello-packets with each other to confirm. In this IP session, cipher suite, and Agree on which version of the protocol to use. 
  • Phase-2: Server sends his certificate and Server-key-exchange. The server end phase-2 by exchanging the hello packet. 
  • Phase-3: Verification, in this phase, the Client replies to the server by sending his certificate and Client-exchange-key. 
  • Phase-4: In this phase, the Change Cipher suite is passed and all the verifications and security checks are done after this Handshake Protocol ends. 

What is Cipher Suite?

A Cipher suite is a set of encryption rules that decides how the TLS handshake works. TLS/SSL protocols use some algorithms from a cipher suite to generate keys and encrypt information so that the communication is end-to-end encrypted.

A cipher Suite specifies one algorithm for each of the following tasks

cipher suite
  • Key Exchange Algorithms: This algorithm protects the information required to create shared keys.
  • Bulk Encryption Algorithms: Bulk encryption algorithms are those algorithms that encrypt the messages exchanged between clients and servers.
  • Message Authentication Algorithms: Message authentication algorithms generate messages and signatures that ensure the Combination of a message.

Conclusion

SSL/TLS handshake lets client and server follow a process to form a secure connection. Firstly, it involves the client sending its "client hello" message to the server after which the server replies with its own "server hello" message that selects encryption algorithms. Then, the server sends its digital certificate to the client for verification purposes. The client generates a pre-master secret that is encrypted using the public key of the server before sending it back. With this secret both parties come up with session keys they use during secure communication. Lastly, in order to approve if this handshake has been finalized or not, clients and servers exchange their "finished" messages. This way they can be sure that they are communicating securely through encryption.


Next Article
What is SSL/TLS Handshake?

S

shadit13064
Improve
Article Tags :
  • Computer Subject
  • Computer Networks

Similar Reads

    Transport Layer Security (TLS) Handshake
    TLS is a data privacy and security protocol implemented for secure communication over internet. It usually encrypts communication between server and clients. TLS is a successor to Secure Socket Layer (SSL) protocol. SSL v3.0 and TLS v1.0 were very similar but it was replaced with TLS. You can also r
    2 min read
    What is Stunnel Tool?
    Stunnel is a very versatile open-source tool designed to help secure web applications. It encrypts traffic, proxies connections, and redirects web applications so that they can run securely on a computer with untrusted network connections. Stunnel can also inspect every packet within encrypted tunne
    4 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 communicatin
    3 min read
    How to use SSL/TLS with Node.js ?
    TLS/SSL is used for establishing secure connections over the internet. Today, most websites use HTTPS to communicate with clients. HTTPS is basically HTTP running over TLS/SSL. Web clients like browsers alert users about websites that do not use HTTPS since such websites are vulnerable to cyber-atta
    5 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
    5 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences