GnuPG and PGP
Ever want to email userids and passwords to colleagues and friends but are afraid of
sending it using standard email?
How about encrypting the message?
I currently use Pgp or GnuPG for encrypting text messages,
and as youll see below is a very simple way of keeping encrypted
files on your desktop.
First youll need to download the latest PGP / GnuPG version for your platform.
http://www.pgpi.org/products/pgp/versions/freeware/
The latest PGP versions are 30 day demos, GnuPG is freeware.
We will start with Gnupg . Gnupg is pretty much standard on any
linux distro, so youll have no problem installing it.
For Windows users , download the latest from:
http://www.pgpi.org/cgi/download.cgi?filename=gnupg-w32cli-1.2.2.zip
Unzip the archive and copy gpg.exe,gpgkeys_ldap.exe and gpgv.exe to
your %WINDOWS\system32 directory
This way you can open a DOS window and type "gpg"
Now for a quickie run down on how to use gpg.
First on how to SETUP and generate a key.
1) gpg --gen-key ** Generate a KEY **
simple to use, will give you a few options but works great - I normally choose RSA/ 2048 Bit
keysize.
2) gpg --output revoke.asc --gen-revoke user@email.com ** Revoke a KEY **
Revoke your ex buddies key
Publishing your KEY - this way folks can find you.
1) gpg --keyserver pgp.mit.edu --send-key youruserid@yourdomain.com
2) gpg --keyserver pgp.mit.edu --recv-keys 3634EDF8A
lookup ID's at Keyserver.net , find your friends key and upload to your keyring.
Administrivia
LISTING KEYS ----------------------
1) gpg --list-keys
** listing the public keys in your keychain
EXPORTING KEYS --------------------
2) gpg --output carlos.gpg --export userid@yourbuddieskey.com
carlos.gpg : CREATE binary mode key
3) gpg --output friend.gpg --export friend@hotmail.com
friend.gpg : CREATE binary mode key
4) gpg --armor --export userid@key.com
is ascii mode to Standard output : pipe to file.asc
This key can be emailed to colleagues
IMPORTING KEYS ------------------
5) gpg --import friendblake.gpg ** import your friends key **
**** after looking up recipient****
eg:
6) gpg --keyserver pgp.mit.edu --recv-keys 0x5F70881D
7) gpg --edit-key blake@cyb.org ** validate your friends key
Commandfpr
Commandsign ** if ok and validated
Encrypting /Decrypting Documents
ENCRYPTING
1) gpg --output doc.gpg --encrypt --recipient blake@cyb.org doc.txt
will encrypt doc.txt and product a binary file doc.gpg
2) gpg --armor --output doc.txt.asc --encrypt --recipient blake@cyb.org doc.txt
will encrypt doc.txt and product an ASCII file doc.txt.asc
DECRYPTING
3) gpg --output doc.txt --decrypt doc.gpg
will decrypt doc.gpg