Provides library functionality for FIDO 2.0, including communication with a device over USB.
Switch branches/tags
Clone or download
martelletto only run regress tests on debug builds
do not attempt to build and run regression tests if CMAKE_BUILD_TYPE
isn't set to "Debug", as NDEBUG might be defined. pointed out by
Karol Babioch in github issue #8.
Latest commit 99a9be5 Oct 1, 2018



Build Status (Travis) Build Status (AppVeyor) License

libfido2 provides library functionality and command-line tools to communicate with a FIDO device over USB, and to verify attestation and assertion signatures.

libfido2 supports the FIDO U2F (CTAP 1) and FIDO 2.0 (CTAP 2) protocols.

For usage, see the examples/ directory.


libfido2 is licensed under the BSD 2-clause license. See the LICENSE file for the full license text.

Supported Platforms

libfido2 is known to work on Linux, MacOS, and Windows.


Documentation is available in troff and HTML formats. An online mirror of libfido2's documentation is also available.



The current release of libfido2 is 0.3.0. Please consult Yubico’s release page for source and binary releases.


$ sudo apt-add-repository ppa:yubico/stable
$ sudo apt update
$ sudo apt install libfido2-dev

Or from source, on UNIX-like systems:

$ (rm -rf build && mkdir build && cd build && cmake ..)
$ make -C build
$ sudo make -C build install

Depending on the platform, the PKG_CONFIG_PATH environment variable may need to be set.

libfido2 depends on hidapi, libcbor, and LibreSSL (alternatively, OpenSSL may be used).

For complete, OS-specific installation instructions, please refer to the .travis/ (Linux, MacOS) and windows/ directories.

Under Linux you will need to add a Udev rule to be able to access the FIDO device, or run as root. For example, the Udev rule may contain the following:

#Udev rule for allowing HID access to Yubico devices for FIDO support.

KERNEL=="hidraw*", SUBSYSTEM=="hidraw", \
  MODE="0664", GROUP="plugdev", ATTRS{idVendor}=="1050"