SSL, TLS and mTLS

Talk without anyone listening · Part of Reliability and security

Key idea

Practice

6 questions · about 3 min

Explained step by step

SSL

SSL (Secure Sockets Layer) is a protocol for encrypting and securing communications over the internet. It was created in 1995, but today it's deprecated: TLS (Transport Layer Security) replaced it. Even so, people still talk about «SSL certificates», because most certificate providers still call them that. It's like saying «Xerox it» even when the machine is another brand: the old name stuck.

Plaintext

Originally, data on the web traveled in plaintext: anyone who intercepted the message could read it. SSL was created to fix that and protect privacy. By encrypting everything between the user and the server, it also stops attacks where someone modifies the data along the way. For example, a plaintext password is read in 1 second with a sniffer on public wifi. It's like sending a postcard versus a letter in a sealed envelope: the mail carrier reads the postcard.

TLS

TLS (Transport Layer Security) is a widely adopted security protocol for privacy and data security over the internet. It evolved from SSL. Its main use is encrypting communication between web apps and servers: it's the S in HTTPS. TLS 1.3, from 2018, is the current version. It's like an armored tunnel between your home and the bank: what goes on inside can't be seen from outside.

TLS achieves 3 things. Encryption: hides the traveling data from third parties. Authentication: ensures the parties are who they claim to be, with a certificate. Integrity: verifies the data wasn't forged or modified along the way. If 1 of the 3 is missing, the connection isn't secure. It's like an armored truck: the cargo can't be seen (encryption), the driver has ID (authentication) and the seal proves nobody opened the door (integrity).

mTLS

mTLS (mutual TLS) is a mutual authentication method: it verifies that both parties of a connection are who they claim to be, checking that both have the correct private key, and using their TLS certificates as extra verification. In regular TLS only the server shows a certificate; in mTLS, both do. It's useful for devices that don't log in, like Internet of Things (IoT) devices. It's like a handshake with a secret password: both have to know it.

Zero trust

Today mTLS is widely used between microservices, in a zero trust security model: no service trusts another just for being on the same network; every connection is verified. That way, if an attacker gets into 1 service, they can't talk to the other 49 without a certificate. It's like a building where every office asks for a badge, not just the front door.

Terms in this lesson

Arki, the beaver mascot

Your next interview starts with 5 minutes today.

Free on iOS and Android. Start from zero, no account needed.

Key idea

Talk without anyone listening