Page 1 of 3

Need to Encrypt a folder

Posted: Sat May 22, 2021 8:16 am
by GlockdocVegas
I recently added a 2nd drive, formatted my 1st drive and planned on using it as a back up of sorts for pics, documents, etc.

Started transferring the files from the USB stick I currently use, clicked on the 1st folder, and INSTANTLY realized it needs to be password protected if I am going to leave it on a computer others can use.

I have been searching and playing around for the last hour or so and can't come up with an EASY to use program. Zulucrypt sucks. The only thing i could find that looks viable you have to add a ppa to download so that's out. 1 programs last update was debian 9, the other was 6 years ago. I don't want to use the command line.

Another user had a novel solution of adding another user, assigning ownership of the folder to that user, and using a different password. So far that seems the most viable alternative.

I looked at creating a small encrypted partition on the drive and storing the files there, but that seems like kind of a pain in the a**.

Anybody using anything with a simple, easy to use GUI that would just allow me to enter the password to get into that folder?

Thanks in advance.

Re: Need to Encrypt a folder

Posted: Sat May 22, 2021 8:55 am
by AK-47
If all you want to do is stop a bit of family espionage from 5 year olds, or errors, setting user permissions is fine. Otherwise, encrypted drive is the way.

After creating your partition using a tool such as GParted (let's say it's /dev/sdb1) use: sudo cryptsetup luksFormat /dev/sdb1
The program will prompt you for a password in the terminal.

I recall Thunar will ask for a password if it finds the drive is encrypted, but it's been a while since I moved to KDE Plasma.

Re: Need to Encrypt a folder  [Solved]

Posted: Sat May 22, 2021 9:24 am
by Huckleberry Finn
Veracrypt .
_________________

.. Or .. (when p7zip-full is installed): Right-click on folder: "Archive" with .7z (click "advanced" => assign a password) ... then delete the original folder..

(Consequently, use the archive as an aes-256 encrypted folder)

Re: Need to Encrypt a folder

Posted: Sat May 22, 2021 9:41 am
by entropyfoe
I second the Huckleberry Finn answer.

I have some folders which I give an misleading name and then zip it with a password. Not military grade but sufficient for many things.

Re: Need to Encrypt a folder

Posted: Sat May 22, 2021 9:47 am
by Huckleberry Finn
Just as a note: Say "those others" know a bit about these things and can scan your drive ..

Then the deleted original folder will be able to be rescued (say photorec, testdisk) ..

So (in serious cases) it needs to be overwritten with zeros or random (and that's also simple with dd etc..)

(Same for aescrypt users for files)

Re: Need to Encrypt a folder

Posted: Sat May 22, 2021 10:57 am
by GlockdocVegas
So it looks like the answer to my question is a resounding "NO!!" LOL.

Veracrypt I will have to study and play with some more. All it did was create a file I can't open. the .7z archive route was cumbersome, but accomplished what I need.

I haven't added a user yet, but it seems that is still going to be the simplest after it gets set up. Just enter the pw and go.

Thanks all.

Re: Need to Encrypt a folder

Posted: Sat May 22, 2021 1:17 pm
by Huckleberry Finn
In fact, aescrypt may be what you need, but that's for files. So, you need to select all files within folder each time, or again first compress the folder to make it a single file (no pw. and any format, zip etc..)

Veracrypt is really so handy (and so strong) once you get used to (or understand how it works).

Shortly, you can create "containers" first (a virtual drive as if formatted to say ext4 etc.), then you can rename, delete, send, copy, move, change pw. / key files .. Add new files or take some out (like a directory or archive) ...

All you need to do is first create a container once, then the rest is fun. (It can be very small or big.. say 30 MB will do the job) ..

Meanwhile I, too do the "misleading name" trick :) I especially give names that sounds like system-related files: systemd , sysvinit, even system32.dll :biggrin:

Meanwhile, since they're "so called" drives, you just "mount" them with Veracrypt, then unmount again within Veracrypt and close (but not using the file manager etc..)

Re: Need to Encrypt a folder

Posted: Sun May 23, 2021 12:56 am
by dyfi
Ccrypt will recursively encrypt folder contents.

Re: Need to Encrypt a folder

Posted: Sun May 23, 2021 8:58 am
by Stuart_M
I have been using VeraCrypt for years and it has performed flawlessly. It is a solid encryption program that has been independently audited. I can't emphasize that enough.

It can encrypt a partition (e.g. an entire USB Flash Drive) or make a container (file) on a partition. The encrypted container (file) has a minimum size depending on the file type (FAT is 292 KB, exFAT is 424 KB, NTFS is 3792 KB, etc.). The encrypted file can be treated like any other file - it can be deleted, moved, copied, re-named, etc. To open (or decrypt) the partition or file, just open VeraCrypt, enter the password, and mount it.

Once the VeraCrypt partition or file is decrypted, it will appear as a "disk" that you can store files and folders in just like any disk or directory.
GlockdocVegas wrote: Sat May 22, 2021 10:57 am Veracrypt I will have to study and play with some more. All it did was create a file I can't open.
I think a VeraCrypt tutorial from a YouTube video would show why the "All it did was create a file I can't open." problem occured.

While there are many good VeraCrypt YouTube tutorials, I recommend this https://youtu.be/cFipj_GOWjU?t=166 because he shows how to use it in Linux, although using it in Windows will be essentially the same. The above link will open at the 2:46 time mark because that is where he opens VeraCrypt (the part prior is him downloading it - we have it in the Stable repository in MXPI). The video has an English closed caption in case you need a clear interpretation.

Re: Need to Encrypt a folder

Posted: Sun May 23, 2021 10:12 am
by Huckleberry Finn
Meanwhile, this guy wrote almost what I was thinking to write, it may be useful for everyone who reads these later or searches about Veracrypt:

The below are quoted from the comment of youtube member "Perhaps" (on the same link above) :


" Regarding keyfiles:

Although you can use VeraCrypt to create keyfiles, you also have the option to use any file on your computer as a keyfile, too.

Although having a complicated keyfile (the type that VeraCrypt would create) is theoretically better, the goal of using a keyfile is that if an attacker does not know that you are using a keyfile, then he cannot brute force his way in to your encrypted volume. In other words, you can use a keyfile with only the letter "x" in it. But if no one knows that you used that file for your volume, then they will never be able to break in to your encrypted volume.

Also, although you can use any file as a keyfile, do not use any files that comes with Windows, or any file that comes with an installed program. This is because if an update changes or deletes the file, then you are screwed. Only use a file that you know will never change.

You can use multiple files.

VeraCrypt has a limit on how much of a file it will use towards unlocking your encrypted volume (I think it is the first 1024 bytes). So if you use, for example, a .mp4 video as a keyfile (and you can -- it will work), only the first 1024 (or something like that) characters will be used by VeraCrypt. This is fine. But just do not think that a huge keyfile will make a huge difference. "

__________________________________________

Huck: ... Therefore, when using media files you can rename but just don't make any changes in exif / metadata (artist, album, comment etc.), they won't be recognized as the keyfile ..