[dm-crypt] How can a passphrase be incorrect even after `luksHeaderBackup` and `luksHeaderRestore`?

Milan Broz mbroz at redhat.com
Fri Aug 5 04:20:40 CEST 2011


On 08/05/2011 01:18 AM, Paul Menzel wrote:
> % sudo md5sum /tmp/*header
> 7b897c620776f549324810a8aeb9921e  /tmp/sda2.header
> 7b897c620776f549324810a8aeb9921e  /tmp/sda.header
> ce314509007b2c76eb85e7b89ee25da5  /tmp/sdb.header
> ------- 8< --- entered commands --- >8 -------
> 
> I would have assumed that all files are identical, i. e. they have the
> same hash.

It should be the same.
(But there is gap between header and keyslot which is explicitly wiped
during backup. But from the commands you run it should be the same now.)

On which binary offsets it differs?

Can you try the same exercise but running it through loop device?

(dd e.g. 4M from both sd[ab] disks, map it to loop devices and run the same
commands - luksHeaderBackup/Restore.
Do you see the same problem?

Milan


More information about the dm-crypt mailing list