]> err.no Git - yubikey-personalization/blob - ykpersonalize.1
Merge tag 'v1.15.1'
[yubikey-personalization] / ykpersonalize.1
1 .\" Copyright (c) 2009-2014 Yubico AB
2 .\" Copyright (C) 2009, 2010 Tollef Fog Heen <tfheen@err.no>
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions are
7 .\" met:
8 .\"
9 .\"     * Redistributions of source code must retain the above copyright
10 .\"       notice, this list of conditions and the following disclaimer.
11 .\"
12 .\"     * Redistributions in binary form must reproduce the above
13 .\"       copyright notice, this list of conditions and the following
14 .\"       disclaimer in the documentation and/or other materials provided
15 .\"       with the distribution.
16 .\"
17 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 .\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 .\"
29 .\" The following commands are required for all man pages.
30 .de URL
31 \\$2 \(laURL: \\$1 \(ra\\$3
32 ..
33 .if \n[.g] .mso www.tmac
34 .TH ykpersonalize "1" "August 2009" "yubikey-personalization"
35 .SH NAME
36 ykpersonalize - personalize YubiKey OTP tokens
37 .SH SYNOPSIS
38 .B ykpersonalize
39 [\fI-1\fR | \fI-2\fR] [\fI-sfile\fR] [\fI-ifile\fR] [\fI-fformat\fR] [\fI-axxx\fR] [\fI-cxxx\fR]
40 [\fI-ooption\fR] [\fI-y\fR] [\fI-v\fR] [\fI-d\fR] [\fI-h\fR] [\fI-n\fR] [\fI-t\fR] [\fI-u\fR] [\fI-x\fR]
41 [\fI-z\fR] [\fI-m\fR] [\fI-S\fR] [\fI-V\fR]
42 .\".SH DESCRIPTION
43 .\" Add any additional description here
44 .SH OPTIONS
45 .PP
46 Set the AES key, user ID and other settings in a YubiKey.  For the complete
47 explanation of the meaning of all parameters, see the reference
48 manual:
49 .URL "http://yubico.com/files/YubiKey_manual-2.0.pdf" "YubiKey manual"
50 .TP
51 \fB\-1\fR
52 change the first configuration.  This is the default and is
53 normally used for true OTP generation.  In this configuration,
54 the option flag \fB-oappend-cr\fR is set by default.
55 .TP
56 \fB\-2\fR
57 change the second configuration.  This is for YubiKey II only and is
58 then normally used for static key generation.  In this configuration,
59 the option flags \fB-oappend-cr\fR, \fB-ostatic-ticket\fR, \fB-ostrong-pw1\fR,
60 \fB-ostrong-pw2\fR and \fB-oman-update\fR are set by default.
61 .TP
62 \fB-z\fR
63 delete configuration in selected slot
64 .TP
65 \fB\-s\fIfile\fR
66 save configuration to file instead of key.
67 (if file is -, send to stdout)
68 .TP
69 \fB\-i\fIfile\fR
70 read configuration from file.
71 (if file is -, read from stdin)
72 .TP
73 \fB\-f\fIformat\fR
74 format to be used with \fB-s\fR and \fB-i\fR.
75 Valid options are \fBycfg\fR and \fBlegacy\fR.
76 .TP
77 \fB\-a\fR[\fIxxx\fR]
78 the AES secret key as a 32 (or 40 for OATH-HOTP/HMAC CHAL-RESP) char hex value (not modhex) (none to prompt for key on stdin)
79 If \fB\-a\fR is not used a random key will be generated.
80 .TP
81 \fB\-c\fIxxx\fR
82 A 12 char hex value (not modhex) to use as access code for
83 programming.
84 NOTE: this does NOT SET the access code, that's done with \fB-oaccess\fI=\fR.
85 .TP
86 \fB\-o\fIoption\fR
87 change configuration option.  Possible option arguments are
88 .RS
89 .TP
90 \fBfixed\fR=\fIfffffffffff\fR
91 The modhex \fIpublic identity\fR of the YubiKey, 0-32 characters long (encoding
92 up to 16 bytes).
93 It's possible to give the identity in hex as well, just prepend the
94 value with `h:'. The fixed part is emitted before the OTP when the
95 button on the YubiKey is pressed. It can be used as an identifier for
96 the user, for example.
97 .TP
98 \fBuid\fR=\fIuuuuuu\fR
99 The uid part of the generated OTP, also called \fIprivate identity\fR, in hex.
100 Must be 12 characters long. The uid is 6 bytes of static data that is included
101 (encrypted) in every OTP, and is used to validate that an OTP was in fact encrypted
102 with the AES key shared between the YubiKey and the validation service. It cannot
103 be used to identify the YubiKey as it is only readable to those that know
104 the AES key.
105 .TP
106 \fBaccess\fR=\fIfffffffffff\fR
107 New hex access code to set. Must be 12 characters long.
108 If an access code is set, it will be required for subsequent reprogramming of the YubiKey.
109 .TP
110 \fBoath-imf\fR=\fIxxx\fR
111 Set OATH Initial Moving Factor. This is the initial counter value for the YubiKey.
112 This should be a value between 0 and 1048560, evenly dividable by 16.
113 .TP
114 [\-]\fIticket-flag\fR
115 Set/clear ticket flag, see the section `Ticket flags\&'
116 .TP
117 [\-]\fIconfiguration-flag\fR
118 Set/clear ticket flag, see the section `Configuration flags\&'
119 .RE
120 .TP
121 \fB-y\fR
122 always commit without prompting
123 .TP
124 \fB-d\fR
125 dry-run, run without writing a YubiKey
126 .TP
127 \fB-v\fR
128 Be more verbose
129 .TP
130 \fB-h\fR
131 Help
132 .TP
133 \fB-V\fR
134 Version
135 .TP
136 \fBYubiKey NEO only\fR
137 .RS
138 .TP
139 \fB-m mode\fR
140 set device configuration for the YubiKey NEO.  It is parsed in the form
141 \fImode:cr_timeout:autoeject_timeout\fR
142 .br
143 where mode is:
144 .br
145 0    HID device only.
146 .br
147 1    CCID device only.
148 .br
149 2    HID/CCID composite device.
150 .br
151 Add 80 to set MODE_FLAG_EJECT, for example: 81
152 .br
153 cr_timeout is the timeout in seconds for the YubiKey to wait on button press for challenge response (default is 15)
154 .br
155 autoeject_timeout is the timeout in seconds before the card is automatically ejected in mode 81
156 .TP
157 \fB-S\fI0605...\fR
158 set the scanmap to be used with the YubiKey NEO.  It must be 45 unique
159 bytes as 90 characters.  Leave argument empty to reset to the YubiKey's default.
160 The scanmap must be sent in the order:
161 .br
162 \fIcbdefghijklnrtuvCBDEFGHIJKLNRTUV0123456789!\\t\\r\fR.
163 .br
164 the default scanmap in the YubiKey is:
165 .br
166 \fI06050708090a0b0c0d0e0f111517181986858788898a8b8c8d8e8f
167 .br
168 9195979899271e1f202122232425269e2b28\fR
169 .br
170 an example for simplified us dvorak would be:
171 .br
172 \fI0c110b071c180d0a0619130f120e09378c918b879c988d8a869993
173 .br
174 8f928e89b7271e1f202122232425269e2b28\fR
175 .br
176 or for a french azerty keyboard (digits are shifted):
177 .br
178 \fI06050708090a0b0c0d0e0f111517181986858788898a8b8c8d8e8f
179 .br
180 9195979899a79e9fa0a1a2a3a4a5a6382b28\fR
181 .br
182 and a turkish example (has a dotless i instead of usual i):
183 .br
184 \fI06050708090a0b340d0e0f111517181986858788898a8b8c8d8e8f
185 .br
186 9195979899271e1f202122232425269e2b28\fR
187 .br
188 Note that you must remove any whitespace present in these examples
189 before using the values.
190 .TP
191 \fB-n URI\fR
192 Program NFC NDEF URI
193 .TP
194 \fB-t text\fR
195 Program NFC NDEF text
196 .RE
197 .TP
198 \fBYubiKey 2.3 and above\fR
199 .RS
200 .TP
201 \fB-u\fR
202 Update existing configuration, rather than overwriting
203 .TP
204 \fB-x\fR
205 Swap configuration slot 1 and 2 inside the YubiKey
206 .RE
207 .SH Ticket flags
208 .TP
209 [\-]\fBtab-first\fR
210 Send a tab character as the first character.  This is usually used to move
211 to the next input field.
212 .TP
213 [\-]\fBappend-tab1\fR
214 Send a tab character between the fixed part and the one-time password
215 part. This is useful if you have the fixed portion equal to the user
216 name and two input fields that you navigate between using tab.
217 .TP
218 [\-]\fBappend-tab2\fR
219 Send a tab character as the last character.
220 .TP
221 [\-]\fBappend-delay1\fR
222 Add a half-second delay before sending the one-time password part.
223 .TP
224 [\-]\fBappend-delay2\fR
225 Add a half-second delay after sending the one-time password part.
226 .TP
227 [\-]\fBappend-cr\fR
228 Send a carriage return after sending the one-time password part.
229 .TP
230 \fBYubiKey 2.0 firmware and above\fR
231 .TP
232 [\-]\fBprotect-cfg2\fR
233 When written to configuration 1, block later updates to configuration
234 2.  When written to configuration 2, prevent configuration 1 from
235 having the lock bit set.
236 .TP
237 \fBYubiKey 2.1 firmware and above\fR
238 .TP
239 [\-]\fBoath-hotp\fR
240 Set OATH-HOTP mode rather than YubiKey mode.  In this mode, the token
241 functions according to the OATH-HOTP standard.
242 .TP
243 \fBYubiKey 2.2 firmware and above\fR
244 .TP
245 [\-]\fBchal-resp\fR
246 Set challenge-response mode.
247 .SH Configuration flags
248 [\-]\fBsend-ref\fR
249 Send a reference string of all 16 modhex characters before the fixed
250 part.  This can not be combined with the \fB-ostrong-pw2\fR flag.
251 .TP
252 [\-]\fBpacing-10ms\fR
253 Add a 10ms delay between key presses.
254 .TP
255 [\-]\fBpacing-20ms\fR
256 Add a 20ms delay between key presses.
257 .TP
258 [\-]\fBstatic-ticket\fR
259 Output a fixed string rather than a one-time password.  The password
260 is still based on the AES key and should be hard to guess and
261 impossible to remember.
262 .TP
263 \fBYubiKey 1.x firmware only\fR
264 .TP
265 [\-]\fBticket-first\fR
266 Send the one-time password rather than the fixed part first.
267 .TP
268 [\-]\fBallow-hidtrig\fR
269 Allow trigger through HID/keyboard by pressing caps-, num or
270 scroll-lock twice.  Not recommended for security reasons.
271 .TP
272 \fBYubiKey 2.0 firmware and above\fR
273 .TP
274 [\-]\fBshort-ticket\fR
275 Limit the length of the static string to max 16 digits.  This flag
276 only makes sense with the \fB-ostatic-ticket\fR option.  When
277 \fB-oshort-ticket\fR is used without \fB-ostatic-ticket\fR it will
278 program the YubiKey in "scan-code mode", in this mode the key sends
279 the contents of fixed, uid and key as raw keyboard scancodes.  For
280 example, by using the fixed string \fIh:8b080f0f122c9a12150f079e\fR in
281 this mode it will send \fIHello World!\fR on a qwerty keyboard.  This
282 mode sends raw scan codes, so output will differ between keyboard layouts.
283 .TP
284 [\-]\fBstrong-pw1\fR
285 Upper-case the two first letters of the output string.  This is for
286 compatibility with legacy systems that enforce both uppercase and
287 lowercase characters in a password and does not add any security.
288 .TP
289 [\-]\fBstrong-pw2\fR
290 Replace the first eight characters of the modhex alphabet with the
291 numbers 0 to 7.  Like \fB-ostrong-pw1\fR, this is intended to support
292 legacy systems.
293 .TP
294 [\-]\fBman-update\fR
295 Enable user-initiated update of the static password.  Only makes sense
296 with the \fB-ostatic-ticket\fR option.
297 .TP
298 \fBYubiKey 2.1 firmware and above\fR
299 .TP
300 [\-]\fBoath-hotp8\fR
301 When set, generate an 8-digit HOTP rather than a 6-digit one.
302 .TP
303 [\-]\fBoath-fixed-modhex1\fR
304 When set, the first byte of the fixed part is sent as modhex.
305 .TP
306 [\-]\fBoath-fixed-modhex2\fR
307 When set, the first two bytes of the fixed part is sent as modhex.
308 .TP
309 [\-]\fBoath-fixed-modhex\fR
310 When set, the fixed part is sent as modhex.
311 .TP
312 \fBoath-id=m:OOTTUUUUUUUU\fR
313 Configure OATH token id with a provided value.  See description of
314 this option under the 2.2 section for details, but note that a YubiKey
315 2.1 key can't report its serial number and thus a token identifier value
316 must be specified.
317 .TP
318 \fBYubiKey 2.2 firmware and above\fR
319 .TP
320 [\-]\fBchal-yubico\fR
321 Yubico OTP challenge-response mode.
322 .TP
323 [\-]\fBchal-hmac\fR
324 Generate HMAC-SHA1 challenge responses.
325 .TP
326 [\-]\fBhmac-lt64\fR
327 Calculate HMAC on less than 64 bytes input.  Whatever is in the last byte
328 of the challenge is used as end of input marker (backtracking from end of payload).
329 .TP
330 [\-]\fBchal-btn-trig\fR
331 The YubiKey will wait for the user to press the key (within 15 seconds) before
332 answering the challenge.
333 .TP
334 [\-]\fBserial-btn-visible\fR
335 The YubiKey will emit its serial number if the button is pressed during power-up.
336 .TP
337 [\-]\fBserial-usb-visible\fR
338 The YubiKey will indicate its serial number in the USB iSerial field.
339 .TP
340 [\-]\fBserial-api-visible\fR
341 The YubiKey will allow its serial number to be read using an API call.
342 .TP
343 \fBoath-id[=m:OOTTUUUUUUUU]\fR
344 Configure OATH token id with a provided value, or if used without a value use the
345 standard YubiKey token identifier.
346
347 The standard OATH token id for a Yubico YubiKey is (modhex) OO=ub, TT=he,
348 (decimal) UUUUUUUU=serial number.
349
350 The reason for the decimal serial number is to make it easy for humans to correlate
351 the serial number on the back of the YubiKey to an entry in a list of associated
352 tokens for example.  Other encodings can be accomplished using the appropriate
353 oath-fixed-modhex options.
354
355 Note that the YubiKey must be programmed to allow reading its serial number,
356 otherwise automatic token id creation is not possible.
357
358 See section "5.3.4 - OATH-HOTP Token Identifier" of the
359 .URL "http://yubico.com/files/YubiKey_manual-2.0.pdf" "YubiKey manual"
360 for further details.
361 .TP
362 \fBYubiKey 2.3 firmware and above\fR
363 .TP
364 [\-]\fBuse-numeric-keypad\fR
365 Send scancodes for numeric keypad keypresses when sending digits - helps with some
366 keyboard layouts.
367 .TP
368 [\-]\fBfast-trig\fR
369 Faster triggering when only configuration 1 is available.
370 .TP
371 [\-]\fBallow-update\fR
372 Allow updating of certain parameters in a configuration at a later time.
373 .TP
374 [\-]\fBdormant\fR
375 Hides/unhides a configuration stored in a YubiKey.
376 .TP
377 \fBYubiKey 2.4/3.1 firmware and above\fR
378 .TP
379 [\-]\fBled-inv\fR
380 Inverts the behaviour of the led on the YubiKey.
381
382 .SH OATH-HOTP Mode
383 When using OATH-HOTP mode, a HMAC key of 160 bits (20 bytes, 40 chars of hex)
384 can be supplied with \fB\-a\fR.
385 .PP
386
387 .SH Challenge-response Mode
388 In \fBCHAL-RESP\fR mode, the token will NOT generate any keypresses when the button
389 is pressed (although it is perfectly possible to have one slot with a keypress-generating
390 configuration, and the other in challenge-response mode).  Instead, a program capable of
391 sending USB HID feature reports to the token must be used to send it a challenge, and
392 read the response.
393
394 .SH Modhex
395 Modhex is a way of writing hex digits where the \(lqdigits\(rq are
396 chosen for being in the same place on most keyboard layouts.
397 .TP
398 To convert from hex to modhex, you can use
399 .RS
400 tr "[0123456789abcdef]" "[cbdefghijklnrtuv]"
401 .RE
402 .TP
403 To convert the other way, use
404 .RS
405 tr "[cbdefghijklnrtuv]" "[0123456789abcdef]"
406 .RE
407
408 .SH BUGS
409 Report ykpersonalize bugs in
410 .URL "https://github.com/Yubico/yubikey-personalization/issues" "the issue tracker"
411 .SH "SEE ALSO"
412 The
413 .URL "http://opensource.yubico.com/yubikey-personalization/" "ykpersonalize home page"
414 .PP
415 YubiKeys can be obtained from
416 .URL "http://www.yubico.com/" "Yubico" "."