TOTP
Cheat sheet · https://pcornel.dk/topic.php?topic=4487
Answer
Both sides protect the same seed, compute HMAC over a time counter, truncate the result and accept a limited window while enforcing retry limits and preventing replay within the accepted interval.
Remember
- TOTP ≠ phishing-resistant.
- QR enrollment code ≠ harmless setup metadata; it contains or conveys the seed.
- Clock synchronized ≠ replay prevented.
- Six-digit code ≠ sufficient protection without rate limiting.
First checks
oathtool --totp -b <base32-secret>— current codedate -u; timedatectl— clock sync- Allowed time drift window — verification tolerance
Verify in this order
secret + time → HMAC → 6 digits
Where it usually breaks
First mismatch in identity lifecycle → authenticator/credential → IdP/federation/session → authorization policy → target resource → audit trail; preserve identity/policy/pre-state before mutation.
Authentication → TOTP proof map
| Boundary | Establish | Does not establish |
|---|---|---|
| Identity and scope | Stable subject/account/resource mapping, owner, lifecycle state and expected action | Does not prove credential control or effective access |
| Policy and ceremony | Effective entitlement or authenticator/verifier policy plus all fallback paths | Configuration presence does not prove enforcement or assurance |
| Outcome | Allowed, denied, failure, expiry/revoke and target read-back tests correlated with telemetry | One success does not prove every interface, session or downstream target |
| Closure | Original end-to-end action retested; residual access/risk, owner and review trigger recorded | Administrative workflow completion alone is not closure |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4487