Authentication factors

Three kinds of proof, and what a thief must steal to beat each

Something you knowpassword, PIN, passphraseTo beat it, an attacker mustguess it, phish it or buy a leaked copy,from anywhere, at scaleSomething you havephone, security key, smart cardTo beat it, an attacker musttake or clone the device, or trick itsowner into using itSomething you arefingerprint, face, irisTo beat it, an attacker mustcopy a body part, and it can never bechanged afterwardsLocation and behaviour (where you are, how you type) are attributes that add context; they are not proof on their own.Authentication rests on three kinds of proof. Multi-factor means two different kinds, not two of the same.A password is the weakest because it can be stolen remotely, in bulk, without the victim noticing. Something youhave forces the attacker to be physically present, or to fool you in real time. A password plus a security questionis still one factor: both are things you know.

Factors: something you know, have or are. Multi-factor authentication combines different kinds.

Authentication factors · Going deeper

Biometrics trade false accepts against false rejects, and cross at the CER

error ratestricter matching →← more lenientFalse acceptance (FAR)a stranger gets inFalse rejection (FRR)you are turned awayCERLower CER = more accurate systemHigh security: set it stricter,accept more false rejections.A false acceptance is thedangerous error (Type II).Curves are illustrative.Every biometric trades false acceptances against false rejections; where they cross measures its accuracy.Tightening the match threshold lets fewer impostors in but turns away more genuine users. The crossover error rate(also called the equal error rate) compares systems: the lower, the better. Biometrics are best used to unlock akey held on your own device, as passkeys do, never as a secret sent to a server: you cannot reset your face.

False acceptance rate (FAR), false rejection rate (FRR) and the crossover error rate (CER) describe a biometric.

Password storage

A server should keep a salted, slow hash, never the password itself

Passwordorbit lantern cactus+Saltrandom, per userSlow hashArgon2id, bcrypt, scryptdeliberately expensiveWhat the database keepsuser: sam@example.com$2b$12$algorithm and costR9h/cIPz0gi.URNNX3kh2OsaltPST9/PgBkqquzi.Ss7KIUgO2t0jWMUWhash: no password anywhereAt sign-in the server repeats the same steps on what you typed, and compares the results.A server should never know your password: it keeps a salted, deliberately slow hash and compares at sign-in.A hash is one-way: easy to compute, infeasible to reverse. The salt is random per user, so two people with thesame password get different hashes and precomputed tables (rainbow tables) are useless. Slowness is the point:it costs the server milliseconds per login and an attacker years per stolen database.

Passwords are stored as salted hashes using slow algorithms such as Argon2 or bcrypt.

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.

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.

Password storage · Going deeper · 2 of 2

A fast hash falls in seconds; a slow one holds for decades

Time for one RTX 4090 graphics card to try every 8-character password of letters and digits1 s100 s3 h12 days3 years317 yearsMD5, fast and unsalted17 secondsSHA-256, fast2 minutesbcrypt, cost 5177 daysbcrypt, cost 1262 yearsA fast hash falls in seconds; a slow one turns the same stolen database into decades of work.There are 2.8 trillion such passwords. MD5 and SHA-256 were built to be fast, which is exactly wrong for passwords.Each step up in bcrypt’s cost doubles the work. The scale is logarithmic: each gridline is a hundred times longer.Speeds are hashcat benchmarks; a long passphrase multiplies every bar by billions more.

Fast hashes (MD5, SHA-256) are cracked at billions of guesses a second; bcrypt at thousands.

Password policy

Length beats complexity, and forced changes make passwords worse

RuleThe old habitNIST SP 800-63B-4 (2025)Minimum length8, with complexity15 alone; 8 when part of MFACharacter mixupper, lower, digit, symbolnot required: forbidden to demandExpirychange every 90 daysonly when there is evidence of a breachCheck againstnothingbreached, common and context wordsPaste and managersoften blockedmust be allowedHints, security questionscommonnot allowed“P@ssw0rd1!” meets every old rule and is on every breach list. “orbit lantern cactus folder” meets the new one.Length beats complexity, and forced changes make passwords worse: the 2025 NIST rules say so explicitly.Complexity rules produce predictable patterns (a capital first, a digit and “!” last) that cracking tools try first.Forced expiry produces “Summer2025!” then “Autumn2025!”. A long passphrase is both stronger and easier to remember,and checking it against lists of breached passwords removes the ones attackers will try first.

NIST SP 800-63B-4: at least 15 characters alone, no composition rules, no forced expiry, check against breached passwords.

Credential stuffing

One reused password unlocks every site that shares it

Breached forumsam@example.com : Rover2019combo listsLogin botmillions of pairs an hourBanksame password: inEmailunique password + MFA: stoppedShopsame password: inWork VPNsame password: inCredential stuffing tries passwords leaked from one site on every other site, and reuse makes it work.It needs no skill: billions of leaked email and password pairs circulate, and bots test them automatically. Apassword manager gives every site its own password, so one leak opens one door. Defences on the server side:MFA, blocking known-breached passwords, rate limits and alerts on many failed logins from one source.

Credential stuffing replays leaked username and password pairs on other sites. Unique passwords and MFA stop it.

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.

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

What an attacker who already has the password must do nextSMS codeSIM swap, interception, phishingAuthenticator app codephishing page relays it in real timePush promptfatigue: approve to make it stopPush with number matchingstill relayed by a proxy pagePasskey or FIDO2 security keybound to the real site: nothing to relayeffort for the attacker →Any second factor beats none, but only cryptographic, origin-bound ones resist phishing.NIST calls SMS a restricted authenticator because phone numbers can be hijacked by a SIM swap. Codes and promptsall rely on a person checking the site, and a convincing proxy defeats that. Passkeys and FIDO2 keys check thesite themselves. Use them for administrators first, then everyone.

SMS is weakest; codes and push can be relayed; FIDO2 keys and passkeys are phishing-resistant.

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.

Three levels of confidence

AAL1single factor is enough, such as a password
AAL2two factors; a phishing-resistant option must be offered
AAL3a hardware-based, non-exportable cryptographic key, phishing-resistant

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

Your deviceprivate key, never leavesexample.compublic key only1 a random challenge, for example.com2 unlock with fingerprint or PIN, locally3 the challenge, signed with the private key for example.com4 verified with the public keyA passkey proves you hold a private key; the server keeps only a public key, which is useless to a thief.Each site gets its own key pair, created on your device. The fingerprint or PIN only unlocks the key locally and isnever sent. Because the browser signs for the site’s real name, a look-alike site gets no valid signature. A databreach leaks nothing reusable. Passkeys follow the FIDO2 and WebAuthn standards and can sync between your devices.

Passkeys use public-key cryptography per site. The private key stays on your device; the server holds the public key.

Lesson complete

You finished “Authentication”

Nicely done.

Open in a new tab