public inbox for cryptsetup@lists.linux.dev
 help / color / mirror / Atom feed
From: Milan Broz <gmazyland@gmail.com>
To: cryptsetup development <cryptsetup@lists.linux.dev>
Subject: Cryptsetup 2.7.x plain type default cipher and hash will change
Date: Sat, 30 Sep 2023 18:45:49 +0200	[thread overview]
Message-ID: <6ebb0f69-892f-41bf-bf72-e868734d8c85@gmail.com> (raw)

Hi,

As RIPEMD160 hash will be phased out soon, we must change
default hashing algorithm for plain type in cryptsetup.

(There is nothing related to LUKS; plain type is the old simple
wrapper around dm-crypt mapping.)

While at it, we also change the default cipher from AES-CBC with ESSIV
to AES-XTS with plain64 initial vector (the same default as in LUKS,
just with 256-bit key size, thus AES128, as XTS uses two keys).

As this is a backward incompatible change, we will also add a warning
if an open command is used without explicit --cipher, --key-size,
and --hash options. (These should be already mandatory for /etc/crypttab
plain type use).

You can still use whatever mode and hash you want, but it must be explicitly
specified on the command line (and must be supported by used cryptographic
library or kernel).

Plain mode with passphrase is actually not a good practice as it directly
derives key from passphrase and no standard password-based key derivation
algorithm is used. You should prefer LUKS anyway :-)

Also note that if keyfile is specified for plain mode, there is no password
hashing at all (keyfile is used directly as the encryption key).

For more info, please read issue 758
https://gitlab.com/cryptsetup/cryptsetup/-/issues/758

The draft merge request for planned change is here
https://gitlab.com/cryptsetup/cryptsetup/-/merge_requests/543

For downstream maintainers:

To update stable distros, you can still configure old defaults with configure options
  --with-plain-hash=ripemd160 --with-plain-cipher=aes --with-plain-mode=cbc-essiv:sha256

If you see problems with this change, reply to this mail or comment on the issue
mentioned above. We postponed this change already for several years, though.

Milan

p.s.
Cryptsetup 2.7.0 release candidate/testing is planned in the next few weeks.


                 reply	other threads:[~2023-09-30 16:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=6ebb0f69-892f-41bf-bf72-e868734d8c85@gmail.com \
    --to=gmazyland@gmail.com \
    --cc=cryptsetup@lists.linux.dev \
    /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