Silk Road forums

Discussion => Newbie discussion => Topic started by: surgerguy996 on September 22, 2013, 11:36 pm

Title: Guide to using GPG on a Mac:
Post by: surgerguy996 on September 22, 2013, 11:36 pm
Guide to using GPG on a Mac:

◍▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬◍

I will assume that you have already installed GPG and you have already created a Public/Private key pair. I will also assume you have found your vendor's public key block. For the most part, this tutorial addresses how to encrypt a message using a vendor's public key.

We will be using the mac's terminal in this tutorial.

Summary:
gpg -a -e -o encrypted_message.txt -r DEALERNAME -u YOURNAME secret_message.txt

◍▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬◍

◾ Part 1: To install GPG go to: https://gpgtools.org/

Scroll down past GPGMail and install GPGSuite.


_____

◾ Part 2: Creating Your first Private & Public key:

GUIDE: http://support.gpgtools.org/kb/how-to/first-steps-where-do-i-start-where-do-i-begin

Scroll down to the part labeled  "Create a New Key" and read the tutorial.

NOTE: Under "Full Name" put your Silk Road Username or Silk Road Alias.  Under E-Mail Address just put Username@username. There is no need to put an actual email address.


_____

◾ Part 3: Adding a vendor's PGP Public Key Block to your GPG Keychain Access:

Open up a terminal: (In your list of Applications, find the folder titled "Utilities" and click on Terminal.app. Alternatively you can just type "Terminal" into the Spotlight/Magnifying glass in the upper right of your screen.)

In the terminal, type "pico key.asc" without quotes and press enter. It should open up the Pico text editor. (if pico isn't working try nano).
Hit CMD + V to paste the vendor's public key into pico.
Hit Control + X to Exit.
Pico should say "Save modified buffer". hit the Y key for yes and then press enter to save.

Verify that you have created the file in the terminal; type "cat key.asc" without quotes into the terminal and then press enter.

Go to your GPG Keychain Access. You can get to it by typing it into your spotlight in the upper right of your screen. In the keychain, where you can click on "New" , "Import", and "Export", click on "Import." Find your key.asc file which will be saved in your home directory. (typing "pwd" into your terminal will let you know where you saved it) Or just type key.asc into the search and click open.

Your vendor's Public Key Block should be added to your keychain!

_____

◾ Part 4: Writing your message.

In a terminal type "pico secret_message.txt".
Type in your Mailing Address to your vendor.

Rightous, a seller of 25i-NBOMe suggests "Avoid saying things please do not put useless information such as "Please ship to:" or "United States of America" or anything that is already duh. These just cause me a lot of backspacing every day. It is acceptable however to leave me a brief love letter describing how awesome your previous experience with me was. I love those."
Reference: http://silkroadvb5piz3r.onion/silkroad/item/0f81d52be7

Hit Control + X to Exit the Pico Text Editor.
Pico should say "Save modified buffer". hit the Y key for yes and then press enter to save.

_____

◾ Part 5: Encrypting your Message with GPG:

In your terminal type the following but replace LunaC with the name of YOUR dealer and surgerguy996 (which is my name) with YOUR name.

gpg -a -e -o encrypted_message.txt -r LunaC -u surgerguy996 secret_message.txt
This will encrypt your message as encrypted_message.txt. Hit the "y" key if it prompts you with a warning.

Summary of switches:
-a = armor. Force print of ASCII characters only.. No non-printable characters.
-e = encrypt.
-o = name of output file.
-r = Intended Name of Recipient
-u = Your name (the one you assigned to your public key earlier)

Use "gpg --help" to get a listing of all commands and options.

_____
◾ Part 6: Read the encrypted message.

Type "cat encrypted_message.txt" into your terminal.
(Tip: For speed, you can just type "cat encry" and then just hit the TAB key and the rest of the filename will be filled out for you.)
You will get a PGP message like this but it will be a LOT longer.
 
-----BEGIN PGP MESSAGE-----
Version: GnuPG/MacGPG2 v2.0.19 (Darwin)
Comment: GPGTools - http://gpgtools.org

hQEMA5oW/wPjmiHdAQgAl27ZhbGYmb8B96jkDB+RNwIgFuXcdRCN6TYwpgUcbNWd
M0DMQV+jUxgxSPBaglQGMTDQ0lbqrhxYs+ft5FvB4CC4yaEShEmbfdKqmYlvfmVY
et7cdWheEJVmZWOPPhZ+yIPMN0nQ8DhQh3t54Gw/njm9BcO2QgeW8BZ8erF83yAb
XwNuZopCwY7OgMfiV/BKt7SwBga4lumvNZWiApsCpetJDeX27WS1pkRNXYJzN7FZ
HpGZavxsRqDAc2Hm+a3SQu2QVa4lt7Ac7lJDeunz1J4ZGm1H2uS+h2XtemHbRxlD
GP0bgCxMmHqTHadjM01dzeqboFUh61weElWeA5paXNJdARhzfyLH2Pg8bFDvN1f7
uoZgVTFbKq808RstGbCU2CsbKtOrZiIh9mF4fUd85pZC6J49gLgtO8FgPLnHqApJ
idd32C/xyUdW+KnRGpDqPW70ccV8MgJm9wE4oStK
=ogZs
-----END PGP MESSAGE-----
Title: Re: Guide to using GPG on a Mac:
Post by: cryngie on September 23, 2013, 12:03 am
Wow never seen anyone use terminal to use gpg each to their own I guess
Title: Re: Guide to using GPG on a Mac:
Post by: latexpods on September 23, 2013, 01:32 am
Yea...Mac users never fear, this guy has a system that works, but you don't have to do it that way. I just right click go to services and don't use terminal.

Thanks for the guide though, I didn't know about this. Neat.
Title: Re: Guide to using GPG on a Mac:
Post by: surgerguy996 on September 23, 2013, 02:48 am
Just thought I'd share my method with everyone :)
Title: Re: Guide to using GPG on a Mac:
Post by: Demacia on September 24, 2013, 03:25 am
Interesting method. Thanks for sharing.