A FIDO2 passwordless authentication system using YubiKey, featuring a Flask backend and a C# Windows client.
This project implements FIDO2 (Fast Identity Online 2.0) authentication using YubiKey, ensuring secure and passwordless login.
It supports both Registration and Authentication, using public-key cryptography for user verification.
- Backend: Flask + Python (
cryptography,cbor2) - Frontend: C# (
Yubico.YubiKey.Fido2) - Data Storage: JSON files (scalable to SQL database)
(Requires Python 3.8+)
cd backend
pip install -r requirements.txtStart the Flask server:
python server.pyThe backend will listen on http://127.0.0.1:5000/.
(Requires .NET Framework 4.8+)
Run Program.cs to register or log in using YubiKey.
- Insert YubiKey, then launch the frontend application.
- Select "Register", and the server will return a Challenge.
- YubiKey generates a key pair and sends the public key & credential ID to the server.
- If successful, the credential ID is stored on the server.
- Select "Login", and the server returns Challenge & Credential ID.
- YubiKey signs the challenge using the private key and sends the signed data to the server.
- The server verifies the signature, and if valid, authentication succeeds.
- FIDO2 consists of WebAuthn (Client API) and CTAP2 (Authenticator Protocol).
- Supports hardware keys (YubiKey, Windows Hello, biometrics, etc.).
- Passwordless authentication using public-key cryptography, preventing phishing attacks.
For a detailed explanation of the FIDO2 authentication process, please refer to: 📄 FIDO2 Architecture and Data Explanation
