Differences between revisions 19 and 20
Revision 19 as of 2006-03-10 01:35:07
Size: 4662
Editor: MaxVozeler
Comment:
Revision 20 as of 2006-03-10 01:42:14
Size: 4724
Editor: MaxVozeler
Comment:
Deletions are marked like this. Additions are marked like this.
Line 28: Line 28:
 * Ask the user to type randomly on the keyboard. This approach was taken by cdebconf-plugin-entropy. It turned out to require way too many key presses to be user-friendly.  * Ask the user to type randomly on the keyboard. This is done by cdebconf-entropy. It turned out that typing alone requires too many key presses to be user-friendly. The plugin is still used to show a progressbar during key creation.

Installing Debian on encrypted block devices

This page describes the development of d-i support for installing on encrypted block devices. The aim is to allow users to setup loop-AES, dm-crypt or LUKS encrypted partitions for the system and data parts of a Debian system during the installation.

partman-crypto

/!\ IMPORTANT: The current implementation is still pre-beta and has not been audited for flaws that could produce weak keys, leak key data or otherwise introduce weaknesses in the encryption. Please don't use it for any confidential data before the beta release.

Key generation in d-i

Encryption keys for loop-AES are created from /dev/random. It is important that we have a good source of entropy to allow us to extract the required amount of key data from /dev/random (each loop-AES v3 key requires 2925 bytes of random data). Currently the low amount of entropy in the kernel pool causes the key generation to block for a long time.

There are some ideas for how to solve this:

  • Don't create keys from inside d-i; Ask users to create them on another system and provide them to partman-crypto on a removable device.
  • Ask the user to type randomly on the keyboard. This is done by cdebconf-entropy. It turned out that typing alone requires too many key presses to be user-friendly. The plugin is still used to show a progressbar during key creation.
  • Use a hardware RNG if available. One problem with doing this is that not many systems actually have a usable hardware RNG and that detecting them is very difficult. There is also the issue of bad HWRNGs that produce low-quality output. Packages like rng-tools implement FIPS-140-2 tests before feeding the kernel pool to protect against this.
  • Use non-RNG hardware devices that may produce random output. Examples of this are audio and video devices which can be sourced using audio-entropyd or video-entropyd. Here the problem of low-quality randomness exists as well.

The current idea is to check if rngd (package rng-tools) could be extended to read from one or more FIFOs and character devices, do FIPS tests and feed the kernel entropy pool. If this is feasible audio-entropyd, video-entropyd, software for collecting network traffic timings etc. could be packaged and be made to feed rngd. TODO: Ask hmh@d.o if this approach makes sense and is feasible.

Status

loop-AES support in partman-crypto requires gnupg-udeb which is not available in the Debian archive. Work on dm-crypt and LUKS support has only just started (See [http://lists.debian.org/debian-boot/2006/03/msg00235.html this thread]). The upload of partman-crypto is blocked on getting one of loop-AES or LUKS working with only packages in the Debian archive.

First stage

partman-crypto

general

{X} needs upload, blocked by missing gnupg and uuencode

cdebconf-entropy

general

{X} needs upload

gnupg-udeb

loop-AES keyfiles

{X} missing ([http://bugs.debian.org/321948 Bug #321948])

loop-aes-$KVERS-di

loop-AES kernel support

(./) in unstable (working out build problems on some archs)

Second stage

loop-aes-$KVERS

loop-AES kernel support

(./) in unstable

See also: partman-crypto [http://svn.debian.org/wsvn/d-i/trunk/packages/partman/partman-crypto/TODO?op=file TODO]

TODO before beta

  • Upload required packages
  • Audit for leaks of keydata or weak implementation
  • Find good sources of entropy
  • Test

Plans for v1.0+

  • Support for dm-crypt
  • Support for dm-crypt LUKS
  • loop-AES keyfiles on removable media
  • Existing (pre-generated) loop-AES keyfiles
  • Encrypted root partition

History