t-d-k / LibreCrypt

LibreCrypt: Transparent on-the-fly disk encryption for Windows. LUKS compatible.
https://LibreCrypt.tdksoft.co.uk
736 stars 71 forks source link

Error open LUKS partition in Windows 7 #41

Open karunass opened 8 years ago

karunass commented 8 years ago

I have flash drive with LUKS partition. I have created it by cryptsetup in Ubuntu with 4096 bytes key. Key stored in file. I use LibreCrypt version 6.2, downloaded from github and try to open my flash drive in Windows 7 (64 and 32 bit versions). In both versions i get error: "Unable to open container. Please check your keyphrase and settings, and try again." FreeOTFE version 5.21 opened this flash with the same key without any problems. Maybe my key file need to be in some special format for LibreCrypt?

P.S. Sorry for my english.

t-d-k commented 8 years ago

Hi, I can't reproduce it exactly in the latest build - LC opens a LUKS container created on Linux using a keyfile OK for me.
But I've recently fixed a bug that was giving this error if the key was not in the first keyslot, whether a keyfile or password. Could you please post the output of crytpsetup luksDump for the volume, to check if it's this, thanks. tdk

karunass commented 8 years ago

Hi. This is my output of crytpsetup luksDump LUKS header information for /dev/sdb1

Version: 1 Cipher name: aes Cipher mode: xts-plain64 Hash spec: sha1 Payload offset: 4096 MK bits: 256 MK digest: 40 41 cf 34 5c 8e 48 09 ef 52 9a f7 c8 1f 3a 96 b4 5b 12 57 MK salt: 6c 92 5a 1f bc 04 f6 40 71 71 1d 85 f7 55 c3 2f 6e 73 ef af cb e5 82 2f c8 4d 82 40 55 af 03 8a MK iterations: 72000 UUID: 551e6004-fa86-4f41-9b3f-b081a80f9aed

Key Slot 0: ENABLED Iterations: 289919 Salt: 3f ec a0 b1 50 4a bc 1d 0e 53 5e e0 c1 62 a7 e4 56 be f6 b8 ce 26 78 76 08 3a c5 ff 9f 04 74 e9 Key material offset: 8 AF stripes: 4000 Key Slot 1: ENABLED Iterations: 280393 Salt: ff 3e 4e d6 43 9a f3 5b 74 77 50 1f f3 09 c3 2f d2 90 d0 b4 fe b5 0d 5a 1a db 50 5e 60 02 09 f1 Key material offset: 264 AF stripes: 4000 Key Slot 2: DISABLED Key Slot 3: DISABLED Key Slot 4: DISABLED Key Slot 5: DISABLED Key Slot 6: DISABLED Key Slot 7: DISABLED

t-d-k commented 8 years ago

OK, so it looks like the keyfile was added to the 2nd slot - and it could well be this. Please can you try again with this executable thanks tdk

karunass commented 8 years ago

No, with this version i get the same error.

t-d-k commented 8 years ago

OK, this is odd. Could you please post the cryptsetup commands you used to add the keyfile to the LUKS volume. If you created it with cryptsetup luksAddKey make sure you have "keyfile contains ASCII password" off, as in the attached screenshot. Could you also try with the file 'LUKS.box', and the keyfile 'keyfile' which you can find here

open_luks_keyfile

karunass commented 8 years ago

i used the following commands sudo cryptsetup luksFormat /dev/sdb1 -d ./keys/master.key sudo cryptsetup luksAddKey /dev/sdb1 ./keys/sdcard.key -d ./keys/master.key "keyfile contains ASCII password" was off. I tried to mount with master.key and sdcard.key, but get error.

karunass commented 8 years ago

I have tried with 'LUKS.box', and the keyfile 'keyfile' from here, but got this error again :(

t-d-k commented 8 years ago

It looks like it might be a more fundamental error then. Can you open the file LUKS.box without a keyfile - just using the password 'password'? If that doesn't work could you please try with 'a.box' and the password 'password'. thanks

jaro3 commented 8 years ago

I get exactly the same problem even with the latest 6.3 executable on Windows 7 64bit :-( It can create the volumes but doesn't mount them with the "Unable to open container. Please check your keyphrase and settings, and try again." Tried with both files and partitions created either in Windows or Linux ....

karunass commented 8 years ago

I have tried to open LUKS.box and a.box with password 'password'. a.box was opened successfully, but with LUKS.box i got error "Unable to open container. Please check your keyphrase and settings, and try again."

lisenet commented 8 years ago

Same issue here with LUKS on Windows 7. As a workaround, I removed a broken LibreCrypt package and replaced with FreeOTFE version 5.21 which works fine, until the issue is fixed.

stevesbrain commented 7 years ago

For what it's worth, this issue affects me also. Windows 8 x64. Same scenario as above - second keyslot doesn't work whilst it does on Linux.

Saiv46 commented 4 years ago

Windows 10 x64 Got this problem too. I used keyfiles to secure my backups on external drive and now I can't open it.