Never Ending Security

It starts all here

Basic guide to PGP on Linux

Part 1 – Installing the software

We’ll be using GnuPG with Gnu Privacy Assistant.

  1. Open up Terminal
  2. Type, without quotes, ‘sudo apt-get install gpa gnupg2′, then hit ‘enter’
  3. Enter your password, hit ‘enter’
  4. It will pull the dependancies needed for both to work properly, tell you the space needed, and ask you to confirm. Type ‘y’ then hit ‘enter’ to confirm
  5. Wait a bit as everything installs

This should only take a few minutes to complete. See this picture to confirm you’re doing the steps correctly:


Part 2 – Generating your keypair

Part 1 was easy, eh? Don’t worry things don’t get much harder. The next step is to create your keypair. We’ll be using 4096 bit RSA to keep things extra secure!

  1. In your Terminal, type without quotes ‘gpg –gen-key’, then hit ‘enter’
  2. It will ask you what kind of key you want. For our usecase, we want option ‘1’ :2
  3. Next step is key length. The longer the length, the more secure it is. We’ll go with 4096 bits:33FN8mb[1]
  4. It will now ask if you want your key to expire after a certain amount of time. This is up to personal preference, but we’ll choose ‘key does not expire’, so just hit ‘enter’3
  5. Confirm that yes, the key will not expire. Type ‘y’, then hit ‘enter’eGqruqQ[1]
  6. The next step will be to enter an ID to make it easier for people to identify your key. If you’ve made it this far, you should know what to doLgkPV7n[1]
  7. It will ask if this information is correct. If it is, type ‘O’ and hit ‘enter’xxdJ8g4[1]
    Here is a great XKCD comic on creating secure passphrases
  8. Enter a passphrase to protect your secret key.ZKXIiPW[1]
  9. Here comes the fun part. It’s going to generate your key, and will ask you to do some random stuff to create entropy. I like to have a Youtube video going with a torrent running in the background, while randomly mashing keys in a text editor. See the picture for an example of what will be output in the terminalbshPVDM[1]
  10. annnddddd we’re done!QFynRxp[1]

Part 3 – Obtaining your public key

So we’ve installed the software, generated our super secure keypair. Now what? Well if you want to actually use it we need to obtain our public key. Everything from here will be done through the graphical front-end.

  1. Open Terminal, type ‘sudo gpa’, hit ‘enter’. Type in your passwordyeahIknowwhatyou’rethinking
  2. You’ll be greeted by this beautiful windoweNSqF34[1]
  3. Click on the keypair you just created, click ‘Keys’ up at the top, then ‘Export keys…’reYpsUv[1]
  4. Select where you want it saved, enter a filename, and click ‘Save’
  5. Browse to the location in your file manager, open up that file with a text editor

There’s your public key! Don’t forget to put this on your market profile so people can contact you easier.

Part 4 – Obtaining your private key

If you ever want to switch operating systems or PGP programs, you’ll need to do this. It’s just as easy as obtaining your public key. Make sure you keep this file safe!

  1. Hopefully you still have GPA open. If not, follow step #1 of Part 3
  2. Click on your keypair, click ‘Keys’ up at the top then ‘Backup’reYpsUv[1]
  3. Select where you want it saved, keep the filename it gives you, and click ‘Save’
  4. A window will pop up, you can back up to a floppy if you’re stuck in the ’80sucMIWk6[1]

Remember to keep this file safe! Don’t forget your passphrase!

Part 5 – Importing a public key

So you want to buy some dank marijuanas, you’ll need to encrypt your message unless you want LE kicking down your door and putting a boot to your throat. How is this done? Easy!

  1. Obtain the recipients public key, which can hopefully be found on their profile
  2. Copy everything, paste into a text editor, save it somewhere
  3. Up at the top, click ‘Keys’, then ‘Import key…’reYpsUv[1]
  4. Select the key, then click ‘Open’. You’ll see this windowQKWYuU5[1]
  5. We’re done!yFoD0X4[1]

I used some random key found on DDG. Thanks Alan!

Part 6 – Importing a private key

You finally realized that Microsoft/Apple is spying on you, and want to switch to an operating system that respects your right to privacy. How do you bring your key over?

  1. Up at the top, select ‘Keys’, then ‘Import Keys…’DT815bw[1]
  2. Select your backup, it should have a file extension of .asc
  3. This window will appearq96G5m8[1]
  4. Your key is now imported

I could do this blindfolded!

Part 7 – Encrypting a message

GPA makes this easy as pie. Seriously, if you still can’t do it after following the below steps you shouldn’t be here.

  1. Click ‘Windows’ at the top, then ‘Clipboard’Rxffusl[1]
  2. This beautiful window will appearBLjxPd0[1]
  3. Type in your message56KECk8[1]
  4. Click the envelope with the blue key
  5. Select the recipient of the message, sign it with your key if you want, then click ‘Ok’VGhlx8M[1]
  6. Your encrypted message will now appear in the buffer. Copy everything and send this to the recipientURp5e5a[1]

Part 8 – Decrypting a message

You sent your message, and the vendor responded! Now what? You’ll want to decrypt the message with your public key.

  1. Copy everything the vendor sent you, paste it into the bufferSMpYD1U[1]
  2. Click the envelope at the top with the yellow key
  3. Enter your passphraseIki22bD[1]
  4. Read your messageUyOiGI1[1]

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your 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