3. Configuring the kernel

In order to use Cryptoloop, you need to activate a few kernel options. You have the option to either compile these requirements as modules or compile them directly into the kernel. The following steps enable them as modules. If you are not familiar with building a 2.6 kernel, you should refer to the Linux Kernel HOWTO. The following instructions just give the minimal steps.

  1. Go to the directory that holds your kernel source tree (usually /usr/src/linux/) and start the configuration:

    make menuconfig
  2. Enable general loop device support. Active "Loopback device support" under:

    Device Drivers -> Block Devices -> Loopback device support
  3. Enable Cryptoloop support in the same section. The option should show up as soon as you enable general loopback support.

  4. Enable the cryptographic API by going to "Cryptographic options" from the main menu. You can safely enable most algorithms here. I would recommend that you enable the following:

    -- Cryptographic API
         <*>   HMAC support  
         < >   Null algorithms
         <*>   MD4 digest algorithm
         <*>   MD5 digest algorithm
         <*>   SHA1 digest algorithm
         <*>   SHA256 digest algorithm
         <*>   SHA384 and SHA512 digest algorithms
         <*>   DES and Triple DES EDE cipher algorithms
         <*>   Blowfish cipher algorithm
         <*>   Twofish cipher algorithm
         <*>   Serpent cipher algorithm 
         <*>   AES cipher algorithms
         <*>   CAST5 (CAST-128) cipher algorithm
         <*>   CAST6 (CAST-256) cipher algorithm 
         <*>   Deflate compression algorithm
         < >   Testing module

    If you decide to make them as modules, make sure you load the appropriate modules (cryptoloop, aes, etc.) at startup before you continue.

  5. Make your kernel and modules and install them. For example, if you are using lilo on a x86 machine, this can be done like this:

         make modules_install
         cp arch/i386/boot/bzImage /boot/kernel-2.6.1
  6. Load the required modules at startup. This is handled differently on the various distributions. For example, on Gentoo these modules can be added to /etc/modules.autoload/kernel-2.6. If you have compiled Cryptoloop as a module, it will have to be loaded first. It will automatically load the basic loop device module as well. You can manually load the module with:

    modprobe cryptoloop