Wednesday, April 8, 2009

Encrypting your files

GnuPG GNU privacy guard is pretty good tool for a securing data. It has many powerful features, however this tip is on the stand alone encryption on a particular file with a passcode. This can come in handy if you have to encrypt your private documents. GnuPG can be download from

On Terminal a simple demo explanation follows

To encrypt the file wget-log

To decrypt my wget-log file


One of the feature of gpg is to encrypt and decrypt files, from the example above we have seen an option -c which means to encrypt with a symmetric cipher using a passphrase. The default symmetric cipher used is CAST5, but any algorithm may be chosen with the --cipher-algo option. CAST5 is a block cipher algorithm,  there are lots to know about the internals.

The issue of the gpg with the parameter -c and filename it asks you for a secret key or passphrase which when entered is not echoed on the screen. Enter it twice for cross checking, once successfully done wget-log file would be encrypted to wget-log.gpg .

In order to decrypt the file just call gpg with the file name to decrypt and its done only if you give the correct passphrase.

There are other way to do the same thing using gpg ,those are options -e and -d .. well its better to keep things simple for time being .. : )

Next time, if you want to share a private email / document / picture / what not with your spouse or other family members, i hope you got the right tool.

No comments :

Post a Comment