DM-Crypt Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] extracting master key from luks header, cryptsetup
@ 2011-05-03 20:50 anirudh
  2011-05-04  5:26 ` Rick Moritz
  2011-05-04  6:11 ` Milan Broz
  0 siblings, 2 replies; 3+ messages in thread
From: anirudh @ 2011-05-03 20:50 UTC (permalink / raw)
  To: dm-crypt

Is there a way to extract the master key from luks header if we have the key or
pass-phrase used to encrypt the volume using cryptsetup?

I wold like to save the master-key separately in a safe place and use it only in
the case where i forget the pass-phrase used to encrypt the volume. Mainly to
avoid saving the pass-phrase every time i change it.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dm-crypt] extracting master key from luks header, cryptsetup
  2011-05-03 20:50 [dm-crypt] extracting master key from luks header, cryptsetup anirudh
@ 2011-05-04  5:26 ` Rick Moritz
  2011-05-04  6:11 ` Milan Broz
  1 sibling, 0 replies; 3+ messages in thread
From: Rick Moritz @ 2011-05-04  5:26 UTC (permalink / raw)
  To: anirudh; +Cc: dm-crypt

Just create a backup luks header with a keyslot that is not in your
actual header and write that key down.
Then to get to the volume you simply overwrite the luks header with the backup.
I see no reason why this shouldn't work.

On Tue, May 3, 2011 at 10:50 PM, anirudh
<anirudh.takkallapally@gmail.com> wrote:
> Is there a way to extract the master key from luks header if we have the key or
> pass-phrase used to encrypt the volume using cryptsetup?
>
> I wold like to save the master-key separately in a safe place and use it only in
> the case where i forget the pass-phrase used to encrypt the volume. Mainly to
> avoid saving the pass-phrase every time i change it.
>
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dm-crypt] extracting master key from luks header, cryptsetup
  2011-05-03 20:50 [dm-crypt] extracting master key from luks header, cryptsetup anirudh
  2011-05-04  5:26 ` Rick Moritz
@ 2011-05-04  6:11 ` Milan Broz
  1 sibling, 0 replies; 3+ messages in thread
From: Milan Broz @ 2011-05-04  6:11 UTC (permalink / raw)
  To: anirudh; +Cc: dm-crypt

On 05/03/2011 10:50 PM, anirudh wrote:
> Is there a way to extract the master key from luks header if we have the key or
> pass-phrase used to encrypt the volume using cryptsetup?

If you want to really backup master key (and not the whole header with known
keyslot with luksHeaderBackup) use "luksDump --dump-master-key" command
(available in cryptsetup 1.2.0, passphrase for some keyslot is required).

(Also you can activate device and save the mapping table with master key
with "dmsetup table --showkeys <active device>".)

Milan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-04  6:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-03 20:50 [dm-crypt] extracting master key from luks header, cryptsetup anirudh
2011-05-04  5:26 ` Rick Moritz
2011-05-04  6:11 ` Milan Broz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox