home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / share / doc / cryptsetup / README.gnupg < prev    next >
Encoding:
Text File  |  2011-03-09  |  1.3 KB  |  31 lines

  1. gnupg with cryptsetup and LUKS in Debian
  2. ----------------------------------------
  3.  
  4. The Debian cryptsetup package provides the keyscript decrypt_gnupg for setups
  5. with a gnupg encrypted LUKS keyfile.
  6.  
  7. The following example assumes that you store the encrypted keyfile in
  8. /etc/keys/cryptkey.gpg. LUKS device /dev/<luks_device> needs to be substituted.
  9.  
  10. First, you'll have to create the encrypted keyfile:
  11.  
  12. # dd if=/dev/random bs=1 count=256 | gpg --no-options --no-random-seed-file \
  13.     --no-default-keyring --keyring /dev/null --secret-keyring /dev/null \
  14.     --trustdb-name /dev/null --symmetric --output /etc/keys/cryptkey.gpg
  15.  
  16. Next the LUKS device needs to be formated with the key:
  17.  
  18. # /usr/bin/gpg -q --no-options --no-mdc-warning --no-random-seed-file \
  19.     --no-default-keyring --keyring /dev/null --secret-keyring /dev/null \
  20.     --trustdb-name /dev/null --decrypt /etc/keys/cryptkey.gpg | \
  21.     cryptsetup luksFormat /dev/<luks_device>
  22.  
  23. In order to unlock the encrypted LUKS device automatically, add the following
  24. to /etc/crypttab:
  25.  
  26. cdev1    /dev/<luks_device>    /etc/keys/cryptkey.gpg    luks,keyscript=decrypt_gnupg
  27.  
  28. In case that you want to encrypt the root filesystem with a gnupg encrypted key,
  29. the initramfs hooks should do all additionally required work for you at initramfs
  30. creation/update.
  31.