by Samy (Kondasamy Jayaraman)

Module 40 · Logins and passwords

Beginner

A site never keeps your password

Larkspur Supply Co. opens trade accounts for its builders. Here you store their passwords, race a thief who stole the table, and hand out cloakroom tickets.

Read as

The whole idea in one example

One stolen table, two ways to keep it

Kept as typed

leaked

10 of 10

Every password readable the moment it leaks.

Slow and salted

guarded

4 of 10

Only the passwords on a leaked list fall within a year.

Demo accounts written for this site. Guess rates come from one dated graphics-card benchmark; a password off the list is an estimate of trying every combination.

How it works

Four ideas carry the module

  1. 1 A fingerprint

    Keep a hash, never the password

    One RTX 4090 tried 21,975.5 million SHA-256 guesses a second in Chick3nman’s hashcat 6.2.6 benchmark (October 2022).

    Source, checked 30 October 2026

  2. 2 A pinch of salt

    Equal passwords, different fingerprints

    OWASP: with a salt per password, cracking time grows in direct proportion to the number of hashes, and nobody can tell whether two users share a password without cracking them.

    Source, checked 30 October 2026

  3. 3 Slow on purpose

    Every guess costs many rounds

    OWASP’s Password Storage Cheat Sheet puts Argon2id first; where PBKDF2-HMAC-SHA256 is used, it asks for at least 600,000 iterations and a unique salt per password.

    Source, checked 30 October 2026

  4. 4 The cloakroom ticket

    After sign-in, a cookie is the key

    RFC 6265 (2011): an HttpOnly cookie is hidden from page scripts, and a Secure cookie is sent only over encrypted connections.

    Source, checked 30 October 2026

The story

Trade accounts for Larkspur’s builders

Larkspur Supply Co. opens trade accounts for its builders; the team learns a site never keeps your password, only a slow, salted fingerprint of it, and after sign-in a cookie is the key. You’re on the team that builds the sign-in.

22 billion
SHA-256 guesses a second on one graphics card (benchmark, October 2022)
600,000
rounds OWASP asks for when a site uses the slow hash PBKDF2
4 of 10
demo accounts still crack at that work factor: the ones on the leaked list
2
best plans in chapter 7’s workbench

Your path

The chapters

  1. Chapter 1

    The sticky note

    What does a thief get when that table leaks?

  2. Chapter 2

    A one-way fingerprint

    Can a thief turn stolen fingerprints back into passwords?

  3. Chapter 3

    A pinch of salt

    How does a pinch of salt keep two equal passwords apart?

  4. Chapter 4

    Slow on purpose

    How much does a slow hash help, and what can’t it save?

  5. Chapter 5

    The cloakroom ticket

    What proves it is Jo after sign-in, and what if someone copies it?

  6. Chapter 6

    Sign in with another site

    How does another site vouch for you, and what stops a thief faking it?

  7. Chapter 7

    Guard every account

    Which store, second factor and session length lose the fewest accounts?

Who it’s for

  • Engineers
  • Product managers
  • Analysts
  • No code needed

Anyone who builds or buys a sign-in page. It builds on Locks and keys, which teaches the hash and the signature themselves.