All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <gmazyland@gmail.com>
To: Jan Tulak <jtulak@redhat.com>, dm-crypt@saout.de
Subject: Re: [dm-crypt] Can I test for LUKS passphrase strength without formatting a device?
Date: Tue, 7 Nov 2017 19:45:46 +0100	[thread overview]
Message-ID: <663a9d3d-28d2-a913-8bb3-7d949464b9b0@gmail.com> (raw)
In-Reply-To: <CACj3i70n3quSrmWmpXXGGAdMv3jNh3k36zLe6WT1YWH2y+OHZA@mail.gmail.com>

On 11/07/2017 05:51 PM, Jan Tulak wrote:
> Is it possible to test whether a passphrase is strong enough (and
> luksFormat will accept it), without the need to really create a device
> with this passphrase? I ask because I want to test the password before
> I run a sequence of commands and I don't want them to fail in the
> middle just because of a weak passphrase.

Cryptsetup/LUKS does not itself enforce any passphrase quality, it is libpwquality
that libcryptsetup can be linked to (optionally, we use it in all Red Hat distros).

See man for pwquality library (the idea is to enforce password policy for the whole
distro, so it uses configuration pwquality file).

> I checked for the --test-passphrase, but that verifies if the
> passphrase would decrypt an existing device, which is not what I want.

This tests only LUKS, pwquality is called only in Format.

m.

  reply	other threads:[~2017-11-07 18:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-07 16:51 [dm-crypt] Can I test for LUKS passphrase strength without formatting a device? Jan Tulak
2017-11-07 18:45 ` Milan Broz [this message]
2017-11-07 21:34   ` Jan Tulak
2017-11-07 21:12 ` Michael Kjörling

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=663a9d3d-28d2-a913-8bb3-7d949464b9b0@gmail.com \
    --to=gmazyland@gmail.com \
    --cc=dm-crypt@saout.de \
    --cc=jtulak@redhat.com \
    /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.