decrypt_keyctl
==============
A passphrase caching script to be used in `/etc/crypttab` on Debian and Ubuntu.
When there are multiple cryptsetup (either plain or LUKS) volumes with the same
passphrase, it is an unnecessary task to input the passphrase more than once.
Just add this script as keyscript to your `/etc/crypttab` and it will cache the
passphrase of all crypttab entries with the same identifier.
Either copy decrypt_keyctl into the default search path for keyscripts from
cryptsetup /lib/cryptdisks/scripts/. So you can just write
`keyscript=decrypt_keyctl` in `/etc/crypttab`, or use a random path of your
choice and give the full path e.g `keyscript=/sbin/decrypt_keyctl`.
Requirements
------------
* Debian cryptsetup package with `/etc/crypttab` handling and keyscript option
* Tested with Debian Lenny, Squeeze and Sid
* Installed and working keyutils package (`keyctl`)
* Needs `CONFIG_KEYS=y` in your kernel configuration
What For?
---------
In old (pre 2.6.38) kernels, dm-crypt used to be single threaded. Thus every
dm-crypt mapping only used a single core for crypto operations. To use the full
power of your many-core processor it is was necessary to split the dm-crypt
device. For Linux software raid arrays the easiest segmentation was to just put
the dm-crypt layer below the software raid layer.
But with a 5 disk raid5 it is a rather daunting task to input the passphrase
five times. This is what this keyscripts solve for you.
Usage
-----
Best shown by example:
* 5 disks
* Linux software raid5
Layer:
sda sdb sdc ... sde
+-----------+ +-----------+
| LUKS | | LUKS |
| +-------+ | | +-------+ |
| | RAID5 | | | | RAID5 | |
| | ... | | | | ... | |
Crypttab Entries: