Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

You can build a desktop TOTP authenticator with Rust, Tauri, and React, but calling it “zero-knowledge” is justified only if the service that stores or synchronizes the vault cannot decrypt its contents. The client must still access each account’s shared secret to generate a code. A secondary article describes a project called OtpVault as using AES-256-GCM and Argon2id, but that description is not an independently verified implementation or security audit. This guide explains the architecture and the checks a developer needs before making the claim.

What a TOTP authenticator has to do

A TOTP authenticator stores a shared secret for each account and uses it with the current time to calculate a short-lived one-time password. The service being logged into and the authenticator both need the same secret; the authenticator’s job is to produce a code the service can verify. TOTP is specified in RFC 6238, building on the counter-based HOTP algorithm in RFC 4226.

The Rust crate documentation illustrates implementation choices including HMAC-SHA-1, HMAC-SHA-256, and HMAC-SHA-512, and six-, seven-, or eight-digit outputs. Those are examples of supported options, not evidence of which library, hash, digit count, or time-step a particular app uses. An authenticator must use the parameters provisioned for the account.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The secret is the essential asset

The account’s shared secret is more sensitive than the displayed code: codes expire, while a copied secret can be used to generate future codes. Protect it throughout its lifecycle—when it is entered or imported, saved, decrypted, synchronized, used to calculate a code, and removed. Encryption at rest protects a specific storage exposure; it does not make the secret unnecessary to the client.

#1 Best Overall
Yubico - Security Key C NFC - Basic Compatibility - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified
  • POWERFUL SECURITY KEY: The Security Key C NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
  • WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key C NFC secures 100 of your favorite accounts, including email, password managers, and more.
  • FAST & CONVENIENT LOGIN: Plug in your Security Key C NFC via USB-C and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
  • TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
  • BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.

What is known about the OtpVault example

A secondary article published by the forva AI Column Editorial Team on August 24, 2026 describes a Rust, Tauri, and React app called OtpVault and reports that it uses AES-256-GCM and Argon2id. It also characterizes the design as zero-knowledge. The article is available at forva.jp. No primary project repository or original build article was located for this project, so its precise key flow, cryptographic parameters, storage behavior, and IPC design are not established here. The reported algorithms alone do not prove the app is secure or that its zero-knowledge claim holds.

Reported detail What it can mean What it does not establish
AES-256-GCM An authenticated-encryption algorithm can protect vault data when used with sound key and nonce handling. Who controls the decryption key, how it is derived or stored, whether nonces are managed safely, or whether the implementation was reviewed.
Argon2id A password-based key-derivation function can make guessing a password more costly when configured appropriately. The work parameters, salt handling, password quality, recovery design, or whether the derived key remains unavailable to a server.
“Zero-knowledge” A claim that a service cannot access the plaintext vault may be meaningful if the client alone controls decryption. That the claim is true without a verifiable key flow, server behavior, and implementation details.

Design the vault around a precise zero-knowledge boundary

Define the threat model before choosing encryption. For a synchronized vault, the key question is whether the synchronization service can ever obtain plaintext account secrets or the key needed to decrypt them. Encrypting data before upload is not sufficient if the server also receives the key, can request plaintext from the client, or can deliver modified client code that captures secrets.

Rank #2
Yubico - YubiKey 5C NFC - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified - Protect Your Online Accounts
  • POWERFUL SECURITY KEY: The YubiKey 5C NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
  • WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5C NFC secures 100+ of your favorite accounts, including email, password managers, and more
  • FAST & CONVENIENT LOGIN: Plug in your YubiKey 5C NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
  • MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
  • PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts

Separate vault protection from TOTP generation

A typical client-side design derives or unlocks a vault key on the device, decrypts the vault locally, and uses an account’s secret to calculate a code. If the vault is locked, the encrypted representation can be stored or synchronized without exposing the plaintext secret to that service. When the user unlocks it, plaintext necessarily exists in some form on the device—at least in memory during calculation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A password-derived key needs a unique salt and deliberate derivation parameters; the password itself should not be sent to a synchronization service. Authenticated encryption must reject altered ciphertext, and nonce handling must follow the algorithm’s requirements. These are design requirements, not verified details of OtpVault. An app also needs to decide what happens when a password is forgotten: if no recovery key or other recovery mechanism exists, client-only encryption can mean the vault cannot be recovered.

Rank #3
Yubico - YubiKey 5 NFC - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-A or NFC, FIDO Certified - Protect Your Online Accounts
  • POWERFUL SECURITY KEY: The YubiKey 5 NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
  • WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5 NFC secures 100+ of your favorite accounts, including email, password managers, and more
  • FAST & CONVENIENT LOGIN: Plug in your YubiKey 5 NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
  • MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
  • PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts

Limit plaintext lifetime and exposure

  • Keep decrypted secrets out of persistent logs, crash reports, analytics, and unnecessary backups.
  • Unlock only when needed, and define when the app locks again after inactivity or backgrounding.
  • Minimize copies in memory and avoid placing secrets in UI state unless React needs them for a specific user-visible operation.
  • Make export, clipboard, and account-removal behavior explicit; each can create another exposure or recovery path.
  • Document whether sync metadata—such as account labels or record counts—remains visible even when secret values are encrypted.

Put a narrow Rust–React boundary in Tauri

Tauri separates the Rust core from the frontend WebView and uses inter-process communication (IPC) between them. Its v2 security documentation explains that capabilities restrict which core commands a WebView can call. Tauri also cautions that application security is the combined security of Tauri, Rust and npm dependencies, application code, and the devices running the app. See the Tauri v2 security documentation.

Keep sensitive operations in the core where practical

Make Rust commands narrow: for example, expose only the operations the interface needs, such as unlocking a vault, listing display-ready account records, or generating a selected code. Validate command inputs at the boundary, restrict command access through capabilities, and do not create a generic command that lets the WebView read arbitrary files or invoke broad system functionality. These are design recommendations; the available description does not establish how OtpVault implements its commands.

Rank #4
Yubico - Security Key NFC - Basic Compatibility - Multi-Factor Authentication (MFA) Key, Connect via USB-A or NFC, FIDO Certified
  • POWERFUL SECURITY KEY: The Security Key NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
  • WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key NFC secures 100 of your favorite accounts, including email, password managers, and more.
  • FAST & CONVENIENT LOGIN: Plug in your Security Key NFC via USB-A and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
  • TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
  • BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.

Moving logic into Rust does not make secrets invulnerable. If a command returns a secret or code to React, that value crosses IPC and becomes available to the WebView. A compromised or malicious frontend can potentially misuse whatever its capabilities permit. Design the interface so the WebView receives only what it must render, and treat the Rust core, frontend bundle, dependencies, update mechanism, and host device as parts of the security boundary.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Build and verify the app in deliberate stages

  1. Specify the threat model. Write down whether the app is local-only or synchronized, which components may be hostile, what data a server can see, and how users recover a lost device or password. Do not call the design zero-knowledge until the service’s inability to decrypt is part of the architecture.
  2. Define the vault format and key flow. Decide how account secrets are represented, how encryption keys are created or unlocked, how salts and nonces are stored, and how tampering is detected. Keep these choices explicit and reviewable rather than relying on an algorithm name as a security argument.
  3. Implement TOTP as a distinct function. Use a maintained implementation of the relevant standard or carefully implement RFC 6238. Match each account’s provisioned parameters, handle time accurately, and test against standard vectors. The totp-rfc documentation describes one Rust implementation’s supported algorithms and output lengths; it does not establish that the OtpVault project uses that crate.
  4. Build the Rust core and IPC surface. Keep cryptographic and vault operations behind small commands, validate every request, and configure Tauri capabilities so the WebView receives only the access it needs.
  5. Build the React interface around minimal disclosure. Render account labels and current codes without retaining master passwords or full decrypted vaults in UI state longer than necessary. Handle lock, visibility, clipboard, and import/export behavior deliberately.
  6. Test security properties, not just code generation. Check correct TOTP vectors, rejection of modified ciphertext, locked-vault behavior, malformed IPC inputs, access restrictions, secret leakage in logs, and recovery behavior. A passing test suite does not by itself constitute an independent security audit.
  7. Review the whole release path. Examine dependencies, permissions, update delivery, build artifacts, and device assumptions. Tauri’s warning about the combined security of the framework, dependencies, code, and devices applies beyond the encryption function.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How TOTP differs from WebAuthn

TOTP is based on a shared secret copied between the service and the authenticator. WebAuthn uses public-key credentials associated with a relying party and an authenticator. The W3C Web Authentication specification describes that public-key model, while the webauthn-rs documentation describes the server, browser, and authenticator roles.

Best Value
Yubico - Security Key C NFC - Basic Compatibility - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified (Pack of 2)
  • The information below is per-pack only
  • POWERFUL SECURITY KEY: The Security Key C NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
  • WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key C NFC secures 100 of your favorite accounts, including email, password managers, and more.
  • FAST & CONVENIENT LOGIN: Plug in your Security Key C NFC via USB-C and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
  • TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
Consideration TOTP WebAuthn
Credential model A shared secret is held by the authenticator and the service. A public-key credential is scoped to a relying party; the service uses the public key.
Phishing resistance A code can be relayed to a fake login site; TOTP alone is not phishing-resistant. Relying-party scoping helps bind authentication to the legitimate site.
Device and recovery Depends on protecting and, if needed, transferring or backing up shared secrets. Depends on authenticator and service support, plus the user’s credential recovery or backup arrangements.
Integration Useful where a service offers authenticator-app codes. Requires the service and client ecosystem to support WebAuthn credentials.

The Rust Project’s policy for its own critical infrastructure ranks FIDO2/WebAuthn security keys first, hardware-enabled WebAuthn passkeys second, and TOTP apps third, and advises privileged users to choose the strongest method a service supports. That is guidance for the Rust Project’s environment, not a universal ranking for every system; see the policy. A TOTP app remains a useful option when a service offers it, but adding one does not make every login phishing-resistant.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.