# SMS codes vs authenticator apps vs passkeys: which is safest?

NIST treats SMS codes as a restricted authenticator and says typed codes are not phishing-resistant. How each 2FA method works and where passkeys fit.

- Author: AltFTool Editorial
- Published: 2026-12-04
- Category: Tools
- Tags: two-factor authentication, passkeys, account security, password security
- Canonical URL: <https://www.altftool.com/blogs/sms-codes-vs-authenticator-apps-vs-passkeys>

---

Any second factor is better than a password alone, but they are not equal. Codes sent by SMS are the one method NIST classes as "restricted". Authenticator-app codes avoid the phone network but can still be phished, because you type them in. Passkeys are phishing-resistant, and the UK's NCSC now calls them the first choice wherever a service offers them.

This is general information, not advice. Which methods you can use depends on what each service supports; the rankings below come from the published guidance, not from tests of any provider.

## How time-based codes work

Authenticator apps implement [RFC 6238](https://www.rfc-editor.org/rfc/rfc6238) (May 2011), the time-based one-time password (TOTP) standard. You and the service share a secret key once, usually by scanning a QR code. After that, both sides take the current Unix time, divide it into steps (30 seconds by default), and run the step number and the secret through HMAC; the result is cut down to six or eight digits. Because both sides compute the same thing, no code ever travels over the phone network.

We ran the RFC's own test key through the AltFTool 2FA Authenticator's code. It reproduces the published 8-digit values exactly:

| Unix time (seconds) | Date (UTC) | RFC 6238 expected (SHA-1) | 2FA Authenticator output |
| --- | --- | --- | --- |
| 59 | 1970-01-01 | 94287082 | 94287082 |
| 1111111109 | 2005-03-18 | 07081804 | 07081804 |
| 1111111111 | 2005-03-18 | 14050471 | 14050471 |
| 1234567890 | 2009-02-13 | 89005924 | 89005924 |

The six-digit codes most sites use are the last six digits of the same calculation, for example 287082 for the first row.

## Why SMS codes rank lowest

[NIST SP 800-63B-4](https://pages.nist.gov/800-63-4/sp800-63b.html), the final version of which NIST released in July 2025 (see [NIST's SP 800-63-4 release page](https://pages.nist.gov/800-63-4/)), says that at the time of publication there is one restricted authenticator: using the public telephone network (SMS or voice) for out-of-band codes. An organisation that accepts it must offer at least one unrestricted alternative, tell users about the risks, and plan for the day it is no longer acceptable. NIST also says verifiers should consider risk signs such as a device swap, a SIM change or number porting before sending a code that way.

The weakness is the channel: the code is only as safe as the phone number it is sent to. That said, the [NCSC's 2-step verification guidance](https://www.ncsc.gov.uk/collection/top-tips-for-staying-secure-online/activate-2-step-verification-on-your-email) notes that codes are often sent by SMS and still recommends turning 2SV on for important accounts, because it keeps criminals out even when they know the password. In the NCSC's view, even a code by SMS keeps out someone who only knows the password.

## Phishing resistance: where passkeys pull ahead

NIST is direct about typed codes: authenticators "that involve the manual entry of an authenticator output (e.g., out-of-band and OTP authenticators) SHALL NOT be considered phishing-resistant". A fake login page can ask for your code and pass it to the real site within its 30-second window. Phishing resistance needs cryptographic authentication bound to the real site, which is what passkeys provide.

| Method | Phishing-resistant under NIST SP 800-63B-4? | Note |
| --- | --- | --- |
| SMS or voice code | No | The one restricted authenticator; depends on the phone number |
| Authenticator app (TOTP) | No | No phone network, but the code can be relayed by a fake site |
| Saved recovery codes | No | Look-up secrets for when another factor is lost |
| Passkey or security key | Yes, when it meets section 3.2.5 | Cryptographic, bound to the site's name |

NIST also requires services at its AAL2 level to offer at least one phishing-resistant option. It treats passkeys that sync across your devices as "syncable authenticators", acceptable at AAL2 but not at AAL3, because the key can be copied to other devices.

In its [passkeys announcement of 23 April 2026](https://www.ncsc.gov.uk/news/ncsc-leave-passwords-in-the-past-passkeys-are-the-future), the NCSC said that passkeys should be consumers' first choice of login, citing its technical report that passkeys are "at least as secure as, and generally more secure than, pairing the strongest password with two-step verification". Where a service does not support passkeys, its advice is to use a password manager and keep using 2SV.

**2FA Authenticator**

Generate RFC 6238 time-based codes in your browser for accounts that use an authenticator app.

[Open 2FA Authenticator](https://www.altftool.com/tools/all/2fa-authenticator)

## Backup codes and changing phones

Losing or replacing a phone is a common way to lose access to codes. NIST describes saved recovery codes as secrets of at least 64 bits that are "intended to be maintained offline (e.g., printed or written down) and stored securely", and says a service must invalidate a code once used and issue a new one. Authenticator accounts that are not moved before a phone change can leave no way to sign in, unless another method such as recovery codes is set up. The [Recovery Code Storage Planner](https://www.altftool.com/tools/all/recovery-code-storage-planner) checks a backup plan against the 3-2-1 rule and flags two traps: codes kept on the same device as the authenticator, and codes stored only inside the password manager they unlock.

## What a browser-based authenticator protects, and what not

The AltFTool 2FA Authenticator keeps secrets in your browser, not on a server. Its vault code encrypts them with AES-256-GCM, either under a non-extractable device key or under a key derived from a passphrase you set (PBKDF2-SHA256, 600,000 iterations). That protects the stored secrets, but it does not change NIST's point: a typed code can still be phished, because a fake page on a different address can still collect a typed code. Browser storage can also be cleared, which is another reason to keep recovery codes offline. A strong, unique password from the [password generator](https://www.altftool.com/tools/all/password-generator) remains the first layer.

## Frequently asked questions

### Is an authenticator app safer than SMS codes?

In NIST SP 800-63B-4, SMS and voice codes are the one restricted authenticator, while app codes are not restricted. Neither is phishing-resistant, because both are typed in.

### Are passkeys more secure than two-factor codes?

The NCSC says passkeys are at least as secure as, and generally more secure than, the strongest password with two-step verification, and NIST counts suitable cryptographic authenticators as phishing-resistant.

### Is SMS two-factor authentication still worth having?

The NCSC recommends 2-step verification on important accounts and notes that codes are often sent by SMS. NIST restricts SMS and voice codes but not app codes, and counts suitable passkeys as phishing-resistant.

### How often do authenticator codes change?

Every 30 seconds by default under RFC 6238, which defines the time step X as a system parameter with a default of 30 seconds.

### What should I do with backup codes?

NIST describes saved recovery codes as meant to be kept offline, for example printed or written down, and stored securely. Each code works once, and a service must issue a new one after use.

## Sources and notes

1. [NIST SP 800-63B-4, Digital Identity Guidelines: Authentication and Authenticator Management (final, July 2025)](https://pages.nist.gov/800-63-4/sp800-63b.html) — National Institute of Standards and Technology
2. [SP 800-63-4 overview: final version released July 2025](https://pages.nist.gov/800-63-4/) — National Institute of Standards and Technology
3. [NCSC: Leave passwords in the past - passkeys are the future (23 April 2026)](https://www.ncsc.gov.uk/news/ncsc-leave-passwords-in-the-past-passkeys-are-the-future) — National Cyber Security Centre
4. [Turn on 2-step verification (2SV) (published 17 December 2018, reviewed 21 December 2021)](https://www.ncsc.gov.uk/collection/top-tips-for-staying-secure-online/activate-2-step-verification-on-your-email) — National Cyber Security Centre
5. [RFC 6238: TOTP: Time-Based One-Time Password Algorithm (May 2011)](https://www.rfc-editor.org/rfc/rfc6238) — IETF / RFC Editor
