404

[ Avaa Bypassed ]




Upload:

Command:

botdev@3.128.160.111: ~ $
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 cryptab 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:

<target>    <source>    <keyfile>        <options>
sda_crypt   /dev/sda2   main_data_raid   luks,keyscript=decrypt_keyctl
sdb_crypt   /dev/sdb2   main_data_raid   luks,keyscript=decrypt_keyctl
...
sde_crypt   /dev/sde2   main_data_raid   luks,keyscript=decrypt_keyctl


How does it work
----------------

Crypttab Interface:
A keyscript is added to options including a keyfile definition as third
parameter in the crypttab file. The keyscript is called with the keyfile as the
first and only parameter. Additionally there are a few environment variables
set but currently are not used by this keyscript (man 5 crypttab for exact
description).

Keyscript:
Keyctl_keyscript uses the Linux kernel keyring facility to securly cache
passphrases between multiple invocations.
The keyfile parameter from cryptab is used to find the same passphrase between
multiple invocations.

Currently the cache timeout is 60 seconds and not configurable (please report a
bug if it is too low for you).


Problems
--------

    - Passphrase is piped between processes and could end up in unsecured
        memory, thus later swapped to disk!
        => Use of cryptoswap recommend!


Hints
-----

To remove all traces of this keyscript you may want to cleanup the keyring
completely with the following command afterwards:
    sudo keyctl clear @u


Filemanager

Name Type Size Permission Actions
examples Folder 0755
AUTHORS File 102 B 0644
FAQ.gz File 42.41 KB 0644
NEWS.Debian.gz File 3.57 KB 0644
README.Debian.gz File 5.05 KB 0644
README.gnupg File 1.59 KB 0644
README.initramfs.gz File 4.15 KB 0644
README.keyctl File 3.04 KB 0644
README.openct.gz File 2.34 KB 0644
README.opensc.gz File 2.23 KB 0644
TODO.Debian File 3.58 KB 0644
changelog.Debian.gz File 2.94 KB 0644
copyright File 4.83 KB 0644
v1.0.7-ReleaseNotes File 2.85 KB 0644
v1.1.0-ReleaseNotes.gz File 2.22 KB 0644
v1.1.1-ReleaseNotes File 1.75 KB 0644
v1.1.2-ReleaseNotes File 1.56 KB 0644
v1.1.3-ReleaseNotes File 482 B 0644
v1.2.0-ReleaseNotes.gz File 2.07 KB 0644
v1.3.0-ReleaseNotes.gz File 2.08 KB 0644
v1.3.1-ReleaseNotes File 421 B 0644
v1.4.0-ReleaseNotes.gz File 2.2 KB 0644
v1.4.1-ReleaseNotes File 889 B 0644
v1.4.2-ReleaseNotes File 1.59 KB 0644
v1.4.3-ReleaseNotes File 2.3 KB 0644
v1.5.0-ReleaseNotes.gz File 3.24 KB 0644
v1.5.1-ReleaseNotes File 1.26 KB 0644
v1.6.0-ReleaseNotes.gz File 3.73 KB 0644
v1.6.1-ReleaseNotes File 1.02 KB 0644
v1.6.2-ReleaseNotes File 985 B 0644
v1.6.3-ReleaseNotes File 1.82 KB 0644
v1.6.4-ReleaseNotes File 1.99 KB 0644
v1.6.5-ReleaseNotes File 2.42 KB 0644
v1.6.6-ReleaseNotes File 1.07 KB 0644
v1.6.7-ReleaseNotes File 3.25 KB 0644
v1.6.8-ReleaseNotes File 2.01 KB 0644
v1.7.0-ReleaseNotes File 3.03 KB 0644
v1.7.1-ReleaseNotes File 1.34 KB 0644
v1.7.2-ReleaseNotes File 1.45 KB 0644
v1.7.3-ReleaseNotes File 811 B 0644
v1.7.4-ReleaseNotes File 657 B 0644
v1.7.5-ReleaseNotes File 833 B 0644
v2.0.0-ReleaseNotes.gz File 9.5 KB 0644
v2.0.1-ReleaseNotes.gz File 2.17 KB 0644
v2.0.2-ReleaseNotes.gz File 1.95 KB 0644