pratham-bhatnagar / fhe-2fa

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TOTP (Time-based One-Time-Password) Dapp

On-chain TOPT (Time-based One-Time-Password).

The user client, which also possesses the secret key, generates a TOTP code that can be validated on-chain without the necessity of decrypting the secret key. Employing FHE, it becomes feasible to perform a multiplication operation between the secret key and the timestamp in an encrypted manner, subsequently comparing the product to the TOTP code for verification.

The Solidity contract can be found in TOTP.sol.

Get Started

Clone the project, then run:

npm install
npm run dev

The dapp should run on http://localhost:5173.

About


Languages

Language:JavaScript 81.8%Language:CSS 9.5%Language:HTML 8.7%