Clarify that we no longer support i586 but require i686+
[grml.org.git] / online-docs / grml-crypt.8.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"\r
2     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\r
4 <head>\r
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
6 <meta name="generator" content="AsciiDoc 7.1.2" />\r
7 <style type="text/css">\r
8 /* Debug borders */\r
9 p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {\r
10 /*\r
11   border: 1px solid red;\r
12 */\r
13 }\r
14 \r
15 body {\r
16   margin: 1em 5% 1em 5%;\r
17 }\r
18 \r
19 a {\r
20   color: blue;\r
21   text-decoration: underline;\r
22 }\r
23 a:visited {\r
24   color: fuchsia;\r
25 }\r
26 \r
27 em {\r
28   font-style: italic;\r
29 }\r
30 \r
31 strong {\r
32   font-weight: bold;\r
33 }\r
34 \r
35 tt {\r
36   color: navy;\r
37 }\r
38 \r
39 h1, h2, h3, h4, h5, h6 {\r
40   color: #527bbd;\r
41   font-family: sans-serif;\r
42   margin-top: 1.2em;\r
43   margin-bottom: 0.5em;\r
44   line-height: 1.3;\r
45 }\r
46 \r
47 h1 {\r
48   border-bottom: 2px solid silver;\r
49 }\r
50 h2 {\r
51   border-bottom: 2px solid silver;\r
52   padding-top: 0.5em;\r
53 }\r
54 \r
55 div.sectionbody {\r
56   font-family: serif;\r
57   margin-left: 0;\r
58 }\r
59 \r
60 hr {\r
61   border: 1px solid silver;\r
62 }\r
63 \r
64 p {\r
65   margin-top: 0.5em;\r
66   margin-bottom: 0.5em;\r
67 }\r
68 \r
69 pre {\r
70   padding: 0;\r
71   margin: 0;\r
72 }\r
73 \r
74 span#author {\r
75   color: #527bbd;\r
76   font-family: sans-serif;\r
77   font-weight: bold;\r
78   font-size: 1.2em;\r
79 }\r
80 span#email {\r
81 }\r
82 span#revision {\r
83   font-family: sans-serif;\r
84 }\r
85 \r
86 div#footer {\r
87   font-family: sans-serif;\r
88   font-size: small;\r
89   border-top: 2px solid silver;\r
90   padding-top: 0.5em;\r
91   margin-top: 4.0em;\r
92 }\r
93 div#footer-text {\r
94   float: left;\r
95   padding-bottom: 0.5em;\r
96 }\r
97 div#footer-badges {\r
98   float: right;\r
99   padding-bottom: 0.5em;\r
100 }\r
101 \r
102 div#preamble,\r
103 div.tableblock, div.imageblock, div.exampleblock, div.verseblock,\r
104 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,\r
105 div.admonitionblock {\r
106   margin-right: 10%;\r
107   margin-top: 1.5em;\r
108   margin-bottom: 1.5em;\r
109 }\r
110 div.admonitionblock {\r
111   margin-top: 2.5em;\r
112   margin-bottom: 2.5em;\r
113 }\r
114 \r
115 div.content { /* Block element content. */\r
116   padding: 0;\r
117 }\r
118 \r
119 /* Block element titles. */\r
120 div.title, caption.title {\r
121   font-family: sans-serif;\r
122   font-weight: bold;\r
123   text-align: left;\r
124   margin-top: 1.0em;\r
125   margin-bottom: 0.5em;\r
126 }\r
127 div.title + * {\r
128   margin-top: 0;\r
129 }\r
130 \r
131 td div.title:first-child {\r
132   margin-top: 0.0em;\r
133 }\r
134 div.content div.title:first-child {\r
135   margin-top: 0.0em;\r
136 }\r
137 div.content + div.title {\r
138   margin-top: 0.0em;\r
139 }\r
140 \r
141 div.sidebarblock > div.content {\r
142   background: #ffffee;\r
143   border: 1px solid silver;\r
144   padding: 0.5em;\r
145 }\r
146 \r
147 div.listingblock > div.content {\r
148   border: 1px solid silver;\r
149   background: #f4f4f4;\r
150   padding: 0.5em;\r
151 }\r
152 \r
153 div.quoteblock > div.content {\r
154   padding-left: 2.0em;\r
155 }\r
156 \r
157 div.attribution {\r
158   text-align: right;\r
159 }\r
160 div.verseblock + div.attribution {\r
161   text-align: left;\r
162 }\r
163 \r
164 div.admonitionblock .icon {\r
165   vertical-align: top;\r
166   font-size: 1.1em;\r
167   font-weight: bold;\r
168   text-decoration: underline;\r
169   color: #527bbd;\r
170   padding-right: 0.5em;\r
171 }\r
172 div.admonitionblock td.content {\r
173   padding-left: 0.5em;\r
174   border-left: 2px solid silver;\r
175 }\r
176 \r
177 div.exampleblock > div.content {\r
178   border-left: 2px solid silver;\r
179   padding: 0.5em;\r
180 }\r
181 \r
182 div.verseblock div.content {\r
183   white-space: pre;\r
184 }\r
185 \r
186 div.imageblock div.content { padding-left: 0; }\r
187 div.imageblock img { border: 1px solid silver; }\r
188 span.image img { border-style: none; }\r
189 \r
190 dl {\r
191   margin-top: 0.8em;\r
192   margin-bottom: 0.8em;\r
193 }\r
194 dt {\r
195   margin-top: 0.5em;\r
196   margin-bottom: 0;\r
197   font-style: italic;\r
198 }\r
199 dd > *:first-child {\r
200   margin-top: 0;\r
201 }\r
202 \r
203 ul, ol {\r
204     list-style-position: outside;\r
205 }\r
206 ol.olist2 {\r
207   list-style-type: lower-alpha;\r
208 }\r
209 \r
210 div.tableblock > table {\r
211   border: 3px solid #527bbd;\r
212 }\r
213 thead {\r
214   font-family: sans-serif;\r
215   font-weight: bold;\r
216 }\r
217 tfoot {\r
218   font-weight: bold;\r
219 }\r
220 \r
221 div.hlist {\r
222   margin-top: 0.8em;\r
223   margin-bottom: 0.8em;\r
224 }\r
225 td.hlist1 {\r
226   vertical-align: top;\r
227   font-style: italic;\r
228   padding-right: 0.8em;\r
229 }\r
230 td.hlist2 {\r
231   vertical-align: top;\r
232 }\r
233 \r
234 @media print {\r
235   div#footer-badges { display: none; }\r
236 }\r
237 /* Workarounds for IE6's broken and incomplete CSS2. */\r
238 \r
239 div.sidebar-content {\r
240   background: #ffffee;\r
241   border: 1px solid silver;\r
242   padding: 0.5em;\r
243 }\r
244 div.sidebar-title, div.image-title {\r
245   font-family: sans-serif;\r
246   font-weight: bold;\r
247   margin-top: 0.0em;\r
248   margin-bottom: 0.5em;\r
249 }\r
250 \r
251 div.listingblock div.content {\r
252   border: 1px solid silver;\r
253   background: #f4f4f4;\r
254   padding: 0.5em;\r
255 }\r
256 \r
257 div.quoteblock-content {\r
258   padding-left: 2.0em;\r
259 }\r
260 \r
261 div.exampleblock-content {\r
262   border-left: 2px solid silver;\r
263   padding-left: 0.5em;\r
264 }\r
265 </style>\r
266 <title>GRML-CRYPT(8)</title>\r
267 </head>\r
268 <body>\r
269 <div id="header">\r
270 <h1>GRML-CRYPT(8)</h1>\r
271 </div>\r
272 <h2>NAME</h2>\r
273 <div class="sectionbody">\r
274 <p>grml-crypt - Wrapper around cryptsetup/losetup/mkfs/mount</p>\r
275 </div>\r
276 <h2>SYNOPSIS</h2>\r
277 <div class="sectionbody">\r
278 <p><strong>grml-crypt</strong> [OPTIONS] <em>action</em> &lt;device/file&gt; <em>[mountpoint]</em></p>\r
279 </div>\r
280 <h2>DESCRIPTION</h2>\r
281 <div class="sectionbody">\r
282 <p><strong>grml-crypt</strong> is a program that\r
283 provides an easy wrapper around cryptsetup, mkfs, losetup and mount. You\r
284 could create a loopback mounted crypted filesystem with only one command, but\r
285 grml-crypt works for normal devices as well.</p>\r
286 </div>\r
287 <h2>ACTIONS</h2>\r
288 <div class="sectionbody">\r
289 <dl>\r
290 <dt>\r
291 <strong>format &lt;device/file&gt; [mountpoint]</strong>\r
292 </dt>\r
293 <dd>\r
294 <p>\r
295     "Formats" a &lt;device/file&gt;. If the second parameter is not a\r
296     block device grml-crypt assumes that it should operate in file modus. If the\r
297     file does not already exist it will be created with the given size. The\r
298     first 2MB of a device (luks header) are initialised with /dev/urandom, the\r
299     other space with the given initialisation. If grml-crypt is in file modus\r
300     the first 2MB of the loop file are also initialised with /dev/urandom except\r
301     where the file already exists (use -f for overwriting).\r
302     Commands: [losetup], dd, cryptsetup luksFormat, cryptsetup\r
303     luksOpen, [dd], mkfs, [mount]\r
304 </p>\r
305 </dd>\r
306 <dt>\r
307 <strong>start &lt;device/file&gt; &lt;mountpoint&gt;</strong>\r
308 </dt>\r
309 <dd>\r
310 <p>\r
311     Starts an encrypted &lt;device/file&gt; and mounts it to the given\r
312     mountpoint. Commands: [losetup], cryptsetup luksOpen, mount\r
313 </p>\r
314 </dd>\r
315 <dt>\r
316 <strong>stop &lt;mountpoint&gt;</strong>\r
317 </dt>\r
318 <dd>\r
319 <p>\r
320     Stops an encrypted filesystem mounted at &lt;mountpoint&gt;. Even the\r
321     loopdevice gets destroyed with this command. Commands: mount, dmsetup info,\r
322     cryptsetup status, umount, cryptsetup luksClose, [losetup -d]\r
323 </p>\r
324 </dd>\r
325 <dt>\r
326 <strong>help</strong>\r
327 </dt>\r
328 <dd>\r
329 <p>\r
330   Shows the help message.\r
331 </p>\r
332 </dd>\r
333 </dl>\r
334 </div>\r
335 <h2>OPTIONS</h2>\r
336 <div class="sectionbody">\r
337 <dl>\r
338 <dt>\r
339 <strong>-h, help</strong>\r
340 </dt>\r
341 <dd>\r
342 <p>\r
343 Shows summary of options.\r
344 </p>\r
345 </dd>\r
346 <dt>\r
347 <strong>-v</strong>\r
348 </dt>\r
349 <dd>\r
350 <p>\r
351 Shows what is going on (more v =&gt; more out).\r
352 </p>\r
353 </dd>\r
354 <dt>\r
355 <strong>-s (in MB, default=10)</strong>\r
356 </dt>\r
357 <dd>\r
358 <p>\r
359     Gives the size of loop filesystem grml-crypt should create.\r
360 </p>\r
361 </dd>\r
362 <dt>\r
363 <strong>-t (default=vfat)</strong>\r
364 </dt>\r
365 <dd>\r
366 <p>\r
367     Gives the type of the filesystem grml-crypt should create. /sbin/mkfs.&lt;your\r
368     choosen filesystem&gt; should exist.\r
369 </p>\r
370 </dd>\r
371 <dt>\r
372 <strong>-r</strong>\r
373 </dt>\r
374 <dd>\r
375 <p>\r
376     Read-only mode. The device mapping AND the mountpoint will be made\r
377     read-only. In format mode only the mountpoint can be made read-only.\r
378 </p>\r
379 </dd>\r
380 <dt>\r
381 <strong>-z</strong>\r
382 </dt>\r
383 <dd>\r
384 <p>\r
385     Insecure initialisation mode\r
386 </p>\r
387 </dd>\r
388 <dt>\r
389 <strong>-o</strong>\r
390 </dt>\r
391 <dd>\r
392 <p>\r
393     Optimized initialisation mode\r
394 </p>\r
395 </dd>\r
396 <dt>\r
397 <strong>-y</strong>\r
398 </dt>\r
399 <dd>\r
400 <p>\r
401     Verifies the password by asking for it twice during creation.\r
402 </p>\r
403 </dd>\r
404 <dt>\r
405 <strong>-f</strong>\r
406 </dt>\r
407 <dd>\r
408 <p>\r
409     Forces overwriting and/or disable confirmation dialog. If the second\r
410     parameter to format is an existing file and force is given, then the file\r
411     will be used for the encrypted loop filesystem. ATTENTION: the file should\r
412     be bigger than 2MB for LUKS only + the constraints from the filesystems\r
413     itself (eg. xfs needs a minimum of 4096 blocks).\r
414 </p>\r
415 </dd>\r
416 <dt>\r
417 <strong>-m</strong>\r
418 </dt>\r
419 <dd>\r
420 <p>\r
421     Additional arguments passed through to mount. Could be like "<em>-o noatime</em>".\r
422 </p>\r
423 </dd>\r
424 </dl>\r
425 </div>\r
426 <h2>CRYPTSETUP FORMAT OPTIONS</h2>\r
427 <div class="sectionbody">\r
428 <dl>\r
429 <dt>\r
430 <strong>-S (in bits, default=128)</strong>\r
431 </dt>\r
432 <dd>\r
433 <p>\r
434     Cipher size used for encryption. Usually 128, 192 or 256 (but higher\r
435     may also be possible).\r
436 </p>\r
437 </dd>\r
438 <dt>\r
439 <strong>-C (default=aes-cbc-essiv:sha256)</strong>\r
440 </dt>\r
441 <dd>\r
442 <p>\r
443     Cipher mode, should be aes-plain for pre-2.6.10. Have a look at /proc/crypto for\r
444     other ciphers.\r
445 </p>\r
446 </dd>\r
447 <dt>\r
448 <strong>-I (in seconds, default=1)</strong>\r
449 </dt>\r
450 <dd>\r
451 <p>\r
452     The number of seconds to spend with PBKDF2 password processing. This time\r
453     is consumed for every key operation (format, start).\r
454 </p>\r
455 </dd>\r
456 <dt>\r
457 <strong>-A (default="")</strong>\r
458 </dt>\r
459 <dd>\r
460 <p>\r
461     Additional arguments to cryptsetup's luksFormat.\r
462 </p>\r
463 </dd>\r
464 </dl>\r
465 </div>\r
466 <h2>INITIALISATION MODES</h2>\r
467 <div class="sectionbody">\r
468 <dl>\r
469 <dt>\r
470 <strong>Default/Secure mode (no -o or -z given)</strong>\r
471 </dt>\r
472 <dd>\r
473 <p>\r
474     This is the default mode. It should be quite secure. The &lt;device/file&gt; gets\r
475     initialised with /dev/urandom. Except with an already existing file and\r
476     -f, where NO initialisation will be done (all other modes behave as usual).\r
477 </p>\r
478 </dd>\r
479 <dt>\r
480 <strong>Optimized secure mode (-o)</strong>\r
481 </dt>\r
482 <dd>\r
483 <p>\r
484     Only the first 2MB of the &lt;device/file&gt; are initialised with\r
485     /dev/urandom. The encryption will be initialised and then the whole\r
486     encrypted device is filled with /dev/zero.\r
487 </p>\r
488 </dd>\r
489 <dt>\r
490 <strong>Insecure mode (-z)</strong>\r
491 </dt>\r
492 <dd>\r
493 <p>\r
494     Only the first 2MB of the &lt;device/file&gt; are initialised with\r
495     /dev/urandom.\r
496 </p>\r
497 </dd>\r
498 </dl>\r
499 </div>\r
500 <h2>EXAMPLES</h2>\r
501 <div class="sectionbody">\r
502 <dl>\r
503 <dt>\r
504 <strong>grml-crypt -t xfs -o format /dev/hda4 /mnt/tmp</strong>\r
505 </dt>\r
506 <dd>\r
507 <p>\r
508     Formats /dev/hda4 with xfs and applies optimized initialisation rules and\r
509     mounts it to /mnt/tmp\r
510 </p>\r
511 </dd>\r
512 <dt>\r
513 <strong>grml-crypt -t ext2 -z format /home/user/test.img /mnt/tmp</strong>\r
514 </dt>\r
515 <dd>\r
516 <p>\r
517     Creates /home/user/test.img with 10MB and applies only insecure\r
518     initialisation rules.  Creates an ext2 filesystem on it and mounts it to\r
519     /mnt/tmp.\r
520 </p>\r
521 </dd>\r
522 <dt>\r
523 <strong>grml-crypt -f -S 256 -C aes-plain -I 2 -A &#8212;verify-passphrase -m '-o noatime' -vvv format img /mnt/tmp</strong>\r
524 </dt>\r
525 <dd>\r
526 <p>\r
527     Reuses the image img with no initialisation. The encryption is established\r
528     with aes-plain with 256 bit keysize and an iteration time of 2 seconds.\r
529     Cryptsetup is advised to verify the password by asking for it twice. Mounts\r
530     it to /mnt/tmp with <em>-o noatime</em>. And prints what is going on (-vvv).\r
531 </p>\r
532 </dd>\r
533 </dl>\r
534 </div>\r
535 <h2>ENCRYPT AN USBSTICK</h2>\r
536 <div class="sectionbody">\r
537 <dl>\r
538 <dt>\r
539 <strong>grml-crypt -t ext2 -z format /dev/external1</strong>\r
540 </dt>\r
541 <dd>\r
542 <p>\r
543     Formats your usbstick which hopefully is located at\r
544     /dev/external1 (please verify!) with ext2 and nearly no initialisation. You\r
545     could give the format action a mountpoint too. In this case your\r
546     crypto-partition gets mounted on that mountpoint as well.\r
547 </p>\r
548 </dd>\r
549 <dt>\r
550 <strong>grml-crypt start /dev/external1 /mnt/tmp</strong>\r
551 </dt>\r
552 <dd>\r
553 <p>\r
554     Asks you for the right passphrase for your crypto-partition\r
555     and tries to mount it to /mnt/tmp.\r
556 </p>\r
557 </dd>\r
558 <dt>\r
559 <strong>grml-crypt stop /mnt/tmp</strong>\r
560 </dt>\r
561 <dd>\r
562 <p>\r
563     Removes your crypto-partition cleanly out of the system\r
564     (umount, cryptsetup luksClose, [losetup -d]).\r
565 </p>\r
566 </dd>\r
567 </dl>\r
568 </div>\r
569 <h2>ENCRYPTED LOOPFILESYSTEM ON USBSTICK</h2>\r
570 <div class="sectionbody">\r
571 <dl>\r
572 <dt>\r
573 <strong>mount /mnt/external1</strong>\r
574 </dt>\r
575 <dd>\r
576 <p>\r
577     Mounts your usb-stick on /mnt/external1 (please verify!).\r
578 </p>\r
579 </dd>\r
580 <dt>\r
581 <strong>grml-crypt -o -t vfat -s 50 format /mnt/external1/secure.img /mnt/tmp</strong>\r
582 </dt>\r
583 <dd>\r
584 <p>\r
585     Creates a 50MB big file, encrypted with the default options\r
586     and vfat (also known as fat32). The optimized initialisation mode will\r
587     be used for this file (without -o this could take REALLY LONG).  This\r
588     command _also_ starts your cryptofile and mounts it on /mnt/tmp.\r
589 </p>\r
590 </dd>\r
591 <dt>\r
592 <strong>grml-crypt stop /mnt/tmp</strong>\r
593 </dt>\r
594 <dd>\r
595 <p>\r
596     Removes your crypto-partition cleanly out of the system\r
597     (umount, cryptsetup luksClose, [losetup -d]).\r
598 </p>\r
599 </dd>\r
600 <dt>\r
601 <strong>umount /mnt/external1</strong>\r
602 </dt>\r
603 <dd>\r
604 <p>\r
605     Guess what? ;)\r
606 </p>\r
607 </dd>\r
608 </dl>\r
609 </div>\r
610 <h2>SEE ALSO</h2>\r
611 <div class="sectionbody">\r
612 <p>cryptsetup(8)</p>\r
613 </div>\r
614 <h2>AUTHOR</h2>\r
615 <div class="sectionbody">\r
616 <p>grml-crypt was written by Michael Gebetsroither &lt;michael.geb@gmx.at&gt;.</p>\r
617 <p>This manual page was written by Michael Gebetsroither &lt;gebi@grml.org&gt;.</p>\r
618 </div>\r
619 <div id="footer">\r
620 <div id="footer-text">\r
621 Last updated 28-Sep-2007 04:31:25 CEST\r
622 </div>\r
623 </div>\r
624 </body>\r
625 </html>\r