Re: A12-140 Piping two gpg'ed keys to cryptsetup luksAddKey

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mick Reed wrote:

> Create the container
> # gpg --decrypt --quiet 2>>/dev/null first_key.gpg | cryptsetup \
>     luksFormat /dev/partition

> If we can't find a way to do this, I will be happy to help with a patch. 
> I am
> not a good enough coder to solve this on my own, yet.  I do think there is
> a
> need for this, please offer any suggestions.  Thanks!

This works for me with bash:

# cryptsetup  luksFormat /dev/loop0 <(cat key1)
# cryptsetup  --key-file <(cat key1) luksAddKey /dev/loop0 <(cat key2)
# cryptsetup --key-file <(cat key2) luksOpen /dev/loop0 foo

Btw. piping keyfiles to cryptsetup without using --key-file may be a bad
idea. Iirc at least older versions of cryptsetup did not use the full
keyfile for encryption, e.g. when it contained newline characters.

Regards,
Till


---------------------------------------------------------------------
dm-crypt mailing list - http://www.saout.de/misc/dm-crypt/
To unsubscribe, e-mail: dm-crypt-unsubscribe@xxxxxxxx
For additional commands, e-mail: dm-crypt-help@xxxxxxxx


[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux