Skip to main content

What is TLS?

TLS (Transport Layer Security) is a security protocol that encrypts data while it travels over a network and protects the connection between a client and a server.

In simple terms: TLS is the technology that makes data transfer over the internet secure.


Why TLS is needed

TLS solves three important tasks at once.

1. Confidentiality (encryption)

  • data is transferred in encrypted form
  • outsiders cannot read it (passwords, tokens, personal data)

2. Data integrity

  • data cannot be changed unnoticed
  • if someone tries to tamper with the information, it will be detected

3. Authenticity confirmation

  • the client understands that it is talking to the real server
  • not to a fake site

Where TLS is used

TLS is used in:

  • HTTPS (the most common example)
  • secure mail (SMTPS, IMAPS)
  • VPN
  • messengers
  • APIs and microservices

Practically the entire modern internet runs on top of TLS.


How TLS works (simplified)

  1. The client connects to the server
  2. The server sends a TLS certificate
  3. The client checks the certificate:
  • whether it is valid
  • who it was issued to
  1. The parties agree on encryption keys
  2. From then on, all data is transferred in encrypted form

The user does not see this, it all happens automatically.


TLS and HTTPS, a common mix-up

Important to remember:

  • TLS is the encryption protocol
  • HTTPS is HTTP running on top of TLS

The formula:

HTTPS = HTTP + TLS


TLS vs SSL

Interviews may ask about this:

  • SSL is the old protocol, now outdated
  • TLS is the modern standard

Nowadays, when people say "SSL", they almost always mean TLS.


Real-life example

TLS is like:

  • a sealed, tamper-proof envelope
  • even if the letter is intercepted, it cannot be read
  • and its contents cannot be swapped unnoticed

Short answer for an interview

Remember this wording:

TLS is a security protocol that ensures the encryption, integrity, and authenticity of data during network transfer and is used, among other things, to protect HTTPS connections.

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.