Corp Apps training · TLS and trust

Sally, Chris and
the padlock

What TLS is, why we need it, and how a client decides to trust a server.

Press → to advance · N for notes · F for fullscreen

The cast

Meet everyone

🖥️

Sally

The server. app.rrc.qld.gov.au on IIS.

🧑‍💻

Chris

The client. A browser, an app, or another server.

🏛️

Charlie

The Certificate Authority. Vouches for people.

👂

Eve

Eavesdropper. Can see the traffic.

😈

Mallory

Attacker. Can change traffic and pretend.

Why we need TLS

Without TLS, every message is a postcard

🧑‍💻
Chris
📮 user=chris
password=Summer2026!
👂 Eve reads it😈 Mallory changes it
🖥️
Sally?

👂 Read

Passwords, payroll, query results in plain text.

✏️ Change

Swap a bank account number, inject a script.

🎭 Pretend

Answer as “Sally”. Chris can’t tell.

What TLS is

A sealed envelope, delivered to a checked address

✉️

Confidentiality

Opaque envelope. Eve sees noise.

🧷

Integrity

Tamper seal. Any change is detected.

🪪

Authentication

The address was checked against ID.

Encrypting a chat with Mallory protects nothing.

Authentication is what makes the encryption worth having.

The trust problem

“Hi, I’m Sally.” Anyone can say that.

🖥️🔑

Real Sally

Has a key pair. Hands out her public key, keeps her private key on the server.

😈🔑

Mallory

Generates her own key pair in 2 seconds and also says “I’m Sally, here’s my public key.”

Chris has never met Sally. He needs someone he already trusts to vouch for her.

Enter Charlie

Charlie the CA is a passport office

1
Sally applies

Sends her public key and the name she wants (a CSR). Keeps the private key.

2
Charlie checks

Sally proves she controls app.rrc.qld.gov.au (DNS record or web file). Mallory can’t.

3
Charlie signs

“This public key belongs to app.rrc.qld.gov.au until 17 Sep.” Signed with Charlie’s private key.

🪪

That signed statement is Sally’s certificate: an ID card for her public key.

Why Chris trusts Charlie

Charlie was on Chris’s computer first

🧑‍💻

Chris trusts

Charlie’s root, already in his trust store

→
🏛️

Charlie vouches

Sally’s public key is app.rrc.qld.gov.au

→
🖥️

Sally proves

She holds the matching private key

Windows, macOS, browsers and Java ship with a few hundred audited roots. Group Policy adds our internal CA to domain PCs. Break any link and Chris walks away.

😈 Mallory: Hi Chris, it’s me, Sally 👋
🧑‍💻 Chris: Cool. ID please.
😈 Mallory: Here’s my certificate. I signed it myself.
🧑‍💻 Chris: Sir, this is a self-signed certificate. 🚪

The handshake

How Chris and Sally start talking securely

🧑‍💻Chris
🖥️Sally

1 · Hello. I want app.rrc.qld.gov.au, I speak TLS 1.3. Here’s my half of the key exchange.

2 · Hello. My half of the key exchange, my certificate + intermediate, and a signature with my private key.

3 · Chris checks name, dates, chain, revocation, and Sally’s signature. ✅

4 · Both compute the same shared secret. It is never sent.

5 · 🔒 Encrypted conversation with fast symmetric keys.

Step 2 · Sally proves it’s her

A certificate can be copied. A signature can’t.

📄

The certificate is public

Anyone, including Mallory, can download Sally’s certificate and send it.

✍️

The signature is the proof

Sally signs this exact handshake with her private key. Only the real Sally can.

Mallory with a copied cert gets stuck right here. That’s why the private key is the crown jewel. 👑

Step 3 · Chris checks

Four checks, any fail = stop

🏷️

Name

Is app.rrc.qld.gov.au in the SAN?

📅

Dates

Is it valid today?

⛓️

Chain

Does it lead to Charlie in my trust store?

🚫

Revocation

Has Charlie cancelled it?

Then Chris verifies Sally’s signature with the public key from the cert. Pass = “I’m talking to the holder of Sally’s private key, and Charlie says that’s app.rrc.qld.gov.au.”

Step 4 · A secret that’s never sent

Key exchange, explained with paint

🧑‍💻 Chris

Shared: yellow

Secret: red

Sends: yellow+red

👂 Eve sees
yellow, orange, green

Can’t un-mix paint

🖥️ Sally

Shared: yellow

Secret: blue

Sends: yellow+blue

Each adds their own secret to what they received. Both get yellow + red + blue. Same colour, never transmitted.

What if Mallory tries?

Every trick hits a check

😈 Mallory’s moveWhat stops her
Answers with her own self-signed cert⛓️ Chain check
Uses a real cert for a name she owns🏷️ Name check
Copies Sally’s real certificate✍️ Can’t make Sally’s signature
Changes traffic after the handshake🧷 Integrity check, connection dropped
Records everything for later🤔 Encrypted noise… for now

The long game

Save now, decrypt later

📼

Today

Record encrypted traffic. Cheap, silent, undetectable.

⏳

Wait

For a stolen key, or for the maths to break.

🔓

Later

Decrypt what was captured years ago.

Payroll, HR, legal, ratepayer and SCADA data stay sensitive for years. A breach in 2032 of data sent in 2026 is still a breach.

Later, version 1 · The key leaks

Heartbleed (2014): servers bled their private keys

💔 What happened

Bug in OpenSSL (CVE-2014-0160). A crafted heartbeat made servers return 64 KB of memory per request, no logs. Researchers pulled out private TLS keys within days.

📼 Why recordings mattered

With old RSA key exchange, the session secret was encrypted with Sally’s public key. Steal her private key later and every recorded session opens up.

Key exchangeSally’s key stolen later
TLS_RSA_… (old TLS 1.2)❌ All recorded past traffic readable
ECDHE (TLS 1.3 / modern 1.2)✅ Past sessions safe: forward secrecy

Later, version 2 · The maths breaks

Quantum: Heartbleed for everyone, at once

⚛️

The threat

A large quantum computer is expected to break RSA and ECDH. Forward secrecy doesn’t help if the key exchange itself falls. Recordings made today are the target.

🛡️

The response

ML-KEM (NIST FIPS 203) is quantum-resistant. Browsers and big providers already use a hybrid (X25519MLKEM768): safe if either half holds.

ASD guidance for Australian government: plan to stop relying on traditional asymmetric crypto by 2030.

What we do about it

Five things for our servers

1

TLS 1.3 where possible. On TLS 1.2 allow only ECDHE suites; turn off TLS_RSA_….

2

Patch TLS libraries, including OpenSSL, Java and .NET bundled in appliances and vendor apps.

3

Key might have leaked? Replace it. New key, new cert, revoke the old. Never just patch.

4

Know where every cert and key lives, so the next Heartbleed is a list, not a hunt.

5

Ask vendors about post-quantum (hybrid ML-KEM) support and roadmaps.

Recap

Chris trusts Charlie.
Charlie vouches for Sally.
Sally proves she holds the key.
The secret is never sent.

Notes: elearn.ziggi.dev/pki-tls/tls-trust · Questions?

← → space · N notes · F fullscreen
Read notes page