How Modern Authentication Works
A first-principles breakdown of one-time passwords, multi-factor security, cryptographic time drift, and cellular delivery networks.
Pieces in this series
How OTP and Two-Factor Authentication Actually Work
From shared cryptographic secrets and Unix timestamps to dynamic truncation and SMS delivery risks
Time-based one-time passwords (TOTP) do not rely on cellular towers, SMS gateways, or an internet connection. Both your phone and the server independently calculate the exact same 6-digit number using a shared secret and the current tick of Unix time.
Why SMS OTPs Sometimes Arrive Late or Fail Entirely
The multi-hop journey from enterprise application servers through telecommunication aggregators, SMPP queues, and cellular signaling networks
Unlike instant messaging apps that keep persistent TCP/WebSocket connections open over IP, an SMS OTP must traverse enterprise API gateways, international telecommunication brokers, carrier firewalls, and low-priority cellular control channels before reaching your SIM card.
How Public-Key Cryptography Actually Works
One-way mathematical trapdoors, modular clock arithmetic, Diffie-Hellman key exchange, and the RSA prime factor breakthrough
For four thousand years, all encryption suffered from a fatal paradox: the key distribution problem. To send a secret message, sender and receiver first had to share a secret key. But how could they share that key without an eavesdropper stealing it? In 1976, Whitfield Diffie, Martin Hellman, and Ralph Merkle (alongside Ron Rivest, Adi Shamir, and Leonard Adleman) shattered this paradox by inventing public-key cryptography. By exploiting mathematical 'trapdoor functions'—calculations that are trivial to compute forward (like multiplying two prime numbers) but practically impossible to invert without a secret key (like factoring a 600-digit number)—two strangers can exchange public values in plain view of an adversary and arrive at an identical shared cryptographic key. Today, this mathematics secures every bank transaction, password, HTTPS connection, and digital signature on Earth.