Pcornel
Browse topics
Options
Recent
Favorites
Identity · Technical reference

TOTP

Direct 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.

When to use this

Use it when configuring, checking or troubleshooting TOTP in Authentication.

First 30 seconds

1. TOTP: code from shared secret + time (30 s).

2. Clocks must be synchronised.

3. Allow small drift window.

4. Prevent code reuse.

5. Store secrets encrypted.

Operational verification

secret + time → HMAC → 6 digits

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common traps

A valid TOTP shows access to the shared seed or a current generated code within the accepted window, but it does not show origin, user intent or absence of real-time relay.

Suspicious evidence: Seed reused across accounts, QR retained in tickets, broad skew window, replay accepted, unlimited guesses, codes logged, cloned authenticator without governance or reset by weaker channel.

Platform / version applicability
Identity, authentication and access control
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformIdentity, authentication and access control
Scope / prerequisiteUse it when configuring, checking or troubleshooting TOTP in Authentication.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

unique shared seed enrollment → local/verifier time counter → HMAC/truncation → submitted TOTP → window/retry/replay validation → authenticated session → seed revoke/replace

Healthy evidence: Seeds are unique and protected, enrollment is controlled, acceptance window is narrow, retries and same-window replay are limited, clocks are monitored and seed revoke/re-enroll works.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • 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.
Key checks
  • oathtool --totp -b <base32-secret> — current code
  • date -u; timedatectl — clock sync
  • Allowed time drift window — verification tolerance
ReferenceImportant terms & boundaries2 sections · depth on demand

What this shows and what it does not

A valid TOTP shows access to the shared seed or a current generated code within the accepted window, but it does not show origin, user intent or absence of real-time relay.

In depth

TOTP (Time-based One-Time Password, RFC 6238) generates a 6- to 8-digit code from a shared secret and the current time, typically changing every 30 seconds. Authenticator apps (Microsoft/Google Authenticator, Authy, password managers) and hardware tokens implement it.

How it works: during enrolment the server and app share a secret (usually via QR code). Both compute HMAC(secret, time step) and truncate it to a short code; the server accepts codes within a small time window.

Operational points:

  • Clocks must be roughly synchronised (devices use NTP).
  • Protect enrolment: the QR code is the secret — never email it.
  • Store secrets encrypted on the server side.
  • Provide recovery processes that do not undermine MFA (no easy bypass via help desk).
Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docIdentity, authentication and access control current

Authoritative/upstream documentation reviewed for bounded claims in Authentication → TOTP. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://pages.nist.gov/800-63-4/ · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
time based OTPTOTP codeauthenticator app code
Embedded reference data

Quick lookup tables

Authentication → TOTP proof map

Fast identity, policy/ceremony, outcome and closure evidence boundaries for Authentication → TOTP.

BoundaryEstablishDoes not establish
Identity and scopeStable subject/account/resource mapping, owner, lifecycle state and expected actionDoes not prove credential control or effective access
Policy and ceremonyEffective entitlement or authenticator/verifier policy plus all fallback pathsConfiguration presence does not prove enforcement or assurance
OutcomeAllowed, denied, failure, expiry/revoke and target read-back tests correlated with telemetryOne success does not prove every interface, session or downstream target
ClosureOriginal end-to-end action retested; residual access/risk, owner and review trigger recordedAdministrative workflow completion alone is not closure
Confirmation

Confirm action

Continue?