Skip to contentSkip to conversation

Problem opening device: PBKDF2_HMAC_SHA1: Assertion `iterations != 0' failed

dm-crypt Andreas 2 participants 2 messages May 2, 2010

lore
Share & tools
lore

Andreas

author
#0 lore raw

Hello,

I have a terrible problem with an luks-encrypted device. There's no way atm to open the device.

The error:
==========
cryptsetup -r luksOpen /dev/sdc data
Enter LUKS passphrase:
cryptsetup: pbkdf.c:55: PBKDF2_HMAC_SHA1: Assertion `iterations != 0' failed.
Aborted

(Yes! I've encrypted my device not only a single partition. It worked well for the last years)

Configuration:
==============
- Ubuntu-box: cryptsetup 1.0.6 (2.6.27-14)
- Knoppix-box: cryptsetup 1.0.4 (2.6.19)

What i've done:
===============
- Removed the device from the Ubuntu-box (it worked there perfectly)
- Attached the device to the Knoppix-Box
- Tried to open the device on the Knoppix-Box
- Received an error (0.99.1 to 0.99)??
- Canceled and tried to open it again
- From now on the cryptsetup takes 100% CPU when i open the device
- If i switch back to the Ubuntu-box i get the error described above

Any help is welcome!

maxxle

#1 lore raw
Quoted 6 lines · Andreas

What i've done:
===============
- Removed the device from the Ubuntu-box (it worked there perfectly)
- Attached the device to the Knoppix-Box
- Tried to open the device on the Knoppix-Box
- Received an error (0.99.1 to 0.99)??

Hm. I almost sure you are hitting the same automatic conversion bug. (~ only for disk formatted somewhere in version 1.0.3)

I removed that code from recent cryptsetup completely, it need different approach. But this bug is very rare.

see http://article.gmane.org/gmane.linux.kernel.device-mapper.dm-crypt/4060

If so, luckily it can be easily fixed. If you send me first 4kB (visible LUKS header) I can fix it for you. (This part doesn't contain keyslots.)

dd if=/dev/≤your_luks_device> of=/backup.img bs=512 count=8

If you agree, please send me the header - backup.img - in private mail, (optionally encrypted using my gpg key, id is 0xBB21822F on keyservers)

I'll send you back the fixed header (if it is this problem...) I need anyway more examples of bad header to prepare some "fix" in new code or at least add some FAQ entry.

Milan