Week 11 · Network securityCSCI 4431 / 6431 · Wed 4 Nov 2026
Alice, Bob, and Trudy in the middle
A discussion on network security.
Figures adapted from Kurose & Ross, Computer Networking: A Top-Down Approach, 9th ed., Chapters 1 and 8 · © 1996–2025 J.F. Kurose and K.W. Ross, all rights reserved
Objectives
By the end of the discussion you can
- 1Classify a security worry: which promise it breaks, and what a malicious entity may do.
- 2Trace how keys, signatures and certificates stop an attacker, and explain what an encrypted connection still shows.
Where we are1 of 3
A packet's journey
Where we are2 of 3
Ten weeks of “how”
A different angle3 of 3
Today, one “what if?”
What if someone on the path is malicious?
Brainstorm60 s alone · 90 s with a neighbour · share
What does network security mean to you?
Your turnPick one you used today. What could someone on the path do to you?
What is network security?Kurose & Ross 8.1
What “secure” promises
Confidentiality
Only the intended receiver can understand it
Message integrity
Any change is noticed
Authentication
You know who is on the other end
Availability
It works when you need it
Game 11 of 2 · hands or Kahoot
Which promise does it break?
- Confidentiality
- Integrity
- Authentication
- Availability
- 1On the café WiFi, someone reads your Instagram messages as they go past.Confidentiality
- 2You type your GWeb password into a page that looks exactly like GWeb, but isn't.Authentication
- 3You send a friend $20 on Venmo. It arrives at the server as $200.Integrity
- 4The exam portal is flooded with junk requests the night before. Nobody can log in.Availability
Game 12 of 2
Which promise does it break?
- Confidentiality
- Integrity
- Authentication
- Availability
- 5Every page you visited today was HTTPS. Your ISP still has the list of sites.Confidentiality
- 6A DNS reply is rewritten on the way back: bank.com now points to the attacker's server.Integrity + Auth.
- 7A box on the path takes over your logged-in session and keeps sending as you.Authentication
- 8You switched to a VPN. Now the VPN company has the list of sites instead.Confidentiality
Alice, Bob, TrudyKurose & Ross 8.1
Friends and enemies
What Trudy can doKurose & Ross 8.1
Five moves
Game 2hands or Kahoot
Which move is Trudy making?
- eavesdrop
- insert
- impersonate
- hijack
- deny service
- 1The owner of the free WiFi records every packet you send.eavesdrop
- 2Packets reach GWeb carrying your laptop's address. You never sent them.impersonate
- 3A server on the way adds a line to your email before it arrives.insert
- 4Halfway through your banking session, someone cuts you off and carries on as you.hijack
- 5Thousands of hacked cameras send requests to the course site at once.deny service
Chapter 8Kurose & Ross Chapter 8
Chapter 8's toolbox
Shared keyone secret, two people1
Public keya padlock for anyone1
Authenticationprove who you are2
Digests and signaturesfingerprint, then sign3
Certificateswho vouches for a key3
TLSall of it, inside HTTPS4
Secure emailPGPnot today
IPsec, VPNsnetwork layernot today
WiFi and 5Gwireless securitynot today
Firewallsallow or dropnot today
Intrusion detectionwatch for patternsnot today
1 Encryption → 2 Authentication → 3 Integrity → 4 TLS, the protocol behind every HTTPS page you opened today.
Shared key – symmetric encryption1 Encryption2 Authentication3 Integrity4 TLS
One key locks and unlocks
Shared key – symmetric encryption1 Encryption2 Authentication3 Integrity4 TLS
Three problems with one shared key
Wanted: a way to send a secret to someone you've never met, over a wire Trudy is reading.
Public key – asymmetric encryption1 Encryption2 Authentication3 Integrity4 TLS
Public-key encryption: a padlock and a key
Anyone can lock. Only Bob can unlock.
Public key – asymmetric encryption1 Encryption2 Authentication3 Integrity4 TLS
The same keys, backwards: only Bob can make it
Anyone can open it. Only Bob can make it. That proves it came from Bob: a signature.
Public key – asymmetric encryption1 Encryption2 Authentication3 Integrity4 TLS
What public-key encryption can and can't do
Trudy has Bob's public key too. Can she read m?No. A padlock locks; it can't unlock.
Trudy locks her own message with Bob's padlock. Can Bob tell it isn't Alice's?No. Anyone can lock.
Public-key math is hundreds of times slower. What should Alice put in the box?A fresh shared key. Then switch to the fast kind.
Diffie–Hellman – key exchange1 Encryption2 Authentication3 Integrity4 TLS
Diffie–Hellman key exchange
Trudy has yellow, orange and green. Can she make the brown?No: orange + green is a different colour. Un-mixing is the hard part.
Each side turns the brown into the shared key from slide 14: made fresh for every HTTPS connection, never sent.
Diffie–Hellman – key exchange · optional1 Encryption2 Authentication3 Integrity4 TLS
The same colours, in numbers
| Paint | Maths | Toy numbers |
| yellow · public | a prime p, a base g | p = 23, g = 5 |
| red, blue · secret | secret numbers a, b | a = 6, b = 15 |
| orange, green · sent | A = ga mod p B = gb mod p | 56 mod 23 = 8 515 mod 23 = 19 |
| brown · never sent | Ba mod p = Ab mod p = gab mod p | 196 mod 23 = 2 815 mod 23 = 2 |
| Trudy's mix | A · B mod p = ga+b mod p | 8 × 19 mod 23 = 14, not 2 |
| un-mixing | from ga mod p back to a: the discrete logarithm | real p: 2048 bits forward: a few thousand multiplications backward: no known fast way |
Authentication · ap1.01 Encryption2 Authentication3 Integrity4 TLS
How does Bob know it's Alice?
Authentication · ap2.01 Encryption2 Authentication3 Integrity4 TLS
Try two: check the IP address
ver · length4 · 60
TTL · protocol64 · TCP
checksum0x3c1a
source addresswhatever the sender writes
destination addressBob
data“I am Alice”
Routers read the destination. Nothing checks the source.
Authentication · ap3.01 Encryption2 Authentication3 Integrity4 TLS
Try three: send a password
Still fooled. Trudy doesn't need to read the password to replay it. This is a playback attack.
Authentication · ap4.01 Encryption2 Authentication3 Integrity4 TLS
Try four: a number used once
AskWhere did Alice and Bob get that shared key? (Slides 16–19.)
Authentication · ap5.01 Encryption2 Authentication3 Integrity4 TLS
Try five: answer with your private key
Locking with your private key is signing, as on slide 17. Hold that thought for three slides.
Trudy in the middle1 Encryption2 Authentication3 Integrity4 TLS
Trudy swaps the keys
Neither of them notices. What is missing?Someone Bob already trusts, to vouch: this padlock really is Alice's.
Certificate authority1 Encryption2 Authentication3 Integrity4 TLS
Someone both trust signs the key
Try it: click the padlock in your browser's address bar. That's a certificate, and the CA that signed it.
Digital signature1 Encryption2 Authentication3 Integrity4 TLS
Sign with the private key
Only Bob can make it. Anyone can check it.
Message digest1 Encryption2 Authentication3 Integrity4 TLS
Sign a fingerprint, not the whole file
Public-key signing is slow on a big message. So sign its fingerprint: a short, fixed-size digest.
Signed digest1 Encryption2 Authentication3 Integrity4 TLS
Bob signs the digest; Alice compares
No signature, just the digest. Trudy changes m and recomputes H. Does Alice notice?No. Anyone can compute H.Trudy can't make Bob's signature.
TLS1 Encryption2 Authentication3 Integrity4 TLS
TLS: today's tools, in one protocol
One HTTPS connection1 Encryption2 Authentication3 Integrity4 TLS
An HTTPS connection, start to finish
What it still shows1 Encryption2 Authentication3 Integrity4 TLS
What can the WiFi still see?
You log into your bank over HTTPS on GW WiFi. Name two things the network can still tell.
Project 2, open since last week: a two-hop relay, so that no single box knows both who you are and where you're going.
What we skipped
What we didn't cover, on purpose
Shared key · public keytoday
Authenticationtoday: ap1.0–ap5.0
Digests, signatures, certificatestoday
TLStoday
The arithmeticRSA, Diffie–Hellman, AES, how TLS makes its keys: Week 12, Tim
Firewalls, intrusion detectionvideo 8.9 · Lab 3 Q9b asks for an IDS rule
IPsec, VPNsvideo 8.7
Secure email (PGP)video 8.5 · Lab 3 shows why
WiFi and 5G securitynot covered
And GW has a whole course on network security.