# HTTPS SSL Certificate Exchange

How a website sends its SSL/TLS certificate to your browser, and how the browser checks it before the padlock closes\.

By Matthieu LÉAUTHAUD

Topic: Computing, AI &amp; Electronics

[Open the interactive Jig](https://ask.jig.com/j/U2mxVBsS68a7)

## Transcript

### 1. A private line to a website

When an address starts with https://, your browser and the website first agree how to talk in secret\. This short greeting is called the TLS handshake\. "SSL" is its older name, and people still use it\.

Drag anywhere to turn the desk\. The laptop is your browser; the box on the right is the website's server\.

### 2. The browser says hello

The browser sends a ClientHello: a random number, the kinds of locks it knows, and an orange marble\. That marble is its key share, half of a recipe for a secret key\. Anyone may see it travel\.

### 3. The server says hello back

The server answers with a ServerHello and its own blue key share\. Each side mixes the other's share with a secret of its own, and both arrive at the same golden session key\. From here on, every message is encrypted: scrambled so only someone with that key can read it\.

The session key itself never travels\. Each side works it out on its own\.

### 4. The server sends its certificate

Now the server sends its certificate, a digital ID card, sealed inside the encrypted capsule\. The red\-sealed card names the website and holds its public key, a code anyone may use to check the server's signatures\. A blue\-sealed intermediate card comes along to show who signed it\.

A certificate is public, not secret\. It proves who the server is; the session key does the scrambling\.

### 5. Proof the ID card is really theirs

Anyone could copy a public ID card\. So the server signs the whole conversation with its private key, the iron key on its cushion, and sends that purple signature\. Only the true owner of the certificate could make it\.

The private key never leaves the server\.

### 6. Checking the chain of trust

The browser follows the seals: the website card was signed by the intermediate, and the intermediate by a root card already kept in the browser's trust box\. It also checks the name and the dates\. Press the button to watch, then try a fake site\.

If any check fails, the browser stops and shows a full\-page warning instead of the site\.

### 7. Finished: the padlock closes

Both sides send a Finished message, a check\-code over everything said so far\. If they match, the padlock closes and the web page flows through the encrypted channel\. In TLS 1\.3, today's version, the whole handshake needs just one round trip: one message out and one reply back\.

### 8. What the padlock means

The padlock means two things: nobody in between can read the conversation, and the server proved it owns the name in the address bar\. It does not promise the website itself is honest, so still think before you share\.

Let's Encrypt, a nonprofit that gives out free certificates, makes them last 90 days, so servers renew them automatically\.
