[dm-crypt] plain: opening with a wrong password

Arno Wagner arno at wagner.name
Sun Feb 8 04:07:11 CET 2015


On Sat, Feb 07, 2015 at 19:03:56 CET, Heinz Diehl wrote:
> On 07.02.2015, dennis at basis.uklinux.net wrote: 
> 
> > My conclusion would have been that if the passphrase is
> > initially at least as secure as a random key, then hashing can never
> > increase security but may decrease it.
> 
> You need something to compare the passphrase to, and that's the hash.
> How would you check the validity of the entered passphrase otherwise?
> A plain text comparison is obviously impossible.

Note that "compare" here may also mean things like "decrypt something
with it and see whether that has some expected checksum" and even
more complex ways of "comparing". The base case of storing a password
in hashed form, as for example, the unix /etc/passwd file is only 
one form of doing it, namely the form necessary when doing 
authentication. Authetication delivers 1 bit as result, a 1 for
"yes, this is the guy he claime to be" and a 0 for the other case.

LUKS for example does not do authentication, but key protection. 
That is different. Its result is a key used for encryption 
and hence the result is, for example, 128 bit or 256 bit.

Hence LUKS does not store any hashed passwords. Instead it tries to 
reconstruct the master key from the anti-forensic stripes and
then checks whether this really is the master-key, again in a way
indirect enough that the stored information that in the end is 
compared against does not help to find the master key.

Gr"usse,
Arno

-- 
Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: arno at 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


More information about the dm-crypt mailing list