How to use GNU Privacy Guard (GPG) – Encrypt, Decrypt, Sign and Verifying identities

GPG or the GNU Privacy Guard is a free and open source software that implements OpenPGP public-key cryptography message format (RFC4880). You can use GPG to encrypt, decrypt, sign and verify files or emails. To use GPG, you need to generate the public-key/private-key pairs in your computer by running this command, and choose the default option


gpg --gen-key

The application will ask you to enter your ID and passphrase, make sure you choose a strong passphrase to guarantee the safety and security of your keys.

Encrypting and Decrypting Files
You can use GPG to encrypt files, it can be only decrypted by those who have your public-key. The command that can be used to encrypt file is :

gpg --out encrypted_file.txt --encrypt original_file.txt

Run this command to decrypt. Files encrypted with private key can only be decrypted with public key and vice-versa.

gpg --out decrypted.txt --decrypt encrypted_file.txt

Signing Email or body of texts
Alternatively, you can chose to sign emails/texts instead of encrypting them. Signing files is a way to ensure that the message/texts/emails are from the right sender and its content has not been tempered with. You can run this command to sign email or texts :

gpg --clearsign original_text.txt

This will produce a signature file which content the original text with PGP signature embedded at the bottom of the message.

To verify it (assuming you have the public key), you need to run this command:

gpg --verify original_text.txt.asc

Continue reading “How to use GNU Privacy Guard (GPG) – Encrypt, Decrypt, Sign and Verifying identities”

Ubuntu 10.04 fix for USB Drive not mounting on pc with Floppy Drive

Here’s a quick fix for an Ubuntu 10.04 bug that prevents USB Drive from mounting on a PC with Floppy drive (wow, these things still exist?)

The solution is to remove the floppy drive module from linux kernel and you will be able to mount usb drive.
sudo modprobe -r floppy

Should you ever need the module again, you can issue
sudo modprobe floppy
to load the module back (alongside with the annoying bug).

Hope this will help!

p/s: To be fair, my office Dell Optiplex machine (with Pentium 4 HT 2.80GHz, 2005 issue) still has those floppy drives, although I haven’t use them ever since they assigned it to me (back in 2008).

Ubuntu 11.04 Natty Narwhal Release Schedule has been announced!

The next year Ubuntu Release Schedule for Natty Narwhal (11.04) has been announced! According to the schedule, Natty Narwhal Alpha will be released just after Maverick Meerkat (10.10) will be out in October!

Here are the release schedule:

  • 4 November 2010 – Alpha 1 Released
  • December 2, 2010 – Alpha 2 Released
  • January 6, 2011 – Alpha 3 Released
  • February 3, 2011 – Alpha 4 Released
  • March 3, 2011 – Alpha 5 Released
  • March 31, 2011 – Beta Release
  • 21 April 2011 – Release Candidate
  • 28 April 2011 Final release – Ubuntu 11.04