All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthias Schniedermeyer <ms@citd.de>
To: Heinz Diehl <htd+ml@fritha.org>
Cc: dm-crypt@saout.de
Subject: Re: [dm-crypt] plain: opening with a wrong password
Date: Sun, 8 Feb 2015 00:16:24 +0100	[thread overview]
Message-ID: <20150207231624.GA23872@citd.de> (raw)
In-Reply-To: <20150207180356.GA4982@fritha.org>

On 07.02.2015 19:03, Heinz Diehl wrote:
> On 07.02.2015, dennis@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.

No.
With Plain the password can't be verified, the dm-crypt device is setup 
and if the password was wrong, the "decrypted" device contains garbage.

Containers usually have a means to test if the password is correct, 
plain does not.

> An example which at least partially covers the same item is password storing by
> netshops, e.g. those who send you the plaintext passphrase when providing your
> email after hitting "Forgotten password". A breach into this password database
> reveals all passwords in clear text. Therefore, passwords usually are stored as
> their hash, and the clear text is deleted right after the hashing. That are
> those netshops which will provide a reset link to you after hitting the
> "Forgotten password" button, because they only have the hash, which can't be
> re-translated into the clear text passphrase.

Which is a totally different thing.

Here the you tell the gatekeeper your secret password and the gatekeeper 
will let you through if you satiesfy the rules of the day.
The rule usually is "I will let you through, if the hash of the password 
you provided me is the same one as the one i have on file".
But the rules can be pretty much anything, up to "Anybody with any 
password" if the programmer had a bad day.
IOW. The password itself doesn't protect anything, it's the (hopefully) 
debugged gatekeeper that does the protecting.
So if you break the gatekeeper, you can circumvent the password without 
knowing it.
Actually encrypting the data of the user with the password of the user, 
so you actually needed to password is "uncommon" AFAIK.


Whereas in encryption the password itself (with or without hashing 
and/or decrypting the actual key) is directly used and can't be 
circumvented to get access to the data.

It's somewhat like the PALs with an encrypted firing sequence, the PAL 
code itself is used in the firing sequence to correctly shape the 
nuclear material. With a wrong code the weapon will just mis-detonated 
and not reach criticallity and will hopefully be unusable afterwards.

http://en.wikipedia.org/wiki/Permissive_Action_Link

Before the encrypted firing sequence you could "just" remove the PAL and 
use your own detonation mechanism, as the code itself was nothing more 
like comparing the code to a stored hash and the gatekeeper was the 
thing that actually pressed the big red button.
With an encrypted firing sequence that doesn't work, as you still need 
the parameters for the correct firing sequence, which hopefully can't be 
easily reverse engineered.




-- 

Matthias

  reply	other threads:[~2015-02-07 23:16 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-04 12:33 [dm-crypt] plain: opening with a wrong password U.Mutlu
2015-02-04 13:02 ` Quentin Lefebvre
2015-02-04 13:30   ` U.Mutlu
2015-02-05 11:54     ` Arno Wagner
2015-02-05 13:53       ` U.Mutlu
2015-02-05 14:04         ` U.Mutlu
2015-02-05 23:51           ` Arno Wagner
2015-02-06 14:01             ` dennis
2015-02-06 14:19               ` Michael
2015-02-06 14:47                 ` U.Mutlu
2015-02-06 18:27               ` Arno Wagner
2015-02-07 17:27                 ` dennis
2015-02-07 18:03                   ` Heinz Diehl
2015-02-07 23:16                     ` Matthias Schniedermeyer [this message]
2015-02-08  8:19                       ` Heinz Diehl
2015-02-08  9:23                         ` Arno Wagner
2015-02-08  9:55                           ` Milan Broz
2015-02-08 10:09                             ` U.Mutlu
2015-02-08 10:33                               ` Milan Broz
2015-02-09  3:13                             ` Arno Wagner
2015-02-08  3:07                     ` Arno Wagner
2015-02-08  2:59                   ` Arno Wagner
2015-02-06 14:04             ` U.Mutlu
2015-02-06 18:20               ` 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=20150207231624.GA23872@citd.de \
    --to=ms@citd.de \
    --cc=dm-crypt@saout.de \
    --cc=htd+ml@fritha.org \
    /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.