xref: /freebsd/contrib/libfido2/README.adoc (revision 81b22a98)
1== libfido2
2
3image:https://github.com/yubico/libfido2/workflows/linux/badge.svg["Linux Build Status (github actions)", link="https://github.com/Yubico/libfido2/actions"]
4image:https://github.com/yubico/libfido2/workflows/macos/badge.svg["macOS Build Status (github actions)", link="https://github.com/Yubico/libfido2/actions"]
5image:https://github.com/yubico/libfido2/workflows/windows/badge.svg["Windows Build Status (github actions)", link="https://github.com/Yubico/libfido2/actions"]
6image:https://github.com/yubico/libfido2/workflows/fuzzer/badge.svg["Fuzz Status (github actions)", link="https://github.com/Yubico/libfido2/actions"]
7image:https://oss-fuzz-build-logs.storage.googleapis.com/badges/libfido2.svg["Fuzz Status (oss-fuzz)", link="https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:libfido2"]
8
9*libfido2* provides library functionality and command-line tools to
10communicate with a FIDO device over USB, and to verify attestation and
11assertion signatures.
12
13*libfido2* supports the FIDO U2F (CTAP 1) and FIDO 2.0 (CTAP 2) protocols.
14
15For usage, see the `examples/` directory.
16
17=== License
18
19*libfido2* is licensed under the BSD 2-clause license. See the LICENSE
20file for the full license text.
21
22=== Supported Platforms
23
24*libfido2* is known to work on Linux, macOS, Windows, OpenBSD, and FreeBSD.
25
26=== Documentation
27
28Documentation is available in troff and HTML formats. An
29https://developers.yubico.com/libfido2/Manuals/[online mirror of *libfido2*'s documentation]
30is also available.
31
32=== Bindings
33
34* .NET: https://github.com/borrrden/Fido2Net[Fido2Net]
35* Go: https://github.com/keys-pub/go-libfido2[go-libfido2]
36* Perl: https://github.com/jacquesg/p5-FIDO-Raw[p5-FIDO-Raw]
37* Rust: https://github.com/PvdBerg1998/libfido2[libfido2]
38
39=== Installation
40
41==== Releases
42
43The current release of *libfido2* is 1.8.0. Please consult Yubico's
44https://developers.yubico.com/libfido2/Releases[release page] for source
45and binary releases.
46
47==== Ubuntu 20.04 (Focal)
48
49  $ sudo apt install libfido2-1
50  $ sudo apt install libfido2-dev
51  $ sudo apt install libfido2-doc
52
53Alternatively, newer versions of *libfido2* are available in Yubico's PPA.
54Follow the instructions for Ubuntu 18.04 (Bionic) below.
55
56==== Ubuntu 18.04 (Bionic)
57
58  $ sudo apt install software-properties-common
59  $ sudo apt-add-repository ppa:yubico/stable
60  $ sudo apt update
61  $ sudo apt install libfido2-dev
62
63==== macOS
64
65  $ brew install libfido2
66
67Or from source, on UNIX-like systems:
68
69  $ (rm -rf build && mkdir build && cd build && cmake ..)
70  $ make -C build
71  $ sudo make -C build install
72
73Depending on the platform,
74https://www.freedesktop.org/wiki/Software/pkg-config/[pkg-config] may need to
75be installed, or the PKG_CONFIG_PATH environment variable set.
76
77*libfido2* depends on https://github.com/pjk/libcbor[libcbor],
78https://www.openssl.org[OpenSSL], and https://zlib.net[zlib]. On Linux, libudev
79(part of https://www.freedesktop.org/wiki/Software/systemd[systemd]) is also
80required.
81
82For complete, OS-specific installation instructions, please refer to the
83`.actions/` (Linux, macOS) and `windows/` directories.
84
85On Linux, you will need to add a udev rule to be able to access the FIDO
86device, or run as root. For example, the udev rule may contain the following:
87
88----
89#udev rule for allowing HID access to Yubico devices for FIDO support.
90
91KERNEL=="hidraw*", SUBSYSTEM=="hidraw", \
92  MODE="0664", GROUP="plugdev", ATTRS{idVendor}=="1050"
93----
94