12: Authentication Protocols
Course: Networking - Security Advanced · Updated: October 2026 Literature: K&R chapter 8: end-point authentication Prerequisite: Article 11: Cryptography fundamentals
Learning objectives
After studying this article you can:
- explain the goal of end-point authentication in a network
- step through the protocols ap1.0 to ap4.0 and the attack that defeats each one
- explain what a nonce is and how it prevents playback (replay) attacks
- explain challenge-response authentication with symmetric keys and with public keys, and the man-in-the-middle problem
- describe modern authentication: MFA, Kerberos, OAuth 2.0 / OpenID Connect, FIDO2 / passkeys
1. The goal
Bob wants Alice to prove her identity to him.
In the real world we recognise faces and voices, and we check passports. In a network, Bob can't see Alice. Everything he receives is just bits, which Trudy can create, record and replay. K&R build an authentication protocol step by step, and each step fails until the protocol is good enough.
2. Building an authentication protocol
ap1.0: "I am Alice"
1 | |
Failure: Trudy can simply send "I am Alice" too. Bob can't tell the difference.
ap2.0: "I am Alice" + her IP address
Alice sends "I am Alice" in an IP packet that contains her source IP address.
Failure: Trudy can create a packet with a spoofed (forged) source IP address (e.g. with Scapy, or raw sockets). An IP address is not proof of identity.
ap3.0: "I am Alice" + her secret password
1 | |
Failure: Trudy records (sniffs) the packet and later plays it back to Bob. This is a playback attack (replay attack). Many old protocols really worked this way: Telnet, FTP, POP3, HTTP Basic Auth without TLS.
ap3.1: "I am Alice" + her encrypted password
Failure: the playback attack still works. Trudy doesn't need to know the password. She just replays the encrypted version, which works just as well.
ap4.0: using a nonce
Goal: avoid playback attacks.
Nonce = a number (n) used only once in a lifetime.
1 2 3 4 5 | |
This is challenge-response authentication. Because R is new every time, an old recorded response is worthless.
Drawback: Alice and Bob need a shared symmetric key in advance.
ap5.0: nonce + public-key cryptography
Alice proves her identity by signing the nonce with her private key: K_A⁻(R). Bob checks it with Alice's public key.
Failure: man-in-the-middle. How does Bob get Alice's public key? If Bob asks "send me your public key", Trudy can intercept the request and send her own public key:
1 2 3 4 | |
Alice and Bob don't notice anything. The solution is certificates: a trusted third party (a Certificate Authority) confirms which public key belongs to whom. See article 13.
The lessons
| Protocol | Weakness | Lesson |
|---|---|---|
| ap1.0 | Anyone can claim a name | A claim is not proof |
| ap2.0 | IP spoofing | Network addresses are not proof of identity |
| ap3.0 / 3.1 | Replay | Static credentials can be replayed |
| ap4.0 | Needs a shared key | Nonces stop replay |
| ap5.0 | Man-in-the-middle | Public keys must be bound to identities (PKI) |
3. Authentication factors
| Factor | Examples |
|---|---|
| Something you know | Password, PIN |
| Something you have | Smartphone (authenticator app), hardware token (YubiKey), smartcard, bank card |
| Something you are | Fingerprint, face recognition |
Multi-factor authentication (MFA) combines at least two different factors. It blocks the great majority of account-takeover attacks.
Not all MFA is equal:
| Method | Protects against stolen passwords | Protects against phishing |
|---|---|---|
| SMS code | Yes | No (codes can be phished, and SIM swapping) |
| TOTP app (Google/Microsoft Authenticator) | Yes | No (codes can be phished in real time) |
| Push notification | Yes | Partly (vulnerable to MFA fatigue / push bombing) |
| FIDO2 / passkeys / smartcards | Yes | Yes (bound to the website's domain) |
4. Authentication protocols used in practice
4.1 Kerberos
- Used in Microsoft Active Directory (and MIT Kerberos on Unix).
- Based on a trusted third party, the Key Distribution Center (KDC), and symmetric keys.
- The user logs in once and gets a Ticket-Granting Ticket (TGT). With that, they get service tickets for file servers, mail and so on (single sign-on).
- It uses timestamps (as nonces) against replay. Clocks must be synchronised within 5 minutes.
4.2 RADIUS and 802.1X/EAP
- Used to authenticate users on Wi-Fi (WPA-Enterprise, eduroam), VPNs and switch ports (see article 08 and article 15).
- EAP (Extensible Authentication Protocol) supports several methods: EAP-TLS (certificates, the most secure), PEAP/EAP-TTLS (a password inside a TLS tunnel).
4.3 OAuth 2.0 and OpenID Connect
- OAuth 2.0 (RFC 6749): authorisation. "App X may read my Google calendar", without giving my password to App X.
- OpenID Connect (OIDC): an authentication layer on top of OAuth 2.0. "Log in with Google/Microsoft/Apple", and SURFconext in Dutch education.
- SAML 2.0: an older, XML-based federation standard. It is still widely used in companies and in education.
- Tokens are often JWTs (JSON Web Tokens), signed with HMAC or RSA/ECDSA.
- OAuth 2.1 consolidates best practices (PKCE is mandatory, and insecure flows are removed).
4.4 FIDO2, WebAuthn and passkeys
FIDO2 is the modern, phishing-resistant, passwordless standard (FIDO Alliance + W3C WebAuthn):
- Registration: the device (phone, laptop, security key) generates a key pair per website. The website stores only the public key.
- Login: the website sends a challenge (a nonce!). The device signs it with the private key after the user unlocks it with a fingerprint, face or PIN.
- The device signs only for the correct domain, so a phishing site (
examp1e.com) gets nothing usable.
This is basically ap5.0 done well: challenge-response with public keys, where the "man-in-the-middle" problem is solved by binding the key to the website's origin (and TLS).
Passkeys are FIDO2 credentials that can be synchronised across devices (iCloud Keychain, Google Password Manager, password managers). Since 2023–2025 they are supported by Google, Apple, Microsoft, GitHub, many banks and web shops, and they are recommended by NIST SP 800-63B (revision 4).
5. Summary
- Authentication in a network has to resist spoofing, replay and man-in-the-middle attacks.
- The ap1.0 to ap5.0 steps show that you need nonces (against replay) and a trusted binding between key and identity (against MITM).
- MFA is essential, and phishing-resistant MFA (FIDO2/passkeys) is the best option.
- In practice: Kerberos (AD), 802.1X/RADIUS (networks), OAuth/OIDC/SAML (web and federation), passkeys (passwordless).
References
Videos
- Jim Kurose: Authentication (chapter 8 video lectures): https://gaia.cs.umass.edu/kurose_ross/lectures.php
- Computerphile: "How Kerberos works", "OAuth explained", "Passkeys": https://www.youtube.com/@Computerphile
- FIDO Alliance: passkeys explained: https://fidoalliance.org/passkeys/
- OktaDev: "OAuth 2.0 and OpenID Connect (in plain English)": https://www.youtube.com/@OktaDev
Articles
- passkeys.dev: developer resources for passkeys: https://passkeys.dev/
- Microsoft, Kerberos authentication overview: https://learn.microsoft.com/en-us/windows-server/security/kerberos/kerberos-authentication-overview
- The OAuth 2.0 Authorization Framework and the OAuth community site: https://oauth.net/2/
- SURF, SURFconext and eduroam: https://www.surf.nl/
Standards
- NIST SP 800-63B: Digital Identity Guidelines: Authentication and Lifecycle Management (revision 4)
- RFC 4120: Kerberos V5 · RFC 2865: RADIUS · RFC 3748: EAP · RFC 5216: EAP-TLS
- RFC 6749: OAuth 2.0 · OpenID Connect Core 1.0 · W3C Web Authentication (WebAuthn) Level 3
Cyber Security
Why it matters
Stolen credentials are the most common way in. Year after year, the Verizon Data Breach Investigations Report shows that most breaches involve stolen credentials, phishing or brute force. Important attack techniques:
| Attack | Description |
|---|---|
| Phishing / Adversary-in-the-Middle phishing | A fake login page (often a proxy such as Evilginx) captures the password and the MFA code or session cookie in real time |
| Credential stuffing | Username/password pairs leaked from one website are tried automatically on other websites, which works because people reuse passwords |
| Password spraying | A few common passwords ("Summer2026!") are tried against many accounts |
| Replay / pass-the-hash / pass-the-ticket | In Windows/AD, attackers reuse NTLM hashes or Kerberos tickets without knowing the password (tool: Mimikatz) |
| Kerberoasting / Golden Ticket | Cracking service-account tickets offline, or forging tickets with the KRBTGT key |
| MFA fatigue | Bombarding the user with push requests until they press "Approve" (used in the Uber breach, 2022) |
| Session hijacking | Stealing session cookies or tokens (e.g. with infostealer malware) to skip authentication altogether |
| SIM swapping | Taking over someone's phone number to receive their SMS codes |
| OAuth consent phishing | A malicious app asks for permission to read the user's mailbox |
How to make it safe
- Enforce MFA everywhere, especially on e-mail, VPN, remote access, cloud consoles and admin accounts. Prefer phishing-resistant MFA (FIDO2/passkeys, smartcards).
- Password policy according to NIST SP 800-63B: length (≥ 15 characters for single-factor), no forced periodic changes, no complexity rules, but check new passwords against breach lists (e.g. Have I Been Pwned Pwned Passwords). Encourage password managers.
- Never send credentials without encryption: always use TLS/SSH. Disable Telnet, FTP, HTTP Basic without TLS, and NTLMv1. Restrict NTLM in general (Microsoft is phasing it out).
- Store passwords properly on the server: Argon2id/bcrypt/scrypt with a salt (see article 11).
- Rate-limit and lock out after failed attempts, with alerts on unusual logins (impossible travel, new device, known bad IP).
- Protect Active Directory: tiered administration, strong service-account passwords (or gMSA), protect the KRBTGT account, and use Protected Users and Credential Guard.
- Short-lived sessions and tokens, bound to the device where possible. Revoke sessions after a password reset.
- Conditional access / Zero Trust: decide per login, based on device health, location and risk (see article 14).
- Awareness training: teach users to recognise phishing and MFA-fatigue attacks, and to report them.
Extra references
- Verizon, Data Breach Investigations Report (yearly): https://www.verizon.com/business/resources/reports/dbir/
- CISA, Implementing Phishing-Resistant MFA (factsheet): https://www.cisa.gov/sites/default/files/publications/fact-sheet-implementing-phishing-resistant-mfa-508c.pdf
- Have I Been Pwned (check whether your accounts or passwords have leaked): https://haveibeenpwned.com/
- OWASP Authentication Cheat Sheet and Session Management Cheat Sheet: https://cheatsheetseries.owasp.org/
- MITRE ATT&CK, Credential Access tactic (TA0006): https://attack.mitre.org/tactics/TA0006/
- NCSC-NL, Factsheet: Gebruik van multifactor-authenticatie: https://www.ncsc.nl/