On 2013-08-01 16:46, philr5150 wrote:
>
> Hi everyone. I’ve been trying to get this to work for a while, not had
> any luck… I want to encrypt my /dev/sdb1 with a passphrase but store
> that passphrase info on a usb stick (/dev/sdc1), the idea being if that
> USB stick isn’t present then the partition can’t be decrypted.
>
> How can I go about doing this?
I have seen partial descriptions of using something similar, but not the
same: the partition is encrypted with a long key held in a usb stick,
and a passphrase you type. The thief needs both to steal your data.
If you have a look at cryptsetup(8), section luksOpen, we read:
luksOpen <device> <name>
Opens the LUKS device <device> and sets up a map-
ping <name> after successful verification of the
supplied passphrase. If the passphrase is not
supplied via --key-file, the command prompts for
it interactively.
The <device> parameter can be also specified by
LUKS UUID in the format UUID=<uuid>, which uses
the symlinks in /dev/disk/by-uuid.
<options> can be --key-file, --keyfile-offset,
--keyfile-size, --readonly, --test-passphrase,
--allow-discards, --header, --key-slot, --master-
key-file].
Thus, the passphrase can be entered via “–key-file”, which is what you
want. You would have to mount it manually, though.
I have a set of scripts to access encrypted partitions, which maybe you
could adapt for use with --key-file. I do not know if the keyfile can be
supplied in the configuration files, perhaps. I should have a look at it.
But I do not see how to implement what I mentioned in my first
paragraph. :-?
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)