- Products & ServicesProducts & Services
- SolutionsSolutions
- PricingPricing
- CompanyCompany
- ResourcesResources
en
en
Trung Nguyen

We’ve heard a lot about HTTPS, and we use it every day. If you access a website from your browser and you see a little green padlock and the letters “https” in your address bar then congratulations, you are accessing this safely via HTTPS.

HTTPS is a combination of HTTP Protocol and an SSL/TLS encryption layer. When the server uses HTTPS, unless they make any mistake during setup, a 3rd party will not intercept and decrypt the data sent between client and server.
In this post, I will explain to you in detail how HTTPS works and the importance of the SSL handshake. I also referred to Rob Heaton’s blog, this is really an informative article to read.
I assume you know about HTTP Protocol before reading this post. If not, you should read RFC2616 before.
About SSL / TLS, it is a cryptographic protocol that provides communications security over a computer network. SSL standing for Secure Socket Layer was invented by Netscape. According to Wikipedia, version 1.0 was never publicly released; version 2.0 released in February 1995 “contained a number of security flaws which ultimately led to the design of SSL version 3.0”. SSL version 3.0 of 1996 represented a complete redesign of the protocol.
Soon after, the Internet Engineering Task Force (IETF) began to develop a standard protocol that provided the same functionality. They used SSL 3.0 as the basis for that work, which became the TLS (Transport Layer Security) protocol.
The SSL/TLS layer has 2 main purposes:
After establishing TCP Handshake and before sending/receiving a HTTP Request, HTTPS also sets up a “negotiation” between the client and server via SSL/TLS protocol called SSL/TLS Handshake, which differentiates it from HTTP. The goals here are:
To make it clearer, I use openssl to connect to google.com
openssl s_client -tls1_2 -connect google.com:443

And use Wireshark to capture and filter itssl.handshake

The screenshot above shows all frames during the handshake, it can be divided into 3 main phases
This phase includes frames no. 142 and no. 144 .
First of all, Client send Server a message called Client Hello which contains following information:

The server responds with a Server Hello, which contains similar information required by the client, including:

When the client and server have finished greeting, the server must prove to the client that it is the one Client wants to talk to. This can be done using SSL Certificate.
An SSL certificate contains various pieces of data, including the name of the owner, the property (eg. domain) it is attached to, the certificate’s public key, the digital signature and the certificate’s expiry date.
The client can implicitly trusts the certificate, or check if it is verified and trusted by one of several Certificate Authorities (CAs). Please be noted that for some particular applications, the server, in turn, can require a certificate to verify the client’s identity.

This is the most exciting phase of the handshake. The purpose of this phase is for both parties to agree on a private key. This key is encrypted by asymmetric algorithm (e.g RSA, Diffie Hellman) with the server’s public/private keys. Then it will be used in another symmetric algorithm to encrypt data sent between the client and the server. Both symmetric and asymmetric algorithms have already been agreed on during the Hello phase.
In detail:
In case Client does not have enough data to generate PreMaster, Server must take the additional step called Server Key Exchange before sending the missing data to the client.
When two parties have a agreed on a shared key, Client notifies Server that it’s time to encrypt communication by sending a Change Cipher Spec Message. This is the final message can be read as plain text before encryption.
Finally Client and Server each sends Encrypted Handshake Message to test. Handshake process ends.
In Hello Phase, we can see that Client and Server agree on a Cipher Suite. So, what is this?

Cipher Suite is a list of algorithms which Client and Server use during the handshake and data transmission. There are 4 algorithms:
Example: We have Cipher Suite TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
Where:

Reading Time: 12 minutesĐọc bản tiếng Việt tại đây Overview Context In mid-January 2026, CyStack’s security team observed anomalous activity on a corporate […]

Reading Time: 7 minutesMở đầu Flash Loan Attack là một hình thức tấn công DeFi đã xuất hiện từ lâu, gây ra rất […]

Reading Time: 8 minutesGiới thiệu Static binary injection là một kỹ thuật dùng để chèn những đoạn code từ ngoài vào trong một […]