clickoneclickone
Back to blog
Security

2FA comparison: SMS, authenticator apps, or hardware keys

October 27, 20269 min
By clickone Security Team· Privacy architecture & abuse preventionLast updated

Key takeaways

  • The problem with SMS codes is not whether they can be intercepted, but that a SIM card can be socially engineered into transfer
  • Authenticator apps (Google Authenticator, Authy) generate codes based on time and a shared secret, never over the network, immune to interception
  • Hardware keys (YubiKey) are physical devices requiring insertion or touch to authenticate, offering the strongest phishing defense
  • Backup codes are the last resort: they recover your account when the authenticator app is lost or the hardware key is damaged; store them offline

Two-factor authentication (2FA) splits login into two steps: password is what you know, the second factor is what you have. SMS, authenticator apps, and hardware keys differ sharply in security. This guide compares their attack surfaces and use cases.

SMS codes: most convenient, most fragile

SMS 2FA works like this: after entering your password, the service sends a 6-digit code to your phone number, which you enter to complete login. The problem: the code travels over carrier networks and can be intercepted via SIM hijacking, SS7 protocol flaws, or social engineering the carrier into transferring your number to an attacker's SIM.

Real case: in 2019, Twitter CEO Jack Dorsey's account was taken over when attackers used SIM swapping to receive his SMS codes, bypassing two-factor authentication.

When SMS is your only option

Some banks and government sites offer only SMS 2FA. In those cases you have no choice, but add carrier-level protections (such as China Mobile's service password or requiring in-person ID at the store to swap SIM cards).

Authenticator apps: generated locally, never over the network

Authenticator apps (Google Authenticator, Microsoft Authenticator, Authy, TOTP built into 1Password) work like this: during registration the service gives you a secret key (usually as a QR code); the app uses that key plus the current time to compute a 6-digit code that refreshes every 30 seconds. The code never travels over a network. The server computes the same way; if they match, authentication succeeds.

Advantage: a man-in-the-middle cannot intercept the code because it never enters the network. Even if an attacker has your password, they cannot log in without the code generated by the app on your device.

Disadvantage: if the phone is lost or damaged and you did not back up the secret or save backup codes, you may be permanently locked out. Some apps (early Google Authenticator) did not support cloud sync, requiring re-registration on every device change.

Hardware keys: a physical barrier to phishing

Hardware keys (YubiKey, Google Titan, Thetis) are USB or NFC devices. You insert the key or tap it against your phone, then physically press a button to authenticate. The core advantage is phishing resistance: the key checks the domain of the current site; only the real site can trigger authentication. A phishing site that looks identical will fail domain verification and the key refuses to respond.

Technical detail: hardware keys use FIDO U2F or WebAuthn. Authentication involves a cryptographic pairing of site domain, random challenge, and key signature. A phishing site's domain mismatch causes the key to reject the request.

Buy at least two

Hardware keys are physical devices; losing or breaking one is permanent. Register two keys at setup (one for daily use, one locked at home as backup), or pair with an authenticator app as a fallback.

Attack surface comparison

  • SMS codes: weak MitM resistance (SS7 interception), no phishing resistance (phishing site can relay code in real time), no SIM-swap resistance (SIM can be socially engineered)
  • Authenticator apps: strong MitM resistance (code generated locally), medium phishing resistance (phishing site can trick you into entering code), not dependent on phone number
  • Hardware keys: strong MitM resistance (signature cannot be forged), strong phishing resistance (rejects on domain mismatch), not dependent on phone number

Backup codes: the last lifeline

Regardless of which 2FA you pick, services usually give you a set of backup codes (recovery codes) when you enable 2FA: typically 10 sets of 8-digit numbers. Each code works once, for emergencies like lost authenticator app or broken hardware key.

How to store them: print and put in a drawer at home, or store in an offline password manager. Do not screenshot and keep on your phone; if the phone is gone you cannot access the codes. Do not store in cloud notes; cloud notes require login themselves.

Recommended setup by risk tier

  • High-value accounts (email, password manager, financial): hardware key + authenticator app as dual backup
  • Daily accounts (social media, e-commerce, subscriptions): authenticator app, save the backup codes
  • SMS-only accounts: enable carrier-level protections, periodically check for unauthorized logins on your number
  • Accounts with no 2FA: use a password manager to generate strong random passwords, one unique password per site

Choosing an authenticator app

  • Google Authenticator: simplest, but early versions lacked cloud sync (new versions support Google account sync)
  • Authy: cloud sync and multi-device, but requires phone registration (introduces some SMS risk)
  • 1Password / Bitwarden built-in TOTP: password manager and 2FA in one, convenient but two factors become two pieces of data in one factor
  • Microsoft Authenticator: cloud sync, deep integration with Microsoft accounts

The debate over password manager TOTP

Storing passwords and 2FA codes in the same password manager theoretically weakens the independence of two factors: an attacker who compromises the master password gets both. In practice, a password manager's master password plus key derivation is usually far stronger than typical site passwords, and this combination remains far more secure than weak password plus SMS.

Frequently asked questions

How are authenticator app codes generated?
They use TOTP (Time-based One-Time Password): the service gives you a secret key, the app uses that key plus the current Unix timestamp (rounded to 30-second intervals) to compute a 6-digit number. The server computes the same way; if they match, authentication succeeds.
Do authenticator apps need internet?
No. The code is computed locally; the only requirement is an accurate phone clock. If the phone clock drifts more than a few minutes, codes will not match; sync your clock.
What if I lose my hardware key?
Log in with a backup code or backup key, then revoke the lost key in account security settings. This is why registering at least two keys is recommended.
How likely is SMS code interception?
Mass interception of ordinary users is rare (high cost), but targeted SIM swapping attacks on high-value individuals happen every year. If you are a public figure, hold large amounts of cryptocurrency, or manage corporate accounts, SMS 2FA is insufficient.
Can I enable multiple 2FA methods at once?
Most services allow multiple 2FA methods; at login you pick one. Recommended: bind at least two (e.g., authenticator app plus hardware key), one as primary and one as backup.

Sources & further reading

About the author

clickone Security Team

Privacy architecture & abuse prevention

Privacy belongs in the architecture, not in the policy.

We are the clickone security team. We own privacy architecture and abuse prevention.

More from this team