All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arno Wagner <arno@wagner.name>
To: dm-crypt@saout.de
Subject: [dm-crypt] Re: Reading the passphrase from a key-file
Date: Fri, 14 May 2021 15:53:39 +0200	[thread overview]
Message-ID: <20210514135339.GA17215@tansi.org> (raw)
In-Reply-To: <286a7fed-2e24-b622-d9fd-ed3445a547be@gmail.com>

On Fri, May 14, 2021 at 15:41:31 CEST, Milan Broz wrote:
> On 14/05/2021 13:51, Volker Dormeyer wrote:
> > Hello,
> > 
> > today I have another question regading the key-file option. I am 
> > scripting something where the passphare is given by STDIN, with the 
> > following options:
> > 
> > cryptsetup luksOpen /dev/sde hdd --header header.img --key-file -
> > 
> > If I enter this line on a command line it prompts me with "Enter 
> > passphrase for /dev/sde", I was suspecting nothing. How can I make sure 
> > that the passphrase is being read form STDIN?
> 
> Cryptsetup checks if there is input from a real terminal (then displays this message)
> or from a pipe. echo pwd | cryptsetup ... works.
> 
> But if the input is a binary file, it will stop on the first EOL (then you must use --keyfile-size).
> Please read "NOTES ON PASSPHRASE PROCESSING FOR LUKS" in the man page.
> 
> Milan

Was just about to point out the same thing.

"NOTES ON PASSPHRASE PROCESSING FOR LUKS" is towards the end of
the man-page.

Regards,
Arno

-- 
Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: arno@wagner.name
GnuPG: ID: CB5D9718  FP: 12D6 C03B 1B30 33BB 13CF  B774 E35C 5FA1 CB5D 9718
----
A good decision is based on knowledge and not on numbers. -- Plato

If it's in the news, don't worry about it.  The very definition of 
"news" is "something that hardly ever happens." -- Bruce Schneier
_______________________________________________
dm-crypt mailing list -- dm-crypt@saout.de
To unsubscribe send an email to dm-crypt-leave@saout.de

  reply	other threads:[~2021-05-14 13:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-14 11:51 [dm-crypt] Reading the passphrase from a key-file Volker Dormeyer
2021-05-14 13:41 ` [dm-crypt] " Milan Broz
2021-05-14 13:53   ` Arno Wagner [this message]
2021-05-14 14:12   ` Christoph Anton Mitterer
2021-05-14 15:22   ` Clemens Fruhwirth
2021-05-14 15:50     ` Milan Broz
2021-05-14 18:10       ` Clemens Fruhwirth
2021-05-14 20:43         ` Milan Broz
2021-05-15  7:08           ` Clemens Fruhwirth

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=20210514135339.GA17215@tansi.org \
    --to=arno@wagner.name \
    --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.