summaryrefslogtreecommitdiff
path: root/man/fido2-assert.1
diff options
context:
space:
mode:
Diffstat (limited to 'man/fido2-assert.1')
-rw-r--r--man/fido2-assert.1220
1 files changed, 220 insertions, 0 deletions
diff --git a/man/fido2-assert.1 b/man/fido2-assert.1
new file mode 100644
index 0000000..67883e2
--- /dev/null
+++ b/man/fido2-assert.1
@@ -0,0 +1,220 @@
1.\" Copyright (c) 2018 Yubico AB. All rights reserved.
2.\" Use of this source code is governed by a BSD-style
3.\" license that can be found in the LICENSE file.
4.\"
5.Dd $Mdocdate: November 5 2019 $
6.Dt FIDO2-ASSERT 1
7.Os
8.Sh NAME
9.Nm fido2-assert
10.Nd get/verify a FIDO 2 assertion
11.Sh SYNOPSIS
12.Nm
13.Fl G
14.Op Fl dhpruv
15.Op Fl i Ar input_file
16.Op Fl o Ar output_file
17.Ar device
18.Nm
19.Fl V
20.Op Fl dhpv
21.Op Fl i Ar input_file
22.Ar key_file
23.Op Ar type
24.Sh DESCRIPTION
25.Nm
26gets or verifies a FIDO 2 assertion.
27.Pp
28The input of
29.Nm
30is defined by the parameters of the assertion to be obtained/verified.
31See the
32.Sx INPUT FORMAT
33section for details.
34.Pp
35The output of
36.Nm
37is defined by the result of the selected operation.
38See the
39.Sx OUTPUT FORMAT
40section for details.
41.Pp
42If an assertion is successfully obtained or verified,
43.Nm
44exits 0.
45Otherwise,
46.Nm
47exits 1.
48.Pp
49The options are as follows:
50.Bl -tag -width Ds
51.It Fl G
52Tells
53.Nm
54to obtain a new assertion from
55.Ar device .
56.It Fl V
57Tells
58.Nm
59to verify an assertion using the PEM-encoded public key in
60.Ar key_file
61of type
62.Ar type ,
63where
64.Ar type
65may be
66.Em es256
67(denoting ECDSA over NIST P-256 with SHA-256),
68.Em rs256
69(denoting 2048-bit RSA with PKCS#1.5 padding and SHA-256), or
70.Em eddsa
71(denoting EDDSA over Curve25519 with SHA-512).
72If
73.Ar type
74is not specified,
75.Em es256
76is assumed.
77.It Fl h
78If obtaining an assertion, enable the FIDO2 hmac-secret
79extension.
80If verifying an assertion, check whether the extension data bit was
81signed by the authenticator.
82.It Fl d
83Causes
84.Nm
85to emit debugging output on
86.Em stderr .
87.It Fl i Ar input_file
88Tells
89.Nm
90to read the parameters of the assertion from
91.Ar input_file
92instead of
93.Em stdin .
94.It Fl o Ar output_file
95Tells
96.Nm
97to write output on
98.Ar output_file
99instead of
100.Em stdout .
101.It Fl p
102If obtaining an assertion, request user presence.
103If verifying an assertion, check whether the user presence bit was
104signed by the authenticator.
105.It Fl r
106Obtain an assertion using a resident credential.
107If
108.Fl r
109is specified,
110.Nm
111will not expect a credential id in its input, and may output
112multiple assertions.
113.It Fl u
114Obtain an assertion using U2F.
115By default,
116.Nm
117will use FIDO2 if supported by the authenticator, and fallback to
118U2F otherwise.
119.It Fl v
120If obtaining an assertion, prompt the user for a PIN and request
121user verification from the authenticator.
122If a
123.Em tty
124is available,
125.Nm
126will use it to obtain the PIN.
127Otherwise,
128.Em stdin
129is used.
130If verifying an assertion, check whether the user verification bit
131was signed by the authenticator.
132.El
133.Sh INPUT FORMAT
134The input of
135.Nm
136consists of base64 blobs and UTF-8 strings separated
137by newline characters ('\\n').
138.Pp
139When obtaining an assertion,
140.Nm
141expects its input to consist of:
142.Pp
143.Bl -enum -offset indent -compact
144.It
145client data hash (base64 blob);
146.It
147relying party id (UTF-8 string);
148.It
149credential id, if credential not resident (base64 blob);
150.It
151hmac salt, if the FIDO2 hmac-secret extension is enabled
152(base64 blob);
153.El
154.Pp
155When verifying an assertion,
156.Nm
157expects its input to consist of:
158.Pp
159.Bl -enum -offset indent -compact
160.It
161client data hash (base64 blob);
162.It
163relying party id (UTF-8 string);
164.It
165authenticator data (base64 blob);
166.It
167assertion signature (base64 blob);
168.El
169.Pp
170UTF-8 strings passed to
171.Nm
172must not contain embedded newline or NUL characters.
173.Sh OUTPUT FORMAT
174The output of
175.Nm
176consists of base64 blobs and UTF-8 strings separated
177by newline characters ('\\n').
178.Pp
179For each generated assertion,
180.Nm
181outputs:
182.Pp
183.Bl -enum -offset indent -compact
184.It
185client data hash (base64 blob);
186.It
187relying party id (UTF-8 string);
188.It
189authenticator data (base64 blob);
190.It
191assertion signature (base64 blob);
192.It
193user id, if credential resident (base64 blob);
194.It
195hmac secret, if the FIDO2 hmac-secret extension is enabled
196(base64 blob);
197.El
198.Pp
199When verifying an assertion,
200.Nm
201produces no output.
202.Sh EXAMPLES
203Assuming
204.Pa cred
205contains a
206.Em es256
207credential created according to the steps outlined in
208.Xr fido2-cred 1 ,
209obtain an assertion from an authenticator at
210.Pa /dev/hidraw5
211and verify it:
212.Pp
213.Dl $ echo assertion challenge | openssl sha256 -binary | base64 > assert_param
214.Dl $ echo relying party >> assert_param
215.Dl $ head -1 cred >> assert_param
216.Dl $ tail -n +2 cred > pubkey
217.Dl $ fido2-assert -G -i assert_param /dev/hidraw5 | fido2-assert -V pubkey es256
218.Sh SEE ALSO
219.Xr fido2-cred 1 ,
220.Xr fido2-token 1