1FIDO2-CRED(1) BSD General Commands Manual FIDO2-CRED(1)
2
4 fido2-cred — make/verify a FIDO 2 credential
5
7 fido2-cred -M [-dhqruv] [-i input_file] [-o output_file] device [type]
8 fido2-cred -V [-dhv] [-i input_file] [-o output_file] [type]
9
11 fido2-cred makes or verifies a FIDO 2 credential.
12
13 A credential type may be es256 (denoting ECDSA over NIST P-256 with
14 SHA-256), rs256 (denoting 2048-bit RSA with PKCS#1.5 padding and
15 SHA-256), or eddsa (denoting EDDSA over Curve25519 with SHA-512). If
16 type is not specified, es256 is assumed.
17
18 When making a credential, the authenticator may require the user to
19 authenticate with a PIN. If the -q option is not specified, fido2-cred
20 will prompt the user for the PIN. If a tty is available, fido2-cred will
21 use it to obtain the PIN. Otherwise, stdin is used.
22
23 The input of fido2-cred is defined by the parameters of the credential to
24 be made/verified. See the INPUT FORMAT section for details.
25
26 The output of fido2-cred is defined by the result of the selected opera‐
27 tion. See the OUTPUT FORMAT section for details.
28
29 If a credential is successfully created or verified, fido2-cred exits 0.
30 Otherwise, fido2-cred exits 1.
31
32 The options are as follows:
33
34 -M Tells fido2-cred to make a new credential on device.
35
36 -V Tells fido2-cred to verify a credential.
37
38 -d Causes fido2-cred to emit debugging output on stderr.
39
40 -h If making a credential, enable the FIDO2 hmac-secret extension.
41 If verifying a credential, check whether the extension data bit
42 was signed by the authenticator.
43
44 -i input_file
45 Tells fido2-cred to read the parameters of the credential from
46 input_file instead of stdin.
47
48 -o output_file
49 Tells fido2-cred to write output on output_file instead of
50 stdout.
51
52 -q Tells fido2-cred to be quiet. If a PIN is required and -q is
53 specified, fido2-cred will fail.
54
55 -r Create a resident credential.
56
57 -u Create a U2F credential. By default, fido2-cred will use FIDO2
58 if supported by the authenticator, and fallback to U2F otherwise.
59
60 -v If making a credential, request user verification. If verifying
61 a credential, check whether the user verification bit was signed
62 by the authenticator.
63
65 The input of fido2-cred consists of base64 blobs and UTF-8 strings sepa‐
66 rated by newline characters ('\n').
67
68 When making a credential, fido2-cred expects its input to consist of:
69
70 1. client data hash (base64 blob);
71 2. relying party id (UTF-8 string);
72 3. user name (UTF-8 string);
73 4. user id (base64 blob).
74
75 When verifying a credential, fido2-cred expects its input to consist of:
76
77 1. client data hash (base64 blob);
78 2. relying party id (UTF-8 string);
79 3. credential format (UTF-8 string);
80 4. authenticator data (base64 blob);
81 5. credential id (base64 blob);
82 6. attestation signature (base64 blob);
83 7. attestation certificate (optional, base64 blob).
84
85 UTF-8 strings passed to fido2-cred must not contain embedded newline or
86 NUL characters.
87
89 The output of fido2-cred consists of base64 blobs, UTF-8 strings, and
90 PEM-encoded public keys separated by newline characters ('\n').
91
92 Upon the successful generation of a credential, fido2-cred outputs:
93
94 1. client data hash (base64 blob);
95 2. relying party id (UTF-8 string);
96 3. credential format (UTF-8 string);
97 4. authenticator data (base64 blob);
98 5. credential id (base64 blob);
99 6. attestation signature (base64 blob);
100 7. attestation certificate, if present (base64 blob).
101
102 Upon the successful verification of a credential, fido2-cred outputs:
103
104 1. credential id (base64 blob);
105 2. PEM-encoded credential key.
106
108 Create a new es256 credential on /dev/hidraw5, verify it, and save the id
109 and the public key of the credential in cred:
110
111 $ echo credential challenge | openssl sha256 -binary | base64 >
112 cred_param
113 $ echo relying party >> cred_param
114 $ echo user name >> cred_param
115 $ dd if=/dev/urandom bs=1 count=32 | base64 >> cred_param
116 $ fido2-cred -M -i cred_param /dev/hidraw5 | fido2-cred -V -o cred
117
119 fido2-assert(1), fido2-token(1)
120
122 Please note that fido2-cred handles Basic Attestation and Self Attesta‐
123 tion transparently.
124
125BSD May 10, 2020 BSD