DM-Crypt Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Heinz Diehl <htd@fancy-poultry.org>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] luksFormat Password Entropy
Date: Thu, 19 Aug 2010 16:28:17 +0200	[thread overview]
Message-ID: <20100819142817.GA12238@fancy-poultry.org> (raw)
In-Reply-To: <AANLkTikWpW1i99N1Vs72ahY-hBssGuTaePiNWD=HkOV5@mail.gmail.com>

On 19.08.2010, Michael Matczynski wrote: 

> For luksFormat, is there a difference in password strength between the
> following two passwords?
 
> 1.) <256bitsecret>
> 
> 2.) <256bitsecret> | base64

Yes, if both passwords have the same length and you choose a password which 
is built upon a base of at least more than 64 different chars.

The password strength (entropy) is calculated this way,

 B = ((L * log P) / log 2)

where B is the entropy in bits, L is the length of the password, and P is
the amount of possible different chars (the "pool"). So if you choose base64, 
P will always be 64, and if you choose a password which e.g. includes A-Za-z0-9
og random chars as %!"/(] (and so on), P will be higher, thus resulting in
a higher strength of the overall password. As long as you choose a
password with P > 64, it will be stronger.

There are P^N different passwords.

> Does the use of PBKDF2 make the longer but less entropy password #2
> equivalent to #1?

If the hash used in PBKDF2 is not flawed or broken: yes.

  parent reply	other threads:[~2010-08-19 14:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-18 20:11 [dm-crypt] luksFormat Password Entropy Michael Matczynski
2010-08-19 13:54 ` Arno Wagner
2010-08-19 14:28 ` Heinz Diehl [this message]
2010-08-19 15:23   ` Heinz Diehl
2010-08-19 18:35   ` Arno Wagner
2010-08-21  7:30     ` Heinz Diehl
2010-08-21 17:41       ` 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=20100819142817.GA12238@fancy-poultry.org \
    --to=htd@fancy-poultry.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox