Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Milan Broz <mbroz@redhat.com>
To: Bai Shuwei <baishuwei@gmail.com>
Cc: linux-crypto@vger.kernel.org
Subject: Re: how the key is generated?
Date: Wed, 27 Jan 2010 09:21:01 +0100	[thread overview]
Message-ID: <4B5FF76D.3080406@redhat.com> (raw)
In-Reply-To: <f3566d61001261921v2a7f319bgddb3a3bc971eea10@mail.gmail.com>

On 01/27/2010 04:21 AM, Bai Shuwei wrote:
> On Tue, Jan 26, 2010 at 4:58 PM, Milan Broz <mbroz@redhat.com> wrote:
> I use "dmsetup table --showkeys" get the bellow information.
> 
> disk$ sudo dmsetup table --showkeys /dev/mapper/dsi0
> 0 2040 crypt aes-xts-plain
> 3131313131313131313131313131313131313131313131313131313131313131 0 7:0
> 2056
> 
> If i forget the passphase, can i use the above information/key to
> recovery my disk?

yes, if you know mapping table (iow: key, cipher and mode,
IV and device offset), you can map this device directly using dmsetup.
(try dmsetup create dsi0 --table "0 2040 crypt .... 7:0 2056")

Anyway, you can better backup LUKS header and use some other passphrase,
there is also volume_key project, which implements key escrow (for cryptsetup too).

Milan

      reply	other threads:[~2010-01-27  8:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-26  8:41 how the key is generated? Bai Shuwei
2010-01-26  8:58 ` Milan Broz
2010-01-27  3:21   ` Bai Shuwei
2010-01-27  8:21     ` Milan Broz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B5FF76D.3080406@redhat.com \
    --to=mbroz@redhat.com \
    --cc=baishuwei@gmail.com \
    --cc=linux-crypto@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox