WIP implementaion using TPM2 for fido on Linux
  • Rust 91.7%
  • Nix 5.2%
  • Python 3.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-03 02:43:41 +09:00
.github/workflows enable ci 2026-07-15 02:06:33 +09:00
.sqlx feat(store): track credential registration and last use 2026-08-03 00:43:58 +09:00
agents docs: add security audit report 2026-08-03 02:43:41 +09:00
assets fix(authenticator): tighten CTAP and PCR policy compliance 2026-08-02 22:56:56 +09:00
docs fix(ctaphid): keep transport responsive during CTAP execution 2026-08-03 02:20:29 +09:00
migrations feat(store): track credential registration and last use 2026-08-03 00:43:58 +09:00
nix fix(ctap2): audit reset, selection, and unsupported commands 2026-08-03 01:59:16 +09:00
src refactor(ctap2): simplify CBOR construction and focused tests 2026-08-03 02:28:36 +09:00
.envrc initial 2026-07-13 15:17:53 +09:00
.gitignore initial 2026-07-13 15:17:53 +09:00
AGENTS.md docs: minimize agent guidance 2026-08-02 23:16:54 +09:00
Cargo.lock chore(deps): refresh Rust and Nix inputs 2026-08-02 22:56:56 +09:00
Cargo.toml chore(deps): refresh Rust and Nix inputs 2026-08-02 22:56:56 +09:00
flake.lock chore(deps): refresh Rust and Nix inputs 2026-08-02 22:56:56 +09:00
flake.nix fix db format 2026-07-17 17:35:06 +09:00
LICENSE Add GNU General Public License version 3 2026-07-15 10:35:00 +09:00
README.md feat(cli): print credential IDs as standard base64 2026-08-03 01:29:12 +09:00

Linux TPM Fido2

Linux TPM Fido2 is an experimental Linux TPM-backed FIDO2/WebAuthn authenticator.

It exposes a browser-usable virtual HID authenticator, which uses the TPM for signing.

What It Does

  • Presents a virtual FIDO2 HID authenticator to browsers.
  • Creates TPM-backed P-256 credentials for registration and assertion.
  • Supports secure-boot PCR-bound credentials.
  • Supports recovery material unlocked by a passphrase and kept TPM-bound.
  • Checks user acknowledgement through polkit.

System assumptions

  • Linux
  • Systemd enabled
  • TPM2 on system
  • Secureboot Enabled (Recommended)

Usage

Daemon:

linux-tpm-fido2 daemon --store-dir .linux-tpm-fido2-store --tpm-path /dev/tpmrm0 --uhid-path /dev/uhid

Management examples:

linux-tpm-fido2 list-credentials
linux-tpm-fido2 config show
linux-tpm-fido2 config set default-pcr-policy 1 7
linux-tpm-fido2 config set recovery-passphrase

list-credentials prints the base64 credential ID accepted by fido2-manage -credential, followed by tab-separated RP ID, user name, registration time, last-use time, and bound PCR indices. config show reports the effective default PCR policy and whether recovery passphrase material is configured. Setting the recovery passphrase also updates each credential's recovery slot; the existing update-passphrase command remains as a compatible alias.

Useful flags:

  • --dry-run on the daemon prints the resolved configuration without opening devices.
  • --store-dir selects the SQLite store and UI settings directory.

Features

  • TPM-backed signing keys and PCR policy bindings.
  • Recovery slots stored separately from the primary credential metadata.
  • Sign counter persistence.

Protocol Compliance

The maintained CTAP 2.2 wire-format checklist and audit status are in docs/ctap2-compliance.md.

Future Work

  • Expand CTAP2 compatibility for additional browser request shapes.
  • Harden polkit and session-switch handling.
  • Further security review

Current Limits

  • Experimental only.
  • No FIDO certification claims.
  • No production security claims for the development store.