Authentication factors
Three kinds of proof, and what a thief must steal to beat each
Factors: something you know, have or are. Multi-factor authentication combines different kinds.
Authentication means proving who you are. There are three kinds of proof. Something you know: a password or a PIN. An attacker can guess it, phish it, or buy a leaked copy, from anywhere in the world, thousands at a time. Something you have: a phone, a security key, a smart card. Now the attacker must take the device, or trick you into using it for them. Something you are: a fingerprint, a face. Hard to copy, but impossible to change if it ever is. Multi-factor means combining different kinds. A password and a security question are two things you know: still one factor.
Authentication factors · Going deeper
Biometrics trade false accepts against false rejects, and cross at the CER
False acceptance rate (FAR), false rejection rate (FRR) and the crossover error rate (CER) describe a biometric.
Biometric readers never give a perfect yes or no. They measure how close a match is, against a threshold. Move the threshold from lenient to strict. When it is lenient, impostors are accepted more often: the false acceptance rate is high. Tightening it brings that down. But the stricter it gets, the more often you are turned away: the false rejection rate climbs. Where the two lines cross is the crossover error rate. A lower crossover means a more accurate system. And remember: a false acceptance lets an attacker in. It is the dangerous error.
Password storage
A server should keep a salted, slow hash, never the password itself
Passwords are stored as salted hashes using slow algorithms such as Argon2 or bcrypt.
If a server can show you your password, it is storing it wrongly. Here is the right way. Your password is combined with a salt: a random value, different for every user. Both go through a hash function designed to be slow, such as Argon2 or bcrypt. A hash is one-way. You cannot run it backwards. The database keeps only the result: which algorithm, how slow, the salt, and the hash. There is no password anywhere. When you sign in, the server repeats the same steps on what you typed and checks that the results match.
Hashing and salting · Going deeper · 1 of 2
Rainbow tables, pepper and key stretching
Salts defeat rainbow tables; key stretching makes each guess slow; a pepper is a secret kept outside the database.
Salts defeat rainbow tables; key stretching makes each guess slow; a pepper is a secret kept outside the database. Why salt matters. Without a salt, everyone with the password “Rover2019” has the same hash, and an attacker can look hashes up in precomputed tables of billions of common passwords (rainbow tables). A unique random salt per user means every hash must be attacked separately, from scratch. Key stretching. Running the hash many times, or making it use lots of memory, slows every guess. Recommended choices (OWASP): Argon2id first, then scrypt, then bcrypt with a cost of 10 or more, or PBKDF2 with HMAC-SHA-256 and 600,000 iterations where FIPS approval is needed. Pepper. A pepper is a secret added to every password before hashing and kept outside the database, for example in a hardware security module. A stolen database alone then cannot be cracked at all. Exam distinction: hashing is one-way (passwords, integrity). Encryption is two-way and needs a key (confidentiality). Never “encrypt” stored passwords.
Why salt matters
Without a salt, everyone with the password “Rover2019” has the same hash, and an attacker can look hashes up in precomputed tables of billions of common passwords (rainbow tables). A unique random salt per user means every hash must be attacked separately, from scratch.
Key stretching
Running the hash many times, or making it use lots of memory, slows every guess. Recommended choices (OWASP): Argon2id first, then scrypt, then bcrypt with a cost of 10 or more, or PBKDF2 with HMAC-SHA-256 and 600,000 iterations where FIPS approval is needed.
Pepper
A pepper is a secret added to every password before hashing and kept outside the database, for example in a hardware security module. A stolen database alone then cannot be cracked at all.
Password storage · Going deeper · 2 of 2
A fast hash falls in seconds; a slow one holds for decades
Fast hashes (MD5, SHA-256) are cracked at billions of guesses a second; bcrypt at thousands.
Suppose an attacker steals a database of hashes. How long does cracking take? Take every eight-character password made of lowercase letters and digits: about two point eight trillion of them. One gaming graphics card. Stored with MD5, it tries all of them in about seventeen seconds. SHA-256 is slower, but still takes about two minutes. These hashes were built for speed. Bcrypt at a low cost setting turns that into about six months. At cost twelve, a common setting, the same search takes decades. Same passwords, same card. The only difference is the choice of hash.
Password policy
Length beats complexity, and forced changes make passwords worse
NIST SP 800-63B-4: at least 15 characters alone, no composition rules, no forced expiry, check against breached passwords.
For years, password rules demanded a capital, a digit and a symbol, and a new password every ninety days. NIST’s 2025 guidance reverses almost all of it. The rules produced P at sign, s, s, w, zero, r, d, one, exclamation mark: compliant, and on every list attackers try first. Forced changes produced Summer twenty-twenty-five, then Autumn. The new rules: at least fifteen characters when a password is used alone. No required character mix. No expiry unless there is evidence of a breach. Check every new password against lists of breached ones. And let people paste from a password manager.
Credential stuffing
One reused password unlocks every site that shares it
Credential stuffing replays leaked username and password pairs on other sites. Unique passwords and MFA stop it.
Most stolen passwords are never cracked at all. They are simply reused. A forum is breached, and its users’ emails and passwords are posted online. Bots take these lists, called combo lists, and try every pair on other sites, millions an hour. Sam used the same password at the bank, the shop and the work VPN. All three open. Only the email account, with a unique password and a second factor, holds. A password manager makes every password unique, so one breach costs one account.
Password managers · Going deeper
Password managers and other password attacks
A password manager generates and stores unique passwords. Know brute force, dictionary and password spraying.
A password manager generates and stores unique passwords. Know brute force, dictionary and password spraying. Password attacks by name. Brute force try every combination; defeated by length and slow hashes. Dictionary try words, common passwords and their variations first. Password spraying try one or two very common passwords against many accounts, staying under lockout limits. Detected by many failures spread across accounts from one source. Credential stuffing replay leaked pairs from other breaches. Online versus offline online attacks hit a live login and meet rate limits and lockouts; offline attacks run against a stolen hash file at full GPU speed. Why a password manager. Unique passwords long and random for every site; you remember one strong master passphrase. Phishing help autofill matches the real domain, so it stays silent on a look-alike site. Enterprise vaults shared credentials with access logs, and privileged access management for administrator accounts (lesson 8).
Password attacks by name
- Brute force try every combination; defeated by length and slow hashes.
- Dictionary try words, common passwords and their variations first.
- Password spraying try one or two very common passwords against many accounts, staying under lockout limits. Detected by many failures spread across accounts from one source.
- Credential stuffing replay leaked pairs from other breaches.
- Online versus offline online attacks hit a live login and meet rate limits and lockouts; offline attacks run against a stolen hash file at full GPU speed.
Why a password manager
- Unique passwords long and random for every site; you remember one strong master passphrase.
- Phishing help autofill matches the real domain, so it stays silent on a look-alike site.
- Enterprise vaults shared credentials with access logs, and privileged access management for administrator accounts (lesson 8).
Second factor strength
Every second factor helps, but only some survive a phishing page
SMS is weakest; codes and push can be relayed; FIDO2 keys and passkeys are phishing-resistant.
Assume the attacker already has the password. What does the second factor make them do? A text message code: hijack the phone number with a SIM swap, or simply phish the code. An authenticator app code: relay it through a fake page within thirty seconds. A push prompt: bombard the user until they approve. Number matching stops the bombardment, but a proxy page can still pass the number along. A passkey or security key checks the website’s real name itself. On a fake site it produces nothing usable. That is what phishing-resistant means.
Assurance levels · Going deeper
NIST authenticator assurance levels: AAL1, AAL2, AAL3
AAL1 allows one factor; AAL2 needs two; AAL3 needs a hardware-bound, phishing-resistant key.
AAL1 allows one factor; AAL2 needs two; AAL3 needs a hardware-bound, phishing-resistant key. Three levels of confidence. Syncable passkeys (copied between your devices through a cloud account) reach AAL2: their keys are exportable by design. A device-bound security key or smart card reaches AAL3. Other authentication methods you will meet. TOTP and HOTP time-based and counter-based one-time passwords from an app or token. Smart cards and certificates a private key on a chip, as in the US government’s PIV and CAC cards. Kerberos the ticket-based protocol behind Windows domain sign-in. RADIUS and TACACS+ protocols that centralise authentication for network access and device administration (AAA servers).
Three levels of confidence
Syncable passkeys (copied between your devices through a cloud account) reach AAL2: their keys are exportable by design. A device-bound security key or smart card reaches AAL3.
Other authentication methods you will meet
- TOTP and HOTP time-based and counter-based one-time passwords from an app or token.
- Smart cards and certificates a private key on a chip, as in the US government’s PIV and CAC cards.
- Kerberos the ticket-based protocol behind Windows domain sign-in.
- RADIUS and TACACS+ protocols that centralise authentication for network access and device administration (AAA servers).
Passkeys
A passkey signs a challenge, and the server keeps nothing worth stealing
Passkeys use public-key cryptography per site. The private key stays on your device; the server holds the public key.
Passkeys replace the password with a key pair. When you register, your device creates two keys for that one site: a private key it keeps, and a public key it gives the site. Now sign in. The site sends a random challenge. Your device asks for your fingerprint or PIN, but only to unlock the key on the device. Nothing biometric is sent. It signs the challenge with the private key for that site’s name, and sends the signature. The site checks it with the public key. If the site’s database leaks, there is no secret in it. And a fake site cannot get a signature that works on the real one.
Lesson complete
You finished “Authentication”
Nicely done.