Is TOTP quantum safe, and what do the published sources say?
Identity engineers and security leads who run TOTP codes need a citable answer on whether the scheme holds up against a future quantum computer. RFC 6238 (May 2011) defines TOTP as a time-based extension of HOTP, built on a shared secret and HMAC with no public-key step, and the sources listed on this page do not classify TOTP as quantum-vulnerable in the way they classify RSA or elliptic curve keys. The main point to carry into a review is that TOTP's exposure is a question about its symmetric and hash building blocks and its key handling, not about a public-key signature that a quantum computer could forge. This section is written for the people who have to justify that position to an auditor, a vendor or a risk committee.
The documents to cite are the UK NCSC's PQC migration timelines (version 1.0, published 20 March 2025), which set the dates of 2028, 2031 and 2035 for planning, priority migration and full migration, and NIST SP 800-63B-4, which governs OTP authentication in its section 3.1.4. Note that the NCSC timelines treat authentication mainly through PKI and say that systems will not have quantum-secure authentication until PKI migration is complete, so they do not directly address a shared-secret scheme like TOTP. Also check NIST IR 8547, which describes NIST's plan for moving from quantum-vulnerable cryptography, to see whether the algorithms your TOTP deployment uses are named there. Confirm the exact HMAC variant and secret length in your own configuration against RFC 6238 before you cite it.
What each body has published about TOTP
This table lists what each source says about TOTP or its HMAC construction, and the dates each sets. Rows with no specific TOTP statement say so, so you can see where guidance is silent. Read the dates column with the scope of each document in mind: the NCSC timelines and NIST IR 8547 do not single out TOTP, and the NIST SP 800-63B-4 entry covers OTP authentication generally.
| Body and document | Date | What it says about TOTP or its HMAC | Dates it sets |
|---|---|---|---|
| IETF RFC 6238 | May 2011 | Defines TOTP on HMAC-SHA-1 and allows HMAC-SHA-256 or HMAC-SHA-512. Says its security depends on the underlying HOTP and HMAC construction, and that the best known attack is brute force. | Default 30-second time step. No migration dates. |
| NIST SP 800-63B-4, section 3.1.4 | Current edition | Covers OTP authentication generally, not TOTP by name. Requires the secret key and its algorithm to provide at least the minimum security strength, and says OTP authentication is not phishing-resistant. | No dates set in the sources listed here. |
| NIST IR 8547 (final) | October 2026 | Describes NIST's plan for moving from quantum-vulnerable cryptography to post-quantum digital signature and key-establishment algorithms. The sources listed here do not say it addresses TOTP or HMAC. | The sources listed here do not state specific migration dates in the summary. Check the document for dated milestones. |
| UK NCSC PQC migration timelines | 20 March 2025 (version 1.0) | Does not name TOTP. Treats authentication mainly through PKI and says systems will not have quantum-secure authentication until PKI migration is complete. | By 2028, define goals and build an initial plan. By 2031, complete highest-priority activities. By 2035, complete migration. |
| NIST NCCoE post-quantum migration FAQ | Current version | Does not name TOTP. Says a cryptographic inventory should cover sensitive or long-lived data exposed to harvest-now, decrypt-later threats, and lists HMAC-relevant primitives such as SHA-2 and AES. | October 2026: NSA CNSA 2.0 FAQ page updated, with no description of the change. |
Why the guidance treats TOTP differently from public-key sign-in
The migration guidance treats TOTP differently from public-key sign-in because the two rely on different building blocks. RFC 6238 defines the time-based one-time password algorithm by extending HOTP from RFC 4226, and it bases the code on the HMAC construction with a secret that the prover and verifier share. Its security, the RFC says, depends on the underlying HOTP and HMAC construction, and it names brute force as the best known attack. Nothing in that description is a public-key signature or a certificate. For a team reviewing its TOTP deployment, the practical question is therefore not whether a signature scheme is affected, but whether the shared secret is long enough, unique to each user and protected at rest and in transit. RFC 6238 gives specific guidance on each of these, including that keys should be random or derived and as long as the HMAC output, that each prover should have a unique secret, and that keys should be stored encrypted and communicated over TLS or IPsec.
The NIST and NCSC migration work is organized around public-key algorithms and PKI. NIST IR 8547 describes a plan for moving from quantum-vulnerable cryptography to post-quantum digital signature and key-establishment algorithms, and the UK NCSC timelines, version 1.0 published 20 March 2025, set dates of 2028, 2031 and 2035 for planning and completing migration. The NCSC timelines state that systems will not have quantum-secure authentication until PKI migration is complete and traditional certificates have expired or been revoked. The NIST NCCoE FAQ asks organizations to inventory sensitive or long-lived data and lists RSA, elliptic curve cryptography, AES, SHA-2 and post-quantum algorithms among the items to record. An organization that runs TOTP should confirm in its inventory which of its sign-in paths use certificates or public-key signatures, and handle those under the migration plan. Whether a TOTP deployment needs any change at all should be confirmed against the sources and the vendor's documentation for the specific implementation and HMAC variant it uses.
Where TOTP codes are used and what the sources say about each
RFC 6238 names a small set of uses for TOTP, and each one depends on a shared secret that the verifier and the prover both hold. The cards below set out each use, the storage and channel rules the RFC attaches to it, and what the NIST and NCSC sources add for the question of whether TOTP is quantum safe.
VPN access
RFC 6238 lists VPN access as an intended use of TOTP, where a one-time code is entered alongside a password at sign-in. The RFC requires the verifier and prover to share a secret that is unique to each prover, so each VPN user's secret must be provisioned and stored separately. Check where the VPN gateway keeps those secrets and whether they are encrypted at rest, since the RFC says stored keys should be encrypted in a secure area.
RFC 6238 textWi-Fi logon
RFC 6238 also names Wi-Fi logon as an intended use, where a time-based code helps authenticate a user joining a wireless network. Because the code is valid only for a short window, a captured code has limited use, but the RFC warns that a larger time step widens the window in which an exposed OTP can be used by a third party. The default step in the RFC is 30 seconds, so compare your deployment against that default.
Web transactions
RFC 6238 lists web transactions as a third intended use, where a code confirms a user's action on a website. NIST SP 800-63B-4 says OTP authentication is not phishing-resistant, so a code typed into a site can be relayed by an attacker. The verifier must accept each validated OTP only once, and it must not accept a code a second time. Confirm that your web application enforces single use for every code it accepts.
NIST SP 800-63B-4Authenticator apps and tokens
Authenticator apps and hardware tokens hold the TOTP secret on the user's side, so the storage rule matters most here. RFC 6238 says keys may be stored in tamper-resistant devices and should otherwise be stored encrypted in a secure area. NIST SP 800-63B-4 allows a single-factor OTP secret to be exported and stored in a sync fabric, so ask whether your authenticator app or token vendor exports secrets, and where they go.
RFC 6238 textSecure channel for secret transport
RFC 6238 requires that communications carrying the TOTP secret or the codes use a secure channel such as TLS or IPsec. A secret provisioned over an unprotected channel can be read by anyone on the path, which undermines the shared-secret model regardless of the algorithm. Check the enrollment flow for each deployment, including QR code provisioning, and confirm that both the secret and the verification traffic travel over a protected channel.
RFC 6238 textWhat the sources say about long-lived secrets behind TOTP
The sources do not say that a stored TOTP seed must be replaced on a fixed date, so whether and when to rotate it is a decision for your own risk assessment. What they do give is a set of questions to answer. RFC 6238 requires each prover to have a unique shared secret, says keys should be random or derived and as long as the HMAC output, and says they should be stored encrypted in a secure area or in a tamper-resistant device. Those requirements describe how the seed should be protected at rest, but they do not set a lifetime for it. Start by listing every place a TOPT seed is held, including authenticator enrollment databases, backups and any copies kept by the verifier, and confirm how each one is encrypted.
NIST SP 800-63B-4 addresses export directly. Section 3.1.4.1 says that for single-factor OTP the subscriber may export the secret key and store it in a sync fabric, which means a seed can move beyond the device it was enrolled on. Where you rely on that option, the sync fabric becomes part of the secret's storage path and needs the same scrutiny as the verifier. The NIST NCCoE migration FAQ asks organizations to inventory sensitive or long-lived data that may be exposed to 'harvest now, decrypt later' threats, and it names RSA, elliptic curve cryptography, AES, SHA-2 and post-quantum algorithms as items to record. A TOTP seed that is long-lived and held in a synced or backed-up store belongs on that inventory, with its exposure window noted.
For the reader, the practical steps are to add each stored seed and its copies to the cryptographic inventory, record how long each seed is retained, and decide whether single-factor enrollments that permit export should be restricted. Confirm storage, export and rotation against your own risk assessment and any sector rules that apply to you, since the sources listed on this page do not set a required interval. The RFC also notes that a larger time step widens the window in which an exposed OTP can be used, which is a separate control from seed lifetime and should be reviewed alongside it.
What the guidance says to use instead or alongside TOTP
NIST SP 800-63B-4 section 3.1.4 states that OTP authentication is not phishing-resistant, which places TOTP codes in a weaker category than authenticators that bind the sign-in to the site being visited. The guidance does not name a specific replacement in this section, so the choice rests on the authenticator types the document describes as phishing-resistant. Teams should confirm which authenticator types meet that description in the current edition of the document.
- OTP is not phishing-resistant: Section 3.1.4 says so directly, so a TOTP code entered on a fake site can be passed along in real time.
- Minimum strength for the secret: The same section requires the secret key and its algorithm to provide at least the minimum security strength for the authenticator.
- Single use while valid: Verifiers must accept a given OTP only once during its validity window, which limits replay.
- Export for single-factor OTP: Section 3.1.4.1 allows the subscriber to export the secret key for single-factor OTP and store it in a sync fabric, which changes how the secret is protected.
- Check your own authenticator types: Confirm which options in your sign-in flow are phishing-resistant under section 3.1.4 before deciding what to add.
Check the authenticator list and its phishing-resistance wording in NIST SP 800-63B-4 against the methods your identity platform offers.
Section 3.1.5.1 of NIST SP 800-63B-4 sets a rule for multi-factor OTP authenticators: each use must require input of the activation factor. This applies to how the authenticator is used at sign-in, not to the algorithm that generates the code. A TOTP app that holds the shared secret without any second check does not meet this rule on its own.
- Each use requires activation: Every sign-in with a multi-factor OTP authenticator must include the activation factor, not only the first time.
- Scope of the rule: The requirement attaches to the multi-factor OTP authenticator, so teams should identify which of their OTP flows count as multi-factor.
- Separate from the algorithm: The activation requirement does not change the TOTP algorithm defined in RFC 6238, so it can be applied to existing TOTP deployments.
- Key storage still matters: RFC 6238 says keys should be stored encrypted in a secure area, which the activation factor does not replace.
- Verify the flow: Test whether each sign-in path asks for the activation factor every time, including recovery and re-enrolment paths.
Check section 3.1.5.1 of NIST SP 800-63B-4 against your enrolment and sign-in flows before relying on this control.
NIST IR 8547 describes NIST's plan for moving from quantum-vulnerable cryptography to post-quantum digital signature and key-establishment algorithms. The final document is dated October 2026 and supports Executive Order 14412 and OMB M-26-15. The UK NCSC sets its own migration dates for PKI, and it treats authentication mainly through PKI, so these dates bear on certificate-based sign-in alongside TOTP.
- NIST IR 8547 final: The final document, dated October 2026, covers the plan for post-quantum signature and key-establishment algorithms.
- Earlier draft: The initial public draft was published on 12 November 2024 and was obsoleted on 27 October 2026 by the final version.
- NCSC by 2028: Define migration goals, complete discovery and build an initial plan.
- NCSC by 2031 and 2035: Complete the highest priority migration activities by 2031, and complete migration to PQC by 2035.
- PKI dependence: The NCSC says systems will not have quantum-secure authentication until PKI migration is complete and traditional certificates have expired or been revoked.
NCSC dates apply mainly to large organisations, critical national infrastructure operators and companies with bespoke IT, while smaller organisations using commodity IT should expect vendor updates. Confirm which dates apply to your organisation and check them against the NCSC timelines page.
What to do with TOTP in your sign-in systems, in order
This sequence gives you a complete, sourced picture of where TOTP codes protect sign-in, what the NCSC and NIST guidance says about timing and authenticator design, and what each identity vendor has published. The end result is a dated record you can hand to auditors and customer security reviewers.
Find every system that accepts TOTP codes
Start with a list of every sign-in path that accepts a time-based one-time code, including VPN gateways, admin consoles, SSO identity providers, and any application that stores a TOTP secret for its users. Include the authenticator apps and hardware tokens enrolled against each system, since those hold the shared secrets. Identity and platform teams should own this inventory, and it is done when each entry names the system, the owner, the enrollment method and where the secret is stored. This matches the NIST NCCoE guidance to build a cryptographic inventory covering long-lived sensitive data, which is the basis for every later step.
Check the NCSC dates against your size and sector
Read the UK NCSC migration timelines and match them to your organisation. The NCSC sets three dates: by 2028 define migration goals and build an initial plan, by 2031 complete the highest priority activities, and by 2035 complete migration to post-quantum cryptography. The same guidance says the timelines apply mainly to large organisations, critical national infrastructure operators and companies with bespoke IT, while smaller organisations using commodity IT should expect vendor updates to carry the change. Record which group you fall into and who owns each date, so the plan in later steps has a defensible basis.
Ask each identity vendor what it has published
Send each identity provider, authenticator app vendor and hardware token supplier a written question about what they have published on post-quantum migration and how it affects TOTP, including whether their TOTP implementation uses HMAC-SHA-1, HMAC-SHA-256 or HMAC-SHA-512 as RFC 6238 permits. Ask which product versions the answer covers and where the vendor documents the change. Where a vendor has published nothing on TOTP specifically, record that fact with the date you asked. The step is complete when every vendor's reply, or its silence, is on file with a source reference.
Review TOTP secret handling and the one-use rule
Confirm with each system owner that TOTP secrets are stored encrypted in a secure area, that communications use TLS or IPsec, and that each validated code is rejected on a second use, as RFC 6238 requires. Check the time step in use, since the RFC default is 30 seconds and a larger step widens the window in which an exposed code can be reused. NIST SP 800-63B-4 section 3.1.4 requires verifiers to accept an OTP only once while it is valid and requires the secret key and its algorithm to provide at least the minimum security strength. Record any system that does not meet these points as a finding with an owner.
Plan any change inside your PKI and authenticator roadmap
Fold any TOTP change into the same roadmap you use for certificates and authenticator upgrades, because the NCSC timelines treat authentication mainly through PKI and state that systems will not have quantum-secure authentication until PKI migration is complete and traditional certificates have expired or been revoked. Note that TOTP itself is a shared-secret construction, so the question for each system is whether its secret and HMAC choice meet current NIST guidance, not whether a certificate is in use. Assign an owner and a review date for each system, and state in the plan which vendor replies are still outstanding. The output is a roadmap entry per system that cross-references the inventory and the vendor record.
Record the answer with its source for reviews
Write one dated record per system that gives the inventory entry, the NCSC and NIST references used, the vendor replies with their dates, and the open findings from the handling review. Keep the source links alongside each statement so that an auditor or customer reviewer can trace every answer back to a published document. Update the record when a vendor replies or a product version changes, and note the date of each update. This record is what you present when a customer security questionnaire or an audit asks whether TOTP sign-in is covered.
The dates the UK guidance sets for post-quantum migration
The diagram is a general timeline of the UK NCSC migration dates, not a TOTP-specific plan. It starts with the 2028 milestone, where organisations define migration goals, complete discovery and build an initial plan. The next hand-off is 2031, when the highest priority migration activities should be complete, and the final milestone is 2035, when migration to PQC should be complete. The NIST IR 8547 final publication in October 2026 is shown as a separate marker. Check the NCSC timelines document for the full wording of each milestone before relying on the sequence.
General UK NCSC migration dates, not specific to TOTP.
Claims readers meet about TOTP and what the sources actually say
Readers meet several claims about TOTP that are either overstated or only partly true. The cards below set each claim against what RFC 6238, NIST SP 800-63B-4 and the UK NCSC say, so you can judge the claim against the published text rather than against a summary.
TOTP is quantum proof
The sources do not support this. RFC 6238 says TOTP's security depends on the underlying HOTP and HMAC construction, and it names brute force as the best known attack. The published text does not present TOTP as resistant to quantum attacks, and it does not contain a quantum-security assessment. Check how your deployment is described in your own risk documents, and avoid repeating the phrase "quantum proof" in product material.
RFC 6238 textTOTP is broken
The sources do not say this. RFC 6238 describes TOTP as built on HMAC, and NIST SP 800-63B-4 places OTP authentication in the same family of verified-factor methods without calling the algorithm broken. Its main stated limit is that OTP authentication is not phishing-resistant. Confirm which HMAC variant and key length your deployment uses, because RFC 6238 allows HMAC-SHA-1, HMAC-SHA-256 or HMAC-SHA-512.
NIST SP 800-63B-4A longer key fixes TOTP
The sources frame key length as a requirement, not as a fix for a quantum threat. RFC 6238 says keys should be random or derived and as long as the HMAC output, and NIST SP 800-63B-4 requires the secret key and its algorithm to provide at least the minimum security strength. Neither source says that lengthening the key addresses quantum attacks. Check your key length against the HMAC output size and the strength requirement, and treat any post-quantum claim as a separate question.
NIST SP 800-63B-4 textTOTP is replaced on a set date
The sources do not set a replacement date for TOTP. The UK NCSC's timelines (version 1.0, 20 March 2025) set three milestones for organisations generally: 2028, 2031 and 2035. They treat authentication mainly through PKI and say quantum-secure authentication will not exist until PKI migration is complete. The NCSC does not name TOTP as a system to replace by a given date, so confirm any deadline with your regulator or vendor before you plan around one.
NCSC timelinesQuestions people search about TOTP and quantum attacks
Does a larger HMAC or longer key make TOTP quantum safe?
Neither change is described as a quantum fix in the sources listed here. RFC 6238 lets implementations use HMAC-SHA-256 or HMAC-SHA-512 in place of HMAC-SHA-1, and it says keys should be as long as the HMAC output. Those choices follow the algorithm's general design and the security of the underlying HOTP and HMAC construction. The RFC names brute force as the best known attack on TOTP, and it does not state how quantum computers change that analysis. Confirm with your own threat model and the NIST guidance on key strength before deciding that a parameter change is enough.
Must TOTP be replaced now because of quantum computers?
The sources listed here do not say that TOTP must be replaced now for quantum reasons. NIST IR 8547 (final, published October 2026) plans the move from quantum-vulnerable public-key algorithms to post-quantum signature and key-establishment algorithms. TOTP uses a shared secret and a hash, not a public-key signature, so the NIST plan does not name it directly. The UK NCSC sets dates for migrating to post-quantum cryptography by 2028, 2031 and 2035, and it applies those dates mainly to large organisations. Review your own deployment against those dates and the vendor documents for your product.
What does NIST recommend instead of TOTP for quantum-safe sign-in?
The sources listed here do not name a replacement for TOTP. NIST SP 800-63B-4 classes OTP authentication as not phishing-resistant, and it sets rules for OTP use: the secret must meet minimum strength, and a verifier must accept each OTP only once while it is valid. The same guideline separates single-factor OTP from multi-factor OTP authenticators. For the post-quantum side, NIST IR 8547 covers signature and key-establishment algorithms. Read the current NIST SP 800-63B-4 and NIST IR 8547 texts directly for the approved options.
Is a stored TOTP secret at risk from quantum computers today?
The sources listed here do not state that a stored TOTP secret is at risk from a quantum computer today. RFC 6238 says keys should be stored encrypted in a secure area or in tamper-resistant devices, and that communication should use a secure channel such as TLS or IPsec. NIST's migration guidance asks organisations to inventory sensitive or long-lived data that may face harvest-now, decrypt-later threats. Check where your TOTP secrets are stored, how long they are kept, and which encryption protects them, and use that inventory to decide your own risk.
Does the NCSC timeline cover TOTP one-time password systems?
The NCSC timelines (version 1.0, published 20 March 2025) mainly treat authentication through PKI. They state that systems will not have quantum-secure authentication until PKI migration is complete and traditional certificates have expired or been revoked. The timelines set no separate date for TOTP. Organisations that use mainly commodity IT should expect vendor updates to handle the change. Ask your identity vendor whether its TOTP implementation is affected and when it plans to ship any change.
What should I ask a vendor about TOTP and post-quantum readiness?
Ask a few specific questions and get written answers:
- Which HMAC variant the product uses for TOTP, and whether it supports HMAC-SHA-256 or HMAC-SHA-512.
- How TOTP secrets are stored at rest, including the encryption and key management used.
- Whether the product enforces single use of each OTP and a bounded time step, as RFC 6238 describes.
- Its published plan and dates for post-quantum migration, and which components it expects to change.
- Whether it has published any post-quantum position for OTP authentication.
Use the vendor's own documentation as the source for these answers.
What does the NCCoE migration FAQ say to inventory for TOTP?
The NIST NCCoE post-quantum migration FAQ says a cryptographic inventory should cover sensitive or long-lived data that may be exposed to harvest-now, decrypt-later threats. Its list of algorithms to inventory names RSA, elliptic curve cryptography, AES, SHA-2 and post-quantum algorithms. A TOTP deployment uses HMAC with SHA-1, SHA-256 or SHA-512, so record which hash and HMAC variant each system uses, along with where the secrets are stored. The FAQ does not state a TOTP-specific requirement.
How DeployOpen works on this
DeployOpen helps teams find where TOTP one-time passwords are used in their sign-in systems, what secret handling and verifier behavior they depend on, and what a move toward post-quantum-ready authentication would involve. The work is scoped to the company's own deployments, so each answer is tied to the versions and configurations the team actually runs.
How we scope
- Inventory every system that issues or verifies TOTP codes, including VPN, Wi-Fi logon and web sign-in flows.
- Record the HMAC variant, time step and secret storage each system uses, since RFC 6238 allows SHA-1, SHA-256 or SHA-512.
- Agree the scope in writing before work starts, with deliverables and timelines fixed up front.
How we build
- Check that each verifier rejects a code that has already been accepted, as NIST SP 800-63B-4 requires.
- Review how shared secrets are generated, stored encrypted and transported over TLS or IPsec, per RFC 6238.
- Test enrollment, activation and recovery paths, including whether exported secrets reach a sync fabric.
How we hand over
- Document each TOTP deployment with its configuration, versions, secret handling and any gaps found.
- Map the findings to the NIST and NCSC timelines your organization is working against, using the dates as published.
- Deliver a migration-readiness record that your security, compliance and identity teams can review and act on.
How we support
- Support upgrades and configuration changes after handover as the sign-in platform and its standards evolve.
- Offer ongoing support and continuous testing as a retainer, sized to the systems you run.
- Confirm with your vendors and the standards documents themselves before relying on any compatibility or timing detail.

