20 September 2007

Encrypting Files on Linux with A Password Using Mcrypt

We're going to do this using the CLI, but believe me, it's going to be really easy. :-)

I've got this Dirty porn video.mp4 file that I do not want people to find out about, so I'm gonna encrypt it using mcrypt. Lol.

This is what you do:

1. Open a terminal window.

2. Key in mcrypt -u -a rijndael-256 -h whirlpool "Dirty porn video.mp4" and hit enter. Note that I've put the filename in quotes, as it contains spaces, in this case. For a filename that has no spaces, the quotes will not be necessary. Also, the -u switch is used to delete the original file. Do not use it if you want to keep your original file.

3. Enter the passphrase (password). You are required to confirm the password.

A file, Dirty porn video.mp4.nc has been created. That's it. You've just encoded a dirty porn file with the Rijndael-256 (AES) algorithm. :-)

To decrypt this file, issue the following command in a terminal window:

mcrypt -d "Dirty porn video.mp4.nc"

6 comments:

unwesen said...

So you have dirty porn videos?

Sorry, I just had to do that...

Or, you could use gpg to do the same: gpg -c --cipher-algo aes256 foo.txt

Wei-Yee Chan said...

Yep, in fact, that "porn file" is on YouTube. :p


 http://www.youtube.com/watch?v=bmuK3VwxURg

 

unwesen said...

Gah, that's really dirty!

Wei-Yee Chan said...

Yea right. :p Lol

unwesen said...

Well, there's lots of sand in the video. And when I used to come into the house after playing outside as a kid, my mum would call all that sand dirt. Therefore the video is extremely dirty ^^

Wei-Yee Chan said...

Grrrrr.....