t-d-k / LibreCrypt

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

mounting LVM volumes in LUKS partitions does not work #22

Open erdii opened 9 years ago

erdii commented 9 years ago

ref: #18

It still doesn't work =( It tells me that my volume has been mounted , but in Windows Explorer the Volume has 0 bytes in size.

This is what i see in the Open LUKS partition dialog ( the partition with 930,79 GB is my LUKS one) mount_luks_dialog

This are the LibreCrypt Container Properties after 'mounting': mounted_details

And this is the end of the cryptsetup-Style dump:

Master Key

User supplied password : [omitted] Password unlocks key slot: 0 Recovered master key : 00000000 | 3F 3F 3F 3F 3F 3F 3F 3F | ???????? 00000008 | 3F 3F 3F 3F 3F 3F 3F 3F | ???????? 00000010 | 3F 3F 3F 3F 3F 3F 3F 3F | ???????? 00000018 | 3F 3F 3F 3F 3F B2 3F 3F | ?????.?? 00000020 | 00 00 00 00 00 00 00 00 | ........ 00000028 | 00 00 00 00 00 00 00 00 | ........ 00000030 | 00 00 00 00 00 00 00 00 | ........ 00000038 | 00 00 00 00 00 00 00 00 | ........

unfortunately this is not my luks master key :/

linux-modder commented 9 years ago

Will take a look today that is surely not right. for what linux fs type or is this actually luks aes on ntfs?

Corey W Sheldon Freelance IT Consultant, Multi-Discipline Tutor (p) 310.909.7672 G+: https://www.plus.google.com/+CoreySheldon LinkedIn: https://www.linkedin.com/profile/view?id=70127804 Github: https://www.github.com/linux-modder Facebook: https://www.facebook.com/corey.sheldon Several Communities on Stack Exchange https://www.stackexchange.com

http://www.facebook.com/1stclassmobileshine

Tutoring in person or via any of the following platforms: HackHands https://www.hackhands.com Wizpert https://www.wizperts.com FieldNation https://www.fieldnation.com AirPair https://www.airpair.com Truelancer http://www.truelancer.com

{PayPal,Google Wallet/Play store, Apple Pay}

pub 3072D/718BF597 http://pgp.mit.edu/pks/lookup?op=get&search=0xE958C5D6718BF597 2014-12-08 Key fingerprint = 2930 99EB 083D D332 0752 88C4 E958 C5D6 718B F597

uid Corey Sheldon (Fedora Key) sheldon.corey@gmail.com

On Fri, May 22, 2015 at 9:20 AM, erdii notifications@github.com wrote:

ref: #18 https://github.com/t-d-k/LibreCrypt/issues/18

It still doesn't work =( It tells me that my volume has been mounted , but in Windows Explorer the Volume has 0 bytes in size.

This is what i see in the Open LUKS partition dialog ( the partition with 930,79 GB is my LUKS one) [image: mount_luks_dialog] https://cloud.githubusercontent.com/assets/5539202/7770222/5c3c97c0-008c-11e5-976e-3a2f8a8bd426.PNG

This are the LibreCrypt Container Properties after 'mounting': [image: mounted_details] https://cloud.githubusercontent.com/assets/5539202/7770989/2909a1f6-0094-11e5-9fbd-94211ab258f1.PNG

And this is the end of the cryptsetup-Style dump: Master Key

User supplied password : [omitted] Password unlocks key slot: 0 Recovered master key : 00000000 | 3F 3F 3F 3F 3F 3F 3F 3F | ???????? 00000008 | 3F 3F 3F 3F 3F 3F 3F 3F | ???????? 00000010 | 3F 3F 3F 3F 3F 3F 3F 3F | ???????? 00000018 | 3F 3F 3F 3F 3F B2 3F 3F | ?????.?? 00000020 | 00 00 00 00 00 00 00 00 | ........ 00000028 | 00 00 00 00 00 00 00 00 | ........ 00000030 | 00 00 00 00 00 00 00 00 | ........ 00000038 | 00 00 00 00 00 00 00 00 | ........

unfortunately this is not my luks master key :/

— Reply to this email directly or view it on GitHub https://github.com/t-d-k/LibreCrypt/issues/22.

erdii commented 9 years ago

the fs inside the container is a lvm volume group containing various volumes (the volume i want to access is ext4)

t-d-k commented 9 years ago

Do you have an ext4 driver installed?

t-d-k commented 9 years ago

One thing I forgot to mention in the release notes was that because the drivers have changed, you need to completely uninstall DoxBox before installing LibreCrypt. If this isn’t done, you could see the results you report. So to install:

If you haven’t installed this way, this could you please do this and retry.

thanks tdk

linux-modder commented 9 years ago

@erdi, can you show the layout for the lvm and confirming this is from windows ? as @tdk asked you have a ext4 driver installed for windows to recognize the linux ext4 format... also to @tdk just a functionality thought that should be handled in an update script.. I've been looking over the code (see my fork) and will consider merging once I get a viable script in place.

Corey W Sheldon Freelance IT Consultant, Multi-Discipline Tutor (p) 310.909.7672 G+: https://www.plus.google.com/+CoreySheldon LinkedIn: https://www.linkedin.com/profile/view?id=70127804 Github: https://www.github.com/linux-modder Facebook: https://www.facebook.com/corey.sheldon Several Communities on Stack Exchange https://www.stackexchange.com

http://www.facebook.com/1stclassmobileshine

Tutoring in person or via any of the following platforms: HackHands https://www.hackhands.com Wizpert https://www.wizperts.com FieldNation https://www.fieldnation.com AirPair https://www.airpair.com Truelancer http://www.truelancer.com

{PayPal,Google Wallet/Play store, Apple Pay}

pub 3072D/718BF597 http://pgp.mit.edu/pks/lookup?op=get&search=0xE958C5D6718BF597 2014-12-08 Key fingerprint = 2930 99EB 083D D332 0752 88C4 E958 C5D6 718B F597

uid Corey Sheldon (Fedora Key) sheldon.corey@gmail.com

On Sun, May 24, 2015 at 5:01 PM, tdk notifications@github.com wrote:

One thing I forgot to mention in the release notes was that because the drivers have changed, you need to completely uninstall DoxBox before installing LibreCrypt. If this isn’t done, you could see the results you report. So to install:

  • uninstall DoxBox
  • reboot
  • install LibreCrypt, rebooting when prompted.

If you haven’t installed this way, this could you please do this and retry.

thanks tdk

— Reply to this email directly or view it on GitHub https://github.com/t-d-k/LibreCrypt/issues/22#issuecomment-105061930.

erdii commented 9 years ago

@t-d-k Yes I have Ext2fsd installed That's how I upgraded to LibreCrypt, I will give it another try!

@linux-modder

/dev/mapper/luks-xxxxxxxxxxxxxxxxxx fedora lvm2 a-- 930,54g 64,00m

How should I confirm it from Windows when I havent opened the encrypted Partition containing it yet?

linux-modder commented 9 years ago

Duplicate of better documented issue

t-d-k commented 9 years ago

@linux-modder These two issues have different symptoms, @VasoVV gets an error message trying to open the container, while @erdii can open it but it's zero size. It's possible they have the same root cause but we don't know yet if they are duplicates. It's best to keep them separate so users/devs can report any further information without confusion. So, if it's OK I'll reopen this.

linux-modder commented 9 years ago

ADDING duplicate tag ONLY so its easier to see the similiar issues until determined if same cause

linux-modder commented 9 years ago

@erdii is this BEFORE OR AFTER fs is thrown on luks'ing or lvm'ing DOES NOT auto format the fs

t-d-k commented 9 years ago

@linux-modder you said you could test this. The issue could be that the LVM volume is inside the LUKS one. When LC opens a container it just gives the contents to Windows. Windows doesn't grok lvm so it shows an empty filesystem. LC should be able to read LUKS inside LVM volumes though because then its the LC driver reading lvm. So the ideal way to test this would be to have a luks-inside-lvm partition and a lvm-inside-luks partition both on a GPT disc. I'd expect the first to open OK but not the second. if so, then you should be able to be browse the second with ext2read. If neither can be opened we'll have to test something else, like the same on an MBR disc. cheers tdk

@erdii Could you please try browsing the virtual disc created by LibreCrypt when you open the container with ext2read.

erdii commented 9 years ago

10 Minutes please then I will try! But I'm not very confident since LC doesn't recognize my encryption master key so... anyway! I'll try it! be right back

EDIT: ext2read only show an empty window

ext2fs

linux-modder commented 9 years ago

@t-d-k I run the later by default on my systems will check with and without ext2read tonight / tomorrow am

t-d-k commented 9 years ago

I've done some more experimentation with this, and have been able to reproduce your problem. Creating an LVM volume inside a LUKs volume and opening it makes windows show a drive with zero size. This happens on both GPT and MBR discs.

For a LUKS partition inside an LVM volume, LC doesn't recognise it as LUKS and tries to open as dm-crypt or freeotfe type.

ext2read didn't work for me either, I experimented with a pure LVM removable disc (no LUks) and that got the same result. So this looks like ext2read doesn't work.

So I'm afraid it looks like LVM volumes can't be opened, simply because this isn't supported in Windows.

linux-modder commented 9 years ago

can either of you give pvdisplay and/or cryptsetup luksDump info B&A opening as the lvm should be of no effect if it opens. Are you laying down a fs inside the lvm as lacking this step would give a 0 size even on linux in the proper configurations

t-d-k commented 9 years ago

@linux-modder This happens even with no LUKs volume, just using LVM. Yes, there is a fs.