Google Authenticator LLD: Two Devices, No Connection, One Six-Digit Truth (TOTP)
A low-level design walkthrough of TOTP and Google Authenticator: a shared secret and the clock through HMAC to six digits, with an acceptance window that tolerates skew and blocks replay.
"Design Google Authenticator." Your phone shows six digits that change every thirty seconds. The login server, on the other side of the planet, knows whether they're right — and here's the thing that should stop you cold: your phone was in airplane mode the whole time. No network. No message left the device. Yet two machines that have never spoken since setup agree, to the digit, on a number that didn't exist a minute ago and won't exist a minute from now. That's not magic and it's not luck — it's the cleanest "shared nothing, agree on everything" trick in applied crypto, and it fits in a scre…
What’s inside
Read this one free
Sign in and your first premium article is on us — read Google Authenticator LLD: Two Devices, No Connection, One Six-Digit Truth (TOTP) free.