GPG Quick Guide

I have many friends who are having a few Issues getting the grips of GPG and public key encryption so I decided to make a quick post to cover the basics.

Firstly a video to explain the concept of public key encryption

diffie-hellman key exchange

A good way to learn is the command line as It requires no front end software and is installed on nearly every linux system by default . The command line? No, it’s not hard as long as you have a basic understanding of how asymmetric cryptography works (i.e. you’ve at least read the wikipedia page), and are comfortable on the command line in the first place. It’s even easier with a helper program like Kgpg or GnuPG. Here are some helpful hints if you want to give the command line version a shot (note this is for linux):

Windows users can check out http://gpg4win.org/

#to create a new key
gpg –gen-key

#to encrypt a message
gpg –recipient recipient –armor –encrypt file

#to decrypt a message
gpg –decrypt file

#to export public key (ascii)
gpg –armor –export name

#to export public key (ascii) to file
gpg –armor –output file –export name

#list public keys
gpg –list-keys

#import a public key
gpg –import file

A good guide can be found in the Ubuntu community documentation

https://help.ubuntu.com/community/GnuPrivacyGuardHowto

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s