> For the complete documentation index, see [llms.txt](https://fluf-id.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fluf-id.gitbook.io/docs/solutions/2fa-onchain-auth.md).

# 2FA OnChain Auth

A private on-chain 2FA system utilizing passkeys and fhEVM. A decentralised alternative to traditional 2FA apps like Google Authenticator.

A comprehensive on-chain 2FA solution that leverages FHE on fhEVM to generate and verify TOTP codes in a privacy-preserving manner. This will allow decentralized applications to implement robust two-factor authentication without relying on centralized services or exposing user secrets. <br>

The key innovation lies in using FHE to perform encrypted operations on the user's secret key, enabling on-chain TOTP generation and verification without ever decrypting the key. This enhances security and aligns with the core principles of decentralization and user sovereignty.

<figure><img src="https://3352277525-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGegWrI6ddibEcJlbbQEZ%2Fuploads%2FpbohYoBuglThTA9P0qdI%2FWhatsApp%20Image%202024-05-04%20at%2010.27.50%20AM.jpeg?alt=media&amp;token=025443b0-6caf-4354-a6bf-599f78dec072" alt=""><figcaption><p>Authenticator Flow</p></figcaption></figure>
