How To: Encrypt/Decrypt File with OpenSSL

Encryption/Decryption

Encrypt/Decrypt File

When security and integrity of a file is critical, such as with x509 certificates or other important documents, OpenSSL or other variant can be used to secure the file. With strong encryption and -hopefully- a strong password.

OpenSSL is generally available on all UNIX variants, downloadable as an executable for Windows and is also used with many other applications through the LibCrypto library.

If you need help picking a strong password, I’d recommend StrongPasswordGenerator.Com. Never share the password with the receiving party over the same medium as the file transmission. Send it Out-Of-Band over a SMS or Telephone Call or similar.

In the following example, we take a file and encrypt it using AES-256-CBC, protecting it using a password and adding a salt for extra randomness. The output is added to a newly created file.

~$ openssl enc -salt -aes-256-cbc -in TuxPics.tgz -out TuxPics.tgz.enc
enter aes-256-cbc encryption password: q55Tc9Hp68-Ry4d
Verifying - enter aes-256-cbc encryption password: q55Tc9Hp68-Ry4d

The content of TuxFiles.tgz.enc is perceived as a random binary string to EVE when in transit on the open network.

In the next example, we do the reverse action. Decrypting the file using the same password and appending the output to a new file.

~$ openssl enc -aes-256-cbc -d -in TuxFiles.tgz.enc > TuxFiles.tgz
enter aes-256-cbc decryption password: q55Tc9Hp68-Ry4d

In case the file type is not known from the decrytion result (stdout), the “file” command can be used when running Linux.

Example:
~$ file TuxPics
TuxPics: gzip compressed data

Have fun!

How To: Play Classic MS-DOS Games in Ubuntu Linux


Ever wanted to play all of those classic MS-DOS games that you have on floppy in your old dusty drawer, but don’t have any retro MS-DOS computer? Don’t worry, you can play (almost) all of them in a emulated MS-DOS¬†environment. And the emulator is called ‘dosbox’, and it’s not only¬†available for Linux, Windows and Mac to! (among others)
Continue reading How To: Play Classic MS-DOS Games in Ubuntu Linux

Run Wine On Mac Without Compiling Anything

From time to time, you may need to run a Windows app or two on your Mac or Linux computer, almost all of the famous Windows apps can be run with Wine. However, you always have to compile the damn thing! But recently, I have found a package for Mac that includes the latest stable Wine binary, no compiling necessary! And the package is called “PlayOnMac”, it’s sort of a little brother of the much bigger package for Linux called “PlayOnLinux“.

You can download PlayOnMac by Clicking Here, Download and install it.

Now, i’ll show you how you can run a Windows executable with it. If it is and installation executable then you can simply double click it and the PlayOnMac wizard will pop up to help you. But our goal here is to run wine from the console, just as if you had compiled it.

  1. Launch PlayOnMac
  2. Click “Tools” on the top menu bar
  3. Click “PlayOnMac Console”

And there you go! Now all you have to do is change to your desired directory and type: wine “windows exe”

64-Bit Mozilla Firefox for Mac OS X

Minefield 64-bit

How long has it been? How long have we been waiting for a 64-bit Mozilla Firefox for mac? The Mozilla team and the community seem to have a problem with getting gecko 64-bit, but isn’t that already available for Linux and Windows? Come on!

And i have heard some rumors about there not being a great speed improvement with switching to 64-bit, i really hope that’s not true, we want a stable and fast Mozilla Firefox running on 64-bit, Don’t we?

What do you think?