Return-Path: Received: from mail-fx0-f215.google.com (mail-fx0-f215.google.com [209.85.220.215]) by mail.saout.de (Postfix) with ESMTP for ; Wed, 11 Nov 2009 13:42:46 +0100 (CET) Received: by fxm7 with SMTP id 7so958510fxm.29 for ; Wed, 11 Nov 2009 04:42:46 -0800 (PST) MIME-Version: 1.0 Sender: ftn768@gmail.com Date: Wed, 11 Nov 2009 06:42:46 -0600 Message-ID: From: Jack Byer Content-Type: text/plain; charset=ISO-8859-1 Subject: [dm-crypt] Encrypting multiple devices with the same passphrase. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de I am currently using a luks-formatted software raid device made up of four hard drives as a boot device. My initramfs first runs mdadm to assemble to raid device and then runs cryptsetup to decrypt the volume. I want to experiment with the raid features of btrfs while still using encryption, but that means that I will need to encrypt each drive individually. If I use luks as normal that means entering four passphrases every time the system boots. I could get around this by using an external key and encrypting it via GPG, but this has a few downsides: it's easier to lose the key, the GPG passphrase interface does not allow for passphrase retries and including GPG makes the initramfs larger. What I would like to do is use the kernel keyring capability (CONFIG_KEYS) so that I could enter the passphrase for the first device and have cryptsetup use that stored key for the other three devices. Is there any way to enable this functionality?