How to Decrypt a Windows folder in Ubuntu

11,047

Solution 1

From wikipedia:

Files encrypted with EFS can only be decrypted by using the RSA private key(s) matching the previously-used public key(s). The stored copy of the user's private key is ultimately protected by the user's logon password. Accessing encrypted files from outside Windows with other operating systems (Linux, for example) is not possible — not least of which because there is currently no third party EFS component driver.

EFS - Encrypting File System - is native to Windows & Microsoft. Microsoft have not released this as opensource - and no-one (as yet) has clean reversed engineered this.

I'm afraid - the only way you will be to decrypt a windows 7 file and folder encrypted using native windows encryption is via windows itself.

Solution 2

Depends on what you encrypted the file with. LUKS, truecrypt, and gpg are all cross platform.

Truecrypt

Truecrypt home page

Ubuntu wiki TrueCrypt

enter image description here

LUKS

Windows - freeotfe

Ubuntu - To set up an encrypted partition in Ubuntu, using /dev/sda4 as an example,

sudo cryptsetup -h sha256 -c aes-cbc-essiv:sha256 -s 256 luksFormat /dev/hda5
sudo cryptsetup luksOpen /dev/hda5 crypt
mkfs.ext4 -m 0 /dev/mapper/crypt

Edit /etc/crypttab

# graphical
gksu gedit /etc/crypttab

#command line
sudo -e /etc/crypttab

Add a line for your crypt

crypt  /dev/hda4  none  luks,timeout=30

Now configure /etc/fstab

# graphical
gksu gedit /etc/fstab

#command line
sudo -e /etc/fstab

Again, add a line for your crypt in /etc/fstab

/dev/mapper/crypt  /media/crypt  ext4  user,noauto  0  2

Make a mount point

mkdir /media/crypt

Now you can mount it with

mount /media/crypt

GPG

GPG will run on both windows and Ubuntu

Encrypt

gpg -c file

Note: the gpg -c file command only encrypts the file, it does not delete the original source file, so you may need to (secure) delete it.

Decrypt

gpg file.gpg

For windows try gpg4win

Share:
11,047

Related videos on Youtube

Eduard Luca
Author by

Eduard Luca

A Python developer for a Romanian company, a keen StackOverflow-er and an addicted WoW player.

Updated on September 18, 2022

Comments

  • Eduard Luca
    Eduard Luca over 1 year

    [Question brought here from the security section]

    Is there any easy way I can decrypt a folder that has been encrypted with Windows 7? I am using Ubuntu 11.10 to decrypt the folder.

  • Eduard Luca
    Eduard Luca over 12 years
    I am not sure what program/algorithm Windows 7 is using (built-in) to encrypt files. I've tried the 3 programs you suggested but all gave me permission denied error.
  • Panther
    Panther over 12 years
    If you used the default windows encryption algorithm, I do not know a way to decrypt the file(s). As far as I know, you need to boot windows, decrypt the file(s) and use a cross-platform options. Perhaps someone else will know a better solution.