Sunday, May 12, 2013

Have some fun with encryption and decryption

I just had some fun with gpg command on Windows. Basically when I first download and install from the Gpg4win site, the first thing I am going to do is to encrypt a file, called secret_file.txt. No! Wait! Before this can be done, gpg need to be setup first.

Do this: gpg --gen-key

A series of interview question, just answer them accordingly. No worry, just a very simple question, you should able to answer. After this, get ready to encrypt the file.

Sending out this command: gpg --encrypt --recipient secret_file.txt

This will generate an output file, called secret_file.txt.gpg. To decrypt the encrypted file, send this command:

gpg --output secret_file.txt --decrypt secret_file.txt.gpg


No comments: