From: John Lane <dm-crypt@jelmail.com>
To: dm-crypt@saout.de
Subject: [dm-crypt] How can I write a passphrase hash to key file for plain dm-crypt ?
Date: Fri, 07 Nov 2014 16:34:39 +0000 [thread overview]
Message-ID: <545CF49F.9040305@jelmail.com> (raw)
I'm trying to use plain dm-crypt. I have an example like this
$ cryptsetup open /dev/sda mydisk --type plain --hash sha512
that works fine. I enter 'password' as the pass phrase when requested.
I want to create an equivalent key-file so that I can do
$ cryptsetup open /dev/sda mydisk --type plain --key-file mykey
I couldn't find a cryptsetup command do to this, so I tried these:
$ openssl dgst -sha512 -binary <<< 'password' > mykey
also
$ sha512sum <<< 'my_passphrase' | head -c 128 > mykey
without success.
As I understand it, the key file contains a binary key that is used
as-is, so I would have thought the first try above would have worked. I
even used xxd to check that mykey contained the hash in binary data.
How can I make a key-file that is equivalent to a keyed-in passphrase?
Thanks in advance.
next reply other threads:[~2014-11-07 16:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-07 16:34 John Lane [this message]
2014-11-07 18:56 ` [dm-crypt] How can I write a passphrase hash to key file for plain dm-crypt ? Arno Wagner
2014-11-07 20:47 ` John Lane
2014-11-08 1:16 ` Arno Wagner
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=545CF49F.9040305@jelmail.com \
--to=dm-crypt@jelmail.com \
--cc=dm-crypt@saout.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.