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: Tue, 26 Jan 2010 09:58:24 +0100	[thread overview]
Message-ID: <4B5EAEB0.9040205@redhat.com> (raw)
In-Reply-To: <f3566d61001260041s13286706ra5c032ea2b4ce1d6@mail.gmail.com>

On 01/26/2010 09:41 AM, Bai Shuwei wrote:
> Hello, everyone:
>     i add one line in the setkey function which is in xts.c file to
> print the in_key value. I find the key value not same i set in the
> keyfile by cryptsetup
> 
>    my command is
> #   cryptsetup luksFormat -d my_keyfile -c xts-aes-plain -s 256 /dev/loop0

-d is key file for key slot (passphrase), volume (master) key for encryption
is generated using RNG during luksFormat inside cryptsetup.

You can use pre-generated master key using --master-key-file in cryptsetup 1.1.x
(but note it reads raw input, not hexa encoding). See man page.

You do not need to modify xts.c btw, try "dmsetup table --showkeys" for active
dm-crypt mappings to show used volume key.

(and also better use dm-crypt@saout.de mailing list for questions related to
userspace cryptsetup)

Milan
--
mbroz@redhat.com

  reply	other threads:[~2010-01-26  8:58 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 [this message]
2010-01-27  3:21   ` Bai Shuwei
2010-01-27  8:21     ` Milan Broz

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=4B5EAEB0.9040205@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