DM-Crypt Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arno Wagner <arno@wagner.name>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] LUKS header cksum?
Date: Fri, 20 Jul 2012 22:42:46 +0200	[thread overview]
Message-ID: <20120720204246.GA20133@tansi.org> (raw)
In-Reply-To: <CAKRxpuvv0+DPCVMM4sh4S35=vinvN3Cf_tWBNZ2CxyxWRiw_qA@mail.gmail.com>


On Fri, Jul 20, 2012 at 11:25:13AM -0700, Two Spirit wrote:
> I was wondering if there is a checksum on the LUKS header? I didn't read
> the whole thing, but a quick look at
> the
> http://wiki.cryptsetup.googlecode.com/git/LUKS-standard/on-disk-format.pdf
> specs, seems to only have
> a checksum of the master-key, not of the whole header.

There is no header checksum. It is not needed. Any corruption 
that may be introduced by defective RAM, busses, controllers 
and disks should be detectet at the same time a checksum
error would be detected, namely on luksOpen. Note that these 
only be introduced on header writes or if the disk goes south.
In tha later case, the disk has its own checksums and should
report the error and refuse to actually read the header.

> When I found my corruption, the cryptsetup seemed to work fine and nothing
> indicated to me that there was some corruption.
> I didn't run isLuks to see what that would have said. Evidently there was
> enough information around to consider the LUKS was
> there, and keep the running system working OK, but not enough to recognize
> that there was corruption and that my
> passphrases wouldn't work.

Are you talking about a _mapped_ LUKS device? The header is not
used after the mapping is established. You could completely wipe
the header and key-slots and the mapping would remain 
operational and no error would ever be reported while the
mapping remains active. A header checksum would not change 
anything.

You could use --test-passphrase to see whether the header and 
specific key-slot is still intact for a mapped device though.

Arno
-- 
Arno Wagner,    Dr. sc. techn., Dipl. Inform.,   Email: arno@wagner.name 
GnuPG:  ID: 1E25338F  FP: 0C30 5782 9D93 F785 E79C  0296 797F 6B50 1E25 338F
----
One of the painful things about our time is that those who feel certainty 
are stupid, and those with any imagination and understanding are filled 
with doubt and indecision. -- Bertrand Russell 

      reply	other threads:[~2012-07-20 20:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-20 18:25 [dm-crypt] LUKS header cksum? Two Spirit
2012-07-20 20:42 ` Arno Wagner [this message]

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=20120720204246.GA20133@tansi.org \
    --to=arno@wagner.name \
    --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