Migrating encrypted home-directory

Maybe i have not understood home-directory encryption fully…

I am trying to open an encrypted home directory from opensuse 11.2 with opensuse 11.3. This means i have a user.img and a user.key

So far i have done:

losetup /dev/loop3 user.img
cryptsetup luksOpen /dev/loop3 home
Enter passphrase for /dev/loop3:
No key available with this passphrase.

At this point it will not accept my passphrase.

A luksDump reveals:

cryptsetup luksDump /dev/loop3
LUKS header information for /dev/loop3

Version: 1
Cipher name: aes
Cipher mode: cbc-essiv:sha256
Hash spec: sha1
Payload offset: 1032
MK bits: 128
MK digest: 26 4b 07 48 f6 36 b9 97 e1 1b 07 11 59 a3 da b0 86 64 45 a5
MK salt: 9e c9 27 35 13 25 1c 38 bd 8e 43 45 00 4d f5 f3
b5 19 52 dc 16 10 71 16 2a 3a 05 b3 44 71 43 73
MK iterations: 10
UUID: 37a454ed-5f04-47e4-9557-870bfe067689

Key Slot 0: ENABLED
Iterations: 298377
Salt: cb 42 b4 21 88 07 d1 8c 66 1c 01 8a 74 41 70 b9
d2 18 09 a5 2f cc db 26 18 da 74 e7 23 58 d9 28
Key material offset: 8
AF stripes: 4000
Key Slot 1: DISABLED
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED

When i try to use the key file, i get:

cryptsetup luksOpen /dev/loop3 home --key-file home.key
No key available with this passphrase.

Any suggestions?

I made a new user with encrypted home directory and copied the user.img and user.key over. They decrypt and mount without any problem.

So why does it fail when i try to mount them manually?

I am having the same problem. I can mount the image with cryptconfig, but I cannot understand why I cannot simply mount with cryptsetup/losetup. I think there is some foomagic going on in cryptconfig, or the keyfile is not what we think it is.

This is an old thread (October 2010) but as I had the same problem already: Interested in an answer too. If somebody should have the knowledge to educate us on this point he is welcome.