Skip to content
rijit's Blog
Home
Search
About
< All Tags
rfc-6238
1 post
TOTP From Scratch — How Your 2FA Code Actually Works
A deep dive into RFC 6238 Time-based One-Time Passwords: the math behind the 6-digit code, how HMAC-SHA1 produces it, and a complete Python implementation built without any TOTP library.
TOTP
TWO FACTOR AUTH
SECURITY
PYTHON
CRYPTOGRAPHY
HMAC
RFC 6238