Re: cryptsetup mistakenly includes newline character in passphrase

"[email protected]" <[email protected]>
Newsgroups dev.linux.lists.cryptsetup
Message-ID <CACHosL_pEoFibzKwvwRbXcWiHL+shG+b4Br9GRpJURvHAHqLuw@mail.gmail.com>
Hi Christoph,

I understand.
Then it seems that I got confused.

Thanks.

Best regards,
David.


On Wed, Sep 7, 2022 at 7:03 PM Christoph Anton Mitterer
<[email protected]> wrote:
>
> Hey.
>
> In your script, you create the volume via:
> > printf "%s\n" "${PASSPHRASE}" | cryptsetup "${cmd_cryptsetup_params[@]}" --type=luks2 luksFormat ${DEVP}5 -
>
> With the "-" in the end meaning "read the key file from stdin"... so it
> takes up everything presented (up to some compiled-in maximum).
>
> There you have a trailing "\n" in the printf.
>
>
> When opening you also read a keyfile from stdin, but you don't give a
> trailing "\n":
> > printf "%s" "${PASSPHRASE}" | cryptsetup --verbose --debug --key-file - open ${DEVP}5 debug_open
>
>
> Cheers,
> Chris.



-- 

Best regards,
David.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.