Skip to main content

Virt-FIDO2

Demo

demo.webm

Description

A small, per-user FIDO2 authenticator for Linux. It appears to browsers and local applications as a virtual USB security key. Your desktop's Polkit authentication agent verifies each registration or login, and the TPM creates and signs with ES256 and RS256 passkey keys.

This is an early implementation, that only supports modern CTAP2 (ES256 and RS256) passkeys including discoverable credentials. No CTAP1/U2F or optional CTAP extensions. Its virtual USB transport is presented as a roaming security key, so sites that insist on a platform-only authenticator may not offer it.

The authenticator identifies its model with AAGUID 7849e707-af46-4b9c-a766-68f5938cd846 and appears locally as Virt-FIDO2. Websites can display that name only if their AAGUID metadata recognizes it; the USB name itself is not sent to websites.

For Virt-FIDO2 to properly work you will need uv (pip should work too), systemD and a Polkit authentication agent. If you are on Cinnamon, Deepin, Hyprland, GNOME, GNOME Flashback, KDE, LXDE, LXQt, MATE, or Xfce, you already have a Polkit authentication agent installed.

Installation

uv tool install virt-fido2
virt-fido2 install
virt-fido2 enable

virt-fido2 install copies the bundled Polkit policy and udev rule into system directories and reloads udev.

virt-fido2 enable copies the bundled systemD service into the $HOME/.config/systemd/user and runs the equivalent to systemctl --user enable --now virt-fido2.service (just in python)

Run virt-fido2 --help for the other commands.

Development

Requirements

  • uv
  • tpm2-tss
  • systemd

The user service needs read/write access to the TPM resource manager and virtual HID device. The bundled udev rule grants it to the active local user, without tss group membership.

The credential index is stored at $XDG_DATA_HOME/virt-fido2/credentials.json, or ~/.local/share/virt-fido2/credentials.json by default. The index contains RP and user metadata plus opaque TPM-wrapped credential IDs. The private signing keys remain protected by the TPM. Back up this file if you want discoverable credentials to remain findable after restoring your home directory. The TPM-bound credentials cannot be transferred to another TPM.

Polkit gates operations performed by this service; it is not part of the TPM key's authorization policy. A process that obtains both a credential ID and direct access to the same TPM could bypass this service's prompt. The TPM still prevents export of the private signing keys.

Commands

uv run -m unittest discover -s tests -v
uv run ty check
uv run ruff check

License

    Virt-FIDO2, a TPM-backed virtual FIDO2 passkey authenticator for Linux
    Copyright (C) 2026 VinVel


    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program. If not, see <https://www.gnu.org/licenses/>.

Metadata

Release files for virt-fido2 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for virt-fido2 0.2.2
File Size Uploaded Provenance Actions
virt_fido2-0.2.2.tar.gz 113.0 kB Without provenance Details for virt_fido2-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for virt-fido2 0.2.2
File Interpreter ABI Platform Actions
virt_fido2-0.2.2-py3-none-any.whl Python 3 none any Details for virt_fido2-0.2.2-py3-none-any.whl

Total release size: 244.4 kB

Release files / virt_fido2-0.2.2.tar.gz

Download URL virt_fido2-0.2.2.tar.gz
Size 113.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a33fa9e516825f162aa96ca8ea4de0155a8a70ffad7da6715b189c74838e5992
BLAKE2b-256 checksum
How to use checksums
988d2d0c4d40f08b65e30d5ec12239eb5a462e497a80628881542094a5bd3afc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / virt_fido2-0.2.2-py3-none-any.whl

Download URL virt_fido2-0.2.2-py3-none-any.whl
Size 131.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0becf5e9efc28675c1258d132bd840d6e1fe0fdf66b7e8145f0336abb1ed4d47
BLAKE2b-256 checksum
How to use checksums
d893f2e00ea33f913b5c1a9a94ec222e2beb87543c9cedabbe9d372d3a577f90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for virt-fido2 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page