|
Lines 24-30
Link Here
|
| 24 |
.\" |
24 |
.\" |
| 25 |
.\" $FreeBSD$ |
25 |
.\" $FreeBSD$ |
| 26 |
.\" |
26 |
.\" |
| 27 |
.Dd April 28, 2012 |
27 |
.Dd June 13, 2012 |
| 28 |
.Dt GELI 8 |
28 |
.Dt GELI 8 |
| 29 |
.Os |
29 |
.Os |
| 30 |
.Sh NAME |
30 |
.Sh NAME |
|
Lines 58-64
Link Here
|
| 58 |
.Op Fl i Ar iterations |
58 |
.Op Fl i Ar iterations |
| 59 |
.Op Fl J Ar newpassfile |
59 |
.Op Fl J Ar newpassfile |
| 60 |
.Op Fl K Ar newkeyfile |
60 |
.Op Fl K Ar newkeyfile |
| 61 |
.Op Fl l Ar keylen |
61 |
.Op Fl l Ar datakeylen |
| 62 |
.Op Fl s Ar sectorsize |
62 |
.Op Fl s Ar sectorsize |
| 63 |
.Op Fl V Ar version |
63 |
.Op Fl V Ar version |
| 64 |
.Ar prov |
64 |
.Ar prov |
|
Lines 83-89
Link Here
|
| 83 |
.Op Fl d |
83 |
.Op Fl d |
| 84 |
.Op Fl a Ar aalgo |
84 |
.Op Fl a Ar aalgo |
| 85 |
.Op Fl e Ar ealgo |
85 |
.Op Fl e Ar ealgo |
| 86 |
.Op Fl l Ar keylen |
86 |
.Op Fl l Ar datakeylen |
| 87 |
.Op Fl s Ar sectorsize |
87 |
.Op Fl s Ar sectorsize |
| 88 |
.Ar prov |
88 |
.Ar prov |
| 89 |
.Nm |
89 |
.Nm |
|
Lines 186-199
Link Here
|
| 186 |
or |
186 |
or |
| 187 |
.Nm HMAC/SHA512 . |
187 |
.Nm HMAC/SHA512 . |
| 188 |
.It |
188 |
.It |
| 189 |
Can create a key from a couple of components (user entered passphrase, random |
189 |
Can create a User Key from up to two, piecewise components: a passphrase |
| 190 |
bits from a file, etc.). |
190 |
entered via prompt or read from one or more passfiles; a keyfile read from |
|
|
191 |
one or more files. |
| 191 |
.It |
192 |
.It |
| 192 |
Allows encryption of the root partition. |
193 |
Allows encryption of the root partition. |
| 193 |
The user will be asked for the |
194 |
The user will be asked for the |
| 194 |
passphrase before the root file system is mounted. |
195 |
passphrase before the root file system is mounted. |
| 195 |
.It |
196 |
.It |
| 196 |
The passphrase of the user is strengthened with: |
197 |
Strengthens the passphrase component of the User Key with: |
| 197 |
.Rs |
198 |
.Rs |
| 198 |
.%A B. Kaliski |
199 |
.%A B. Kaliski |
| 199 |
.%T "PKCS #5: Password-Based Cryptography Specification, Version 2.0." |
200 |
.%T "PKCS #5: Password-Based Cryptography Specification, Version 2.0." |
|
Lines 201-207
Link Here
|
| 201 |
.%N 2898 |
202 |
.%N 2898 |
| 202 |
.Re |
203 |
.Re |
| 203 |
.It |
204 |
.It |
| 204 |
Allows the use of two independent keys (e.g., a |
205 |
Allows the use of two independent User Keys (e.g., a |
| 205 |
.Qq "user key" |
206 |
.Qq "user key" |
| 206 |
and a |
207 |
and a |
| 207 |
.Qq "company key" ) . |
208 |
.Qq "company key" ) . |
|
Lines 210-217
Link Here
|
| 210 |
.Nm |
211 |
.Nm |
| 211 |
performs simple sector-to-sector encryption. |
212 |
performs simple sector-to-sector encryption. |
| 212 |
.It |
213 |
.It |
| 213 |
Allows Master Keys to be backed up and restored, |
214 |
Allows the encrypted Master Key to be backed up and restored, |
| 214 |
so that if a user has to quickly destroy his keys, |
215 |
so that if a user has to quickly destroy key material, |
| 215 |
it is possible to get the data back by restoring keys from |
216 |
it is possible to get the data back by restoring keys from |
| 216 |
backup. |
217 |
backup. |
| 217 |
.It |
218 |
.It |
|
Lines 219-226
Link Here
|
| 219 |
(so users do not have to remember to detach providers after unmounting |
220 |
(so users do not have to remember to detach providers after unmounting |
| 220 |
the file systems). |
221 |
the file systems). |
| 221 |
.It |
222 |
.It |
| 222 |
Allows attaching a provider with a random, one-time key - useful for swap |
223 |
Allows attaching a provider with a random, one-time Master Key - |
| 223 |
partitions and temporary file systems. |
224 |
useful for swap partitions and temporary file systems. |
| 224 |
.It |
225 |
.It |
| 225 |
Allows verification of data integrity (data authentication). |
226 |
Allows verification of data integrity (data authentication). |
| 226 |
.It |
227 |
.It |
|
Lines 233-239
Link Here
|
| 233 |
.Bl -tag -width ".Cm configure" |
234 |
.Bl -tag -width ".Cm configure" |
| 234 |
.It Cm init |
235 |
.It Cm init |
| 235 |
Initialize the provider which needs to be encrypted. |
236 |
Initialize the provider which needs to be encrypted. |
| 236 |
Here you can set up the cryptographic algorithm to use, key length, etc. |
237 |
Here you can set up the cryptographic algorithm to use, Data Key length, |
|
|
238 |
etc. |
| 237 |
The last sector of the provider is used to store metadata. |
239 |
The last sector of the provider is used to store metadata. |
| 238 |
The |
240 |
The |
| 239 |
.Cm init |
241 |
.Cm init |
|
Lines 289-325
Link Here
|
| 289 |
The default and recommended algorithm is |
291 |
The default and recommended algorithm is |
| 290 |
.Nm AES-XTS . |
292 |
.Nm AES-XTS . |
| 291 |
.It Fl i Ar iterations |
293 |
.It Fl i Ar iterations |
| 292 |
Number of iterations to use with PKCS#5v2. |
294 |
Number of iterations to use with PKCS#5v2 when processing User Key |
|
|
295 |
passphrase component. |
| 293 |
If this option is not specified, |
296 |
If this option is not specified, |
| 294 |
.Nm |
297 |
.Nm |
| 295 |
will find the number of iterations which is equal to 2 seconds of crypto work. |
298 |
will find the number of iterations which is equal to 2 seconds of crypto work. |
| 296 |
If 0 is given, PKCS#5v2 will not be used. |
299 |
If 0 is given, PKCS#5v2 will not be used. PKCS#5v2 processing is performed |
|
|
300 |
once, after all parts of the passphrase component have been read. |
| 297 |
.It Fl J Ar newpassfile |
301 |
.It Fl J Ar newpassfile |
| 298 |
Specifies a file which contains the passphrase or its part. |
302 |
Specifies a file which contains the passphrase component of the User Key |
|
|
303 |
(or part of it). |
| 299 |
If |
304 |
If |
| 300 |
.Ar newpassfile |
305 |
.Ar newpassfile |
| 301 |
is given as -, standard input will be used. |
306 |
is given as -, standard input will be used. |
| 302 |
Only the first line (excluding new-line character) is taken from the given file. |
307 |
Only the first line (excluding new-line character) is taken from the given file. |
| 303 |
This argument can be specified multiple times. |
308 |
This argument can be specified multiple times, which has the effect of |
|
|
309 |
reassembling a single passphrase split across multiple files. Cannot be |
| 310 |
combined with the |
| 311 |
.Fl P |
| 312 |
option. |
| 304 |
.It Fl K Ar newkeyfile |
313 |
.It Fl K Ar newkeyfile |
| 305 |
Specifies a file which contains part of the key. |
314 |
Specifies a file which contains the keyfile component of the User Key |
|
|
315 |
(or part of it). |
| 306 |
If |
316 |
If |
| 307 |
.Ar newkeyfile |
317 |
.Ar newkeyfile |
| 308 |
is given as -, standard input will be used. |
318 |
is given as -, standard input will be used. |
| 309 |
This argument can be specified multiple times. |
319 |
This argument can be specified multiple times, which has the effect of |
| 310 |
.It Fl l Ar keylen |
320 |
reassembling a single keyfile split across multiple keyfile parts. |
| 311 |
Key length to use with the given cryptographic algorithm. |
321 |
.It Fl l Ar datakeylen |
| 312 |
If not given, the default key length for the given algorithm is used, which is: |
322 |
Data Key length to use with the given cryptographic algorithm. |
| 313 |
128 for |
323 |
If the length is not specified, the selected algorithm uses its |
| 314 |
.Nm AES-XTS , |
324 |
.Em default |
| 315 |
.Nm AES-CBC , |
325 |
key length. |
| 316 |
.Nm Blowfish-CBC |
326 |
.Bl -ohang -offset indent |
| 317 |
and |
327 |
.It Nm AES-XTS |
| 318 |
.Nm Camellia-CBC |
328 |
.Em 128 , |
| 319 |
and 192 for |
329 |
256 |
| 320 |
.Nm 3DES-CBC . |
330 |
.It Nm AES-CBC , Nm Camilla-CBC |
|
|
331 |
.Em 128 , |
| 332 |
192, |
| 333 |
256 |
| 334 |
.It Nm Blowfish-CBC |
| 335 |
.Em 128 |
| 336 |
+ n * 32, for n=[0..10] |
| 337 |
.It Nm 3DES-CBC |
| 338 |
.Em 192 |
| 339 |
.El |
| 321 |
.It Fl P |
340 |
.It Fl P |
| 322 |
Do not use passphrase as the key component. |
341 |
Do not use a passphrase as a component of the User Key. Cannot be combined |
|
|
342 |
with the |
| 343 |
.Fl J |
| 344 |
option. |
| 323 |
.It Fl s Ar sectorsize |
345 |
.It Fl s Ar sectorsize |
| 324 |
Change decrypted provider's sector size. |
346 |
Change decrypted provider's sector size. |
| 325 |
Increasing the sector size allows increased performance, |
347 |
Increasing the sector size allows increased performance, |
|
Lines 337-343
Link Here
|
| 337 |
.El |
359 |
.El |
| 338 |
.It Cm attach |
360 |
.It Cm attach |
| 339 |
Attach the given provider. |
361 |
Attach the given provider. |
| 340 |
The master key will be decrypted using the given |
362 |
The encrypted Master Key will be loaded from the metadata and decrypted |
|
|
363 |
using the given |
| 341 |
passphrase/keyfile and a new GEOM provider will be created using the given |
364 |
passphrase/keyfile and a new GEOM provider will be created using the given |
| 342 |
provider's name with an |
365 |
provider's name with an |
| 343 |
.Qq .eli |
366 |
.Qq .eli |
|
Lines 357-384
Link Here
|
| 357 |
.Cm detach |
380 |
.Cm detach |
| 358 |
subcommand. |
381 |
subcommand. |
| 359 |
.It Fl j Ar passfile |
382 |
.It Fl j Ar passfile |
| 360 |
Specifies a file which contains the passphrase or its part. |
383 |
Specifies a file which contains the passphrase component of the User Key |
|
|
384 |
(or part of it). |
| 361 |
For more information see the description of the |
385 |
For more information see the description of the |
| 362 |
.Fl J |
386 |
.Fl J |
| 363 |
option for the |
387 |
option for the |
| 364 |
.Cm init |
388 |
.Cm init |
| 365 |
subcommand. |
389 |
subcommand. |
| 366 |
.It Fl k Ar keyfile |
390 |
.It Fl k Ar keyfile |
| 367 |
Specifies a file which contains part of the key. |
391 |
Specifies a file which contains the keyfile component of the User Key |
|
|
392 |
(or part of it). |
| 368 |
For more information see the description of the |
393 |
For more information see the description of the |
| 369 |
.Fl K |
394 |
.Fl K |
| 370 |
option for the |
395 |
option for the |
| 371 |
.Cm init |
396 |
.Cm init |
| 372 |
subcommand. |
397 |
subcommand. |
| 373 |
.It Fl p |
398 |
.It Fl p |
| 374 |
Do not use passphrase as the key component. |
399 |
Do not use a passphrase as a component of the User Key. Cannot be combined |
|
|
400 |
with the |
| 401 |
.Fl j |
| 402 |
option. |
| 375 |
.It Fl r |
403 |
.It Fl r |
| 376 |
Attach read-only provider. |
404 |
Attach read-only provider. |
| 377 |
It will not be opened for writing. |
405 |
It will not be opened for writing. |
| 378 |
.El |
406 |
.El |
| 379 |
.It Cm detach |
407 |
.It Cm detach |
| 380 |
Detach the given providers, which means remove the devfs entry |
408 |
Detach the given providers, which means remove the devfs entry |
| 381 |
and clear the keys from memory. |
409 |
and clear the Master Key and Data Keys from memory. |
| 382 |
.Pp |
410 |
.Pp |
| 383 |
Additional options include: |
411 |
Additional options include: |
| 384 |
.Bl -tag -width ".Fl f" |
412 |
.Bl -tag -width ".Fl f" |
|
Lines 391-397
Link Here
|
| 391 |
last time even if it was only opened for reading. |
419 |
last time even if it was only opened for reading. |
| 392 |
.El |
420 |
.El |
| 393 |
.It Cm onetime |
421 |
.It Cm onetime |
| 394 |
Attach the given providers with random, one-time keys. |
422 |
Attach the given providers with a random, one-time (ephemeral) Master Key. |
| 395 |
The command can be used to encrypt swap partitions or temporary file systems. |
423 |
The command can be used to encrypt swap partitions or temporary file systems. |
| 396 |
.Pp |
424 |
.Pp |
| 397 |
Additional options include: |
425 |
Additional options include: |
|
Lines 414-421
Link Here
|
| 414 |
For more information, see the description of the |
442 |
For more information, see the description of the |
| 415 |
.Cm attach |
443 |
.Cm attach |
| 416 |
subcommand. |
444 |
subcommand. |
| 417 |
.It Fl l Ar keylen |
445 |
.It Fl l Ar datakeylen |
| 418 |
Key length to use with the given cryptographic algorithm. |
446 |
Data Key length to use with the given cryptographic algorithm. |
| 419 |
For more information, see the description of the |
447 |
For more information, see the description of the |
| 420 |
.Cm init |
448 |
.Cm init |
| 421 |
subcommand. |
449 |
subcommand. |
|
Lines 439-453
Link Here
|
| 439 |
Remove the BOOT flag from the given providers. |
467 |
Remove the BOOT flag from the given providers. |
| 440 |
.El |
468 |
.El |
| 441 |
.It Cm setkey |
469 |
.It Cm setkey |
| 442 |
Change or setup (if not yet initialized) selected key. |
470 |
Install a copy of the Master Key into the selected slot, encrypted with |
| 443 |
There is one master key, which can be encrypted with two independent user keys. |
471 |
a new User Key. If the selected slot is populated, replace the existing |
|
|
472 |
copy. A provider has one Master Key, which can be stored in one or both |
| 473 |
slots, each encrypted with an independent User Key. |
| 444 |
With the |
474 |
With the |
| 445 |
.Cm init |
475 |
.Cm init |
| 446 |
subcommand, only key number 0 is initialized. |
476 |
subcommand, only key number 0 is initialized. |
| 447 |
The key can always be changed: for an attached provider, |
477 |
The User Key can be changed at any time: for an attached provider, |
| 448 |
for a detached provider, or on the backup file. |
478 |
for a detached provider, or on the backup file. |
| 449 |
When a provider is attached, the user does not have to provide |
479 |
When a provider is attached, the user does not have to provide |
| 450 |
an old passphrase/keyfile. |
480 |
an existing passphrase/keyfile. |
| 451 |
.Pp |
481 |
.Pp |
| 452 |
Additional options include: |
482 |
Additional options include: |
| 453 |
.Bl -tag -width ".Fl J Ar newpassfile" |
483 |
.Bl -tag -width ".Fl J Ar newpassfile" |
|
Lines 458-501
Link Here
|
| 458 |
.Cm setkey |
488 |
.Cm setkey |
| 459 |
subcommand, only one key has to be defined and this key must be changed. |
489 |
subcommand, only one key has to be defined and this key must be changed. |
| 460 |
.It Fl j Ar passfile |
490 |
.It Fl j Ar passfile |
| 461 |
Specifies a file which contains the old passphrase or its part. |
491 |
Specifies a file which contains the passphrase component of a current User Key |
|
|
492 |
(or part of it). |
| 462 |
.It Fl J Ar newpassfile |
493 |
.It Fl J Ar newpassfile |
| 463 |
Specifies a file which contains the new passphrase or its part. |
494 |
Specifies a file which contains the passphrase component of the new User Key |
|
|
495 |
(or part of it). |
| 464 |
.It Fl k Ar keyfile |
496 |
.It Fl k Ar keyfile |
| 465 |
Specifies a file which contains part of the old key. |
497 |
Specifies a file which contains the keyfile component of a current User Key |
|
|
498 |
(or part of it). |
| 466 |
.It Fl K Ar newkeyfile |
499 |
.It Fl K Ar newkeyfile |
| 467 |
Specifies a file which contains part of the new key. |
500 |
Specifies a file which contains the keyfile component of the new User Key |
|
|
501 |
(or part of it). |
| 468 |
.It Fl n Ar keyno |
502 |
.It Fl n Ar keyno |
| 469 |
Specifies the number of the key to change (could be 0 or 1). |
503 |
Specifies the index number of the Master Key copy to change (could be 0 or 1). |
| 470 |
If the provider is attached and no key number is given, the key |
504 |
If the provider is attached and no key number is given, the key |
| 471 |
used for attaching the provider will be changed. |
505 |
used for attaching the provider will be changed. |
| 472 |
If the provider is detached (or we are operating on a backup file) |
506 |
If the provider is detached (or we are operating on a backup file) |
| 473 |
and no key number is given, the key decrypted with the passphrase/keyfile |
507 |
and no key number is given, the first Master Key copy to be successfully |
| 474 |
will be changed. |
508 |
decrypted with the provided User Key passphrase/keyfile will be changed. |
| 475 |
.It Fl p |
509 |
.It Fl p |
| 476 |
Do not use passphrase as the old key component. |
510 |
Do not use a passphrase as a component of the current User Key. Cannot be |
|
|
511 |
combined with the |
| 512 |
.Fl j |
| 513 |
option. |
| 477 |
.It Fl P |
514 |
.It Fl P |
| 478 |
Do not use passphrase as the new key component. |
515 |
Do not use a passphrase as a component of the new User Key. Cannot be |
|
|
516 |
combined with the |
| 517 |
.Fl J |
| 518 |
option. |
| 479 |
.El |
519 |
.El |
| 480 |
.It Cm delkey |
520 |
.It Cm delkey |
| 481 |
Destroy (overwrite with random data) the selected key. |
521 |
Destroy (overwrite with random data) the selected Master Key copy. |
| 482 |
If one is destroying keys for an attached provider, the provider |
522 |
If one is destroying keys for an attached provider, the provider |
| 483 |
will not be detached even if all keys are destroyed. |
523 |
will not be detached even if all copies of the Master Key are destroyed. |
| 484 |
It can even be rescued with the |
524 |
It can even be rescued with the |
| 485 |
.Cm setkey |
525 |
.Cm setkey |
| 486 |
subcommand. |
526 |
subcommand because the Master Key is still in memory. |
| 487 |
.Pp |
527 |
.Pp |
| 488 |
Additional options include: |
528 |
Additional options include: |
| 489 |
.Bl -tag -width ".Fl a Ar keyno" |
529 |
.Bl -tag -width ".Fl a Ar keyno" |
| 490 |
.It Fl a |
530 |
.It Fl a |
| 491 |
Destroy all keys (does not need |
531 |
Destroy all copies of the Master Key (does not need |
| 492 |
.Fl f |
532 |
.Fl f |
| 493 |
option). |
533 |
option). |
| 494 |
.It Fl f |
534 |
.It Fl f |
| 495 |
Force key destruction. |
535 |
Force key destruction. |
| 496 |
This option is needed to destroy the last key. |
536 |
This option is needed to destroy the last copy of the Master Key. |
| 497 |
.It Fl n Ar keyno |
537 |
.It Fl n Ar keyno |
| 498 |
Specifies the key number. |
538 |
Specifies the index number of the Master Key copy. |
| 499 |
If the provider is attached and no key number is given, the key |
539 |
If the provider is attached and no key number is given, the key |
| 500 |
used for attaching the provider will be destroyed. |
540 |
used for attaching the provider will be destroyed. |
| 501 |
If provider is detached (or we are operating on a backup file) the key number |
541 |
If provider is detached (or we are operating on a backup file) the key number |
|
Lines 503-509
Link Here
|
| 503 |
.El |
543 |
.El |
| 504 |
.It Cm kill |
544 |
.It Cm kill |
| 505 |
This command should be used only in emergency situations. |
545 |
This command should be used only in emergency situations. |
| 506 |
It will destroy all the keys on a given provider and will detach it forcibly |
546 |
It will destroy all copies of the Master Key on a given provider and will |
|
|
547 |
detach it forcibly |
| 507 |
(if it is attached). |
548 |
(if it is attached). |
| 508 |
This is absolutely a one-way command - if you do not have a metadata |
549 |
This is absolutely a one-way command - if you do not have a metadata |
| 509 |
backup, your data is gone for good. |
550 |
backup, your data is gone for good. |
|
Lines 542-549
Link Here
|
| 542 |
.El |
583 |
.El |
| 543 |
.It Cm suspend |
584 |
.It Cm suspend |
| 544 |
Suspend device by waiting for all inflight requests to finish, clearing all |
585 |
Suspend device by waiting for all inflight requests to finish, clearing all |
| 545 |
sensitive information (like keys) from kernel memory, and blocking all |
586 |
sensitive information (like the Master Key and Data Keys) from kernel memory, |
| 546 |
further I/O requests until the |
587 |
and blocking all further I/O requests until the |
| 547 |
.Cm resume |
588 |
.Cm resume |
| 548 |
subcommand is executed. |
589 |
subcommand is executed. |
| 549 |
This functionality is useful for laptops: when one wants to suspend a |
590 |
This functionality is useful for laptops: when one wants to suspend a |
|
Lines 553-560
Link Here
|
| 553 |
the |
594 |
the |
| 554 |
.Cm suspend |
595 |
.Cm suspend |
| 555 |
subcommand can be used. |
596 |
subcommand can be used. |
| 556 |
Any access to the encrypted device will be blocked until the keys are |
597 |
Any access to the encrypted device will be blocked until the Master Key is |
| 557 |
recovered through the |
598 |
reloaded through the |
| 558 |
.Cm resume |
599 |
.Cm resume |
| 559 |
subcommand. |
600 |
subcommand. |
| 560 |
Thus there is no need to close nor unmount anything. |
601 |
Thus there is no need to close nor unmount anything. |
|
Lines 584-604
Link Here
|
| 584 |
Additional options include: |
625 |
Additional options include: |
| 585 |
.Bl -tag -width ".Fl j Ar passfile" |
626 |
.Bl -tag -width ".Fl j Ar passfile" |
| 586 |
.It Fl j Ar passfile |
627 |
.It Fl j Ar passfile |
| 587 |
Specifies a file which contains the passphrase or its part. |
628 |
Specifies a file which contains the passphrase component of the User Key |
|
|
629 |
(or part of it). |
| 588 |
For more information see the description of the |
630 |
For more information see the description of the |
| 589 |
.Fl J |
631 |
.Fl J |
| 590 |
option for the |
632 |
option for the |
| 591 |
.Cm init |
633 |
.Cm init |
| 592 |
subcommand. |
634 |
subcommand. |
| 593 |
.It Fl k Ar keyfile |
635 |
.It Fl k Ar keyfile |
| 594 |
Specifies a file which contains part of the key. |
636 |
Specifies a file which contains the keyfile component of the User Key |
|
|
637 |
(or part of it). |
| 595 |
For more information see the description of the |
638 |
For more information see the description of the |
| 596 |
.Fl K |
639 |
.Fl K |
| 597 |
option for the |
640 |
option for the |
| 598 |
.Cm init |
641 |
.Cm init |
| 599 |
subcommand. |
642 |
subcommand. |
| 600 |
.It Fl p |
643 |
.It Fl p |
| 601 |
Do not use passphrase as the key component. |
644 |
Do not use a passphrase as a component of the User Key. Cannot be combined |
|
|
645 |
with the |
| 646 |
.Fl j |
| 647 |
option. |
| 602 |
.El |
648 |
.El |
| 603 |
.It Cm resize |
649 |
.It Cm resize |
| 604 |
Inform |
650 |
Inform |
|
Lines 626-631
Link Here
|
| 626 |
subcommand will print metadata version used by each of them. |
672 |
subcommand will print metadata version used by each of them. |
| 627 |
.It Cm clear |
673 |
.It Cm clear |
| 628 |
Clear metadata from the given providers. |
674 |
Clear metadata from the given providers. |
|
|
675 |
.Em WARNING : |
| 676 |
This will erase with zeros the encrypted Master Key copies stored in the |
| 677 |
metadata. |
| 629 |
.It Cm dump |
678 |
.It Cm dump |
| 630 |
Dump metadata stored on the given providers. |
679 |
Dump metadata stored on the given providers. |
| 631 |
.It Cm list |
680 |
.It Cm list |
|
Lines 647-652
Link Here
|
| 647 |
.It Fl v |
696 |
.It Fl v |
| 648 |
Be more verbose. |
697 |
Be more verbose. |
| 649 |
.El |
698 |
.El |
|
|
699 |
.Sh KEY SUMMARY |
| 700 |
.Ss Master Key |
| 701 |
Upon |
| 702 |
.Cm init , |
| 703 |
the |
| 704 |
.Nm |
| 705 |
utility generates a random Master Key for the provider. The Master Key |
| 706 |
never changes during the lifetime of the provider. Each copy of the |
| 707 |
provider metadata, active or backed up to a file, can store up to two, |
| 708 |
independently-encrypted copies of the Master Key. |
| 709 |
.Ss User Key |
| 710 |
Each stored copy of the Master Key is encrypted with a User Key, which |
| 711 |
is generated by the |
| 712 |
.Nm |
| 713 |
utility from a passphrase and/or a keyfile. The |
| 714 |
.Nm |
| 715 |
utility first reads all parts of the keyfile in the order specified on the |
| 716 |
command line, then reads all parts of the stored passphrase in the order |
| 717 |
specified on the command line. If no passphrase parts are specified, the |
| 718 |
system prompts the user to enter the passphrase. The passphrase is |
| 719 |
optionally strengthened by PKCS#5v2. The User Key is a digest computed over |
| 720 |
the concatenated keyfile and passphrase. |
| 721 |
.Ss Data Key |
| 722 |
During operation, one or more Data Keys are deterministically derived by |
| 723 |
the kernel from the Master Key and cached in memory. The number of Data |
| 724 |
Keys used by a given provider, and the way they are derived, depend on |
| 725 |
the GELI version and whether the provider is configured to use data |
| 726 |
authentication. |
| 650 |
.Sh SYSCTL VARIABLES |
727 |
.Sh SYSCTL VARIABLES |
| 651 |
The following |
728 |
The following |
| 652 |
.Xr sysctl 8 |
729 |
.Xr sysctl 8 |
|
Lines 677-683
Link Here
|
| 677 |
This variable should be set in |
754 |
This variable should be set in |
| 678 |
.Pa /boot/loader.conf . |
755 |
.Pa /boot/loader.conf . |
| 679 |
.It Va kern.geom.eli.overwrites : No 5 |
756 |
.It Va kern.geom.eli.overwrites : No 5 |
| 680 |
Specifies how many times the Master-Key will be overwritten |
757 |
Specifies how many times the Master Key will be overwritten |
| 681 |
with random values when it is destroyed. |
758 |
with random values when it is destroyed. |
| 682 |
After this operation it is filled with zeros. |
759 |
After this operation it is filled with zeros. |
| 683 |
.It Va kern.geom.eli.visible_passphrase : No 0 |
760 |
.It Va kern.geom.eli.visible_passphrase : No 0 |
|
Lines 699-716
Link Here
|
| 699 |
crypto requests with one interrupt. |
776 |
crypto requests with one interrupt. |
| 700 |
The crypto card and the driver has to support this feature. |
777 |
The crypto card and the driver has to support this feature. |
| 701 |
.It Va kern.geom.eli.key_cache_limit : No 8192 |
778 |
.It Va kern.geom.eli.key_cache_limit : No 8192 |
| 702 |
Specifies how many encryption keys to cache. |
779 |
Specifies how many Data Keys to cache. |
| 703 |
The default limit |
780 |
The default limit |
| 704 |
(8192 keys) will allow caching of all keys for a 4TB provider with 512 byte |
781 |
(8192 keys) will allow caching of all keys for a 4TB provider with 512 byte |
| 705 |
sectors and will take around 1MB of memory. |
782 |
sectors and will take around 1MB of memory. |
| 706 |
.It Va kern.geom.eli.key_cache_hits |
783 |
.It Va kern.geom.eli.key_cache_hits |
| 707 |
Reports how many times we were looking up a key and it was already in cache. |
784 |
Reports how many times we were looking up a Data Key and it was already in |
| 708 |
This sysctl is not updated for providers that need less keys than the limit |
785 |
cache. |
| 709 |
specified in |
786 |
This sysctl is not updated for providers that need fewer Data Keys than |
|
|
787 |
the limit specified in |
| 710 |
.Va kern.geom.eli.key_cache_limit . |
788 |
.Va kern.geom.eli.key_cache_limit . |
| 711 |
.It Va kern.geom.eli.key_cache_misses |
789 |
.It Va kern.geom.eli.key_cache_misses |
| 712 |
Reports how many times we were looking up a key and it was not in cache. |
790 |
Reports how many times we were looking up a Data Key and it was not in cache. |
| 713 |
This sysctl is not updated for providers that need fewer keys than the limit |
791 |
This sysctl is not updated for providers that need fewer Data Keys than the limit |
| 714 |
specified in |
792 |
specified in |
| 715 |
.Va kern.geom.eli.key_cache_limit . |
793 |
.Va kern.geom.eli.key_cache_limit . |
| 716 |
.El |
794 |
.El |
|
Lines 738-744
Link Here
|
| 738 |
# geli detach da2.eli |
816 |
# geli detach da2.eli |
| 739 |
.Ed |
817 |
.Ed |
| 740 |
.Pp |
818 |
.Pp |
| 741 |
Create an encrypted provider, but use two keys: |
819 |
Create an encrypted provider, but use two User Keys: |
| 742 |
one for your employee and one for you as the company's security officer |
820 |
one for your employee and one for you as the company's security officer |
| 743 |
(so it's not a tragedy if the employee |
821 |
(so it's not a tragedy if the employee |
| 744 |
.Qq accidentally |
822 |
.Qq accidentally |
|
Lines 760-766
Link Here
|
| 760 |
# dd if=/dev/random of=/mnt/pendrive/keys/`hostname` bs=64 count=1 |
838 |
# dd if=/dev/random of=/mnt/pendrive/keys/`hostname` bs=64 count=1 |
| 761 |
# geli init -P -K /mnt/pendrive/keys/`hostname` /dev/ad0s1e |
839 |
# geli init -P -K /mnt/pendrive/keys/`hostname` /dev/ad0s1e |
| 762 |
# geli backup /dev/ad0s1e /mnt/pendrive/backups/`hostname` |
840 |
# geli backup /dev/ad0s1e /mnt/pendrive/backups/`hostname` |
| 763 |
(use key number 0, so the encrypted Master Key will be overwritten by this) |
841 |
(use key number 0, so the encrypted Master Key will be re-encrypted by this) |
| 764 |
# geli setkey -n 0 -k /mnt/pendrive/keys/`hostname` /dev/ad0s1e |
842 |
# geli setkey -n 0 -k /mnt/pendrive/keys/`hostname` /dev/ad0s1e |
| 765 |
(allow the user to enter his passphrase) |
843 |
(allow the user to enter his passphrase) |
| 766 |
Enter new passphrase: |
844 |
Enter new passphrase: |
|
Lines 776-783
Link Here
|
| 776 |
.Pp |
854 |
.Pp |
| 777 |
The example below shows how to configure two providers which will be attached |
855 |
The example below shows how to configure two providers which will be attached |
| 778 |
on boot (before the root file system is mounted). |
856 |
on boot (before the root file system is mounted). |
| 779 |
One of them is using passphrase and three keyfiles and the other is using only a |
857 |
One of them is using passphrase and three keyfile parts and the other is |
| 780 |
keyfile: |
858 |
using only a keyfile in one part: |
| 781 |
.Bd -literal -offset indent |
859 |
.Bd -literal -offset indent |
| 782 |
# dd if=/dev/random of=/dev/da0 bs=1m |
860 |
# dd if=/dev/random of=/dev/da0 bs=1m |
| 783 |
# dd if=/dev/random of=/boot/keys/da0.key0 bs=32k count=1 |
861 |
# dd if=/dev/random of=/boot/keys/da0.key0 bs=32k count=1 |