Silk Road forums

Discussion => Security => Topic started by: MarcelKetman on October 10, 2012, 08:39 pm

Title: Help with Importing and Decrypting PGP keys on a Mac please!
Post by: MarcelKetman on October 10, 2012, 08:39 pm
Hi. I'm using GPG Keychain Access.

I can't import text files nor can I copy and paste the public key (despite reading on forums that you can).

Can anyone help??
Title: Re: Help with Importing and Decrypting PGP keys on a Mac please!
Post by: Nightcrawler on October 10, 2012, 10:17 pm
Hi. I'm using GPG Keychain Access.

I can't import text files nor can I copy and paste the public key (despite reading on forums that you can).

Can anyone help??

Marcel, if you've read any of the other posts, you would know that gpgtools is os x version dependent.

What version of os x are you running?  What version of gpgtools did you download and install?

Title: Re: Help with Importing and Decrypting PGP keys on a Mac please!
Post by: pine on October 10, 2012, 11:17 pm
Guru to the rescue!


IMPORTANT NOTES:

a) GPGTools is the software that implements Gnu Privacy Guard (GPG), an open-source PGP-equivalent software package for the Mac. Please see the GPGTools homepage. for more information: https://www.gpgtools.org/

b) Whether GPGTools works or not is highly OS-version-dependent -- in other words, it makes a significant difference if you're running Leopard (10.5.x), Snow Leopard (10.6.x), Lion  (10.7.x) or Mountain Lion (10.8).

The two most problematic releases are Leopard and Mountain Lion; Leopard, because it is too old, and Mountain Lion because it is too new.

c) You would have also discovered that the stock GPGTools installation does not work for everyone. Frequently, to acquire full functionality, one is required to download and install the latest nightly build from the GPGTools site. See: https://nightly.gpgtools.org/GPGTools_Installer-latest.dmg

After that, follow the instructions found in this post: http://dkn255hz262ypmii.onion/index.php?topic=32303.msg366929#msg366929

d) If you're running Leopard, then for all intents and purposes, you have little recourse bu to use the command-line, if you want to use GPG.
For instructions on how to do this, please see the following post:  http://dkn255hz262ypmii.onion/index.php?topic=35440.msg408632#msg408632

e) If you're running Mountain Lion, if the latest nightly build doesn't work, then I'm afraid you're mostly out of luck, unless you can get GPG working from the command line, as referenced by the instructions in item d), above. 

============================================================

Download and install GPGTools: http://nightly.gpgtools.org/GPGTools_Installer-trunk.dmg

Once you have installed GPGTools,  what you want to do is to go into System Preferences --> Keyboard --> Services.

Scroll down until you find the following entries. Be sure to put a check mark in the boxes to activate each keyboard
shortcut.

Keyboard shortcuts:

OpenPGP: Decrypt Selection:             Shift-Command-D

OpenPGP: Encrypt Selection:             Shift-Command-E

OpenPGP: Import Key from Selection:     Shift-Command-I

OpenPGP: Insert My Fingerprint:         Shift-Command-F

OpenPGP: Insert My Key:                 Shift-Command-K

OpenPGP: Sign Selection:                Shift-Command-R

OpenPGP: Verify Signature of Selection: Shift-Control-V

Remember, these shortcuts only operate on highlighted or selected text.

To select text within TextEdit, use Command-A to highlight the entire document, or use your mouse to selection the
section that you want to verify/sign/encrypt/decrypt. It is highly recommended that you use only plain-text, as
opposed to Rich Text (.rtf) format. Use Command-, to bring up Preferences and ensure that the plain text radio button
is checked.

Also ensure that the following are UNCHECKED in TextEdit preferences: smart quotes, smart dashes, smart links.

Once your text is highlighted in TextEdit, (by pressing Comand-A) you then encrypt using Shift-Command-E. You will
then be presented with a list of keys to encrypt to, that you have added to your PGP kryring

Other Commands You May Need:

OpenPGP: Decrypt File:                   Control-Command-D

OpenPGP: Encrypt File:                   Control-Command-E

OpenPGP: Sign File:                      Control-Command-S

OpenPGP: Verify Signature of File:       Control-Command-V

Naturally, you can change any of these shortcuts to ones of your own choosing, if you wish.


Once you have setup these shortcuts, you can begin using GPG.

To encrypt a message to someone using GPG, you first need a copy of the recipient's PGP public key. Many people put
a reference to where their PGP public key may be located in their .sig, for example:

Guru <Guru@SR>
PGP Key: http://dkn255hz262ypmii.onion/index.php?topic=174.msg234832#msg234832
PGP Key: http://qtt2yl5jocgrk7nu.onion/pks/lookup?op=get&search=0x523FCBEE886855CA
PGP Key Fingerprint: ADBE 8D80 5F5C 9CBA 9BDB 0F05 523F CBEE 8868 55CA

Once you have located someone's PGP public key, you should copy and paste it into TextEdit. Save the file to a file;
you can file the file, import.asc, for example. This saved file will usually be found in the Documents folder.

Launch GPG Keychain Access from the Applications folder. click on the Import icon in the upper left hand corner.
GPG Keychain Access will then prompt you for the name of the file which contains the key to import. It will usually
show you a list of files in the Documents folder. Click on the file named import.asc, and click ok. The PGP public
key will then be imported into your PGP keyring.

To encrypt a message to a person, the message must be contained in a TextEdit document. Use Command-A to hightlight
the entire document. Then use Shift-Command-E to encrypt. GPG will pop-up a list of public keys in your PGP keyring.
Each key will have a little checkbox beside it which you can check, to select that particular key. If you were
encrypting a message to me, you would put a check in the box beside my PGP key (Guru@SR). When you click on OK,
the plaintext (unencrypted) message in TextEdit will be replaced with the encrypted message. You can then copy and
paste the encrypted message to enter it into a form on Silk Road, or anywhere else that it needs to go.

To decrypt a message sent to you by other people, you need to copy that message to the clipboard, and paste it into
a TextEdit document. Again use Command-A to highlight all the encrypted message. Then use Shift-Command-D to decrypt
the message. If the message is encrypted to your PGP public key, you will be prompted to enter your passphrase. Once
the correct passphrase has been entered, and you click OK, then the message will be decrypted, and the decrypted text
will be placed in the TextEdit document, replacing the encrypted message that was there previously.
Title: Re: Help with Importing and Decrypting PGP keys on a Mac please!
Post by: MarcelKetman on October 11, 2012, 09:34 am
Thanks for that Pine.

I'm using Lion but am literally mid upgrade to Mountain Lion. I've got it figured out except I can use services from within text, ie, I can't highlight the text and decrypt from there. I can however save it as a text file and then do it so that's fine. I hope upgrading to Mountain Lion doesn't mess things up on me.

Thanks again.
Title: Re: Help with Importing and Decrypting PGP keys on a Mac please!
Post by: rightonion on October 11, 2012, 12:22 pm
Open text edit then click

TextEdit (top left)>> Services>>Services Preference

Scroll to the bottom and tick all the openPGP options and save.

Now when you highlight text in text edit you can right click >services>encrypt/decrypt

Hope that is what you wanted and works for you. If not let me know

You may well be receiving an order from me soon. Your K sounds very interesting :)

Right
Title: Re: Help with Importing and Decrypting PGP keys on a Mac please!
Post by: MarcelKetman on October 18, 2012, 08:08 pm
Open text edit then click

TextEdit (top left)>> Services>>Services Preference

Scroll to the bottom and tick all the openPGP options and save.

Now when you highlight text in text edit you can right click >services>encrypt/decrypt

Hope that is what you wanted and works for you. If not let me know

You may well be receiving an order from me soon. Your K sounds very interesting :)

Right

Cheers bro! Looking forward to doing business with you.
Title: Re: Help with Importing and Decrypting PGP keys on a Mac please!
Post by: rightonion on October 19, 2012, 08:46 am
No worries mate
Title: Re: Help with Importing and Decrypting PGP keys on a Mac please!
Post by: pine on October 23, 2012, 03:28 am
Thanks for that Pine.

I'm using Lion but am literally mid upgrade to Mountain Lion. I've got it figured out except I can use services from within text, ie, I can't highlight the text and decrypt from there. I can however save it as a text file and then do it so that's fine. I hope upgrading to Mountain Lion doesn't mess things up on me.

Thanks again.

FYI: I'm fairly sure that Mountain Lion doesn't support GPGTools. Sucks balls. Best stick with Lion.
Title: Re: Help with Importing and Decrypting PGP keys on a Mac please!
Post by: oticetnom on October 23, 2012, 07:10 am
Thanks for that Pine.

I'm using Lion but am literally mid upgrade to Mountain Lion. I've got it figured out except I can use services from within text, ie, I can't highlight the text and decrypt from there. I can however save it as a text file and then do it so that's fine. I hope upgrading to Mountain Lion doesn't mess things up on me.

Thanks again.
im running mac 10.5.8 and dont' have the services menu. Is there any way around this? Thanks! Any help is greatly appreciated
FYI: I'm fairly sure that Mountain Lion doesn't support GPGTools. Sucks balls. Best stick with Lion.
Title: Re: Help with Importing and Decrypting PGP keys on a Mac please!
Post by: Nightcrawler on October 23, 2012, 10:12 am
Thanks for that Pine.

I'm using Lion but am literally mid upgrade to Mountain Lion. I've got it figured out except I can use services from within text, ie, I can't highlight the text and decrypt from there. I can however save it as a text file and then do it so that's fine. I hope upgrading to Mountain Lion doesn't mess things up on me.

Thanks again.
im running mac 10.5.8 and dont' have the services menu. Is there any way around this? Thanks! Any help is greatly appreciated
FYI: I'm fairly sure that Mountain Lion doesn't support GPGTools. Sucks balls. Best stick with Lion.

If you're running Leopard (10.5.8) your only real option is the command-line.  There have been several posts on how to use the  command-line effectively.

Title: Re: Help with Importing and Decrypting PGP keys on a Mac please!
Post by: oticetnom on October 23, 2012, 06:30 pm
Thanks for that Pine.

I'm using Lion but am literally mid upgrade to Mountain Lion. I've got it figured out except I can use services from within text, ie, I can't highlight the text and decrypt from there. I can however save it as a text file and then do it so that's fine. I hope upgrading to Mountain Lion doesn't mess things up on me.

Thanks again.
im running mac 10.5.8 and dont' have the services menu. Is there any way around this? Thanks! Any help is greatly appreciated
FYI: I'm fairly sure that Mountain Lion doesn't support GPGTools. Sucks balls. Best stick with Lion.

If you're running Leopard (10.5.8) your only real option is the command-line.  There have been several posts on how to use the  command-line effectively.
oh cool thanks! I'll look into it some more. Couldn't find a very organized thread.
Title: Re: Help with Importing and Decrypting PGP keys on a Mac please!
Post by: telepathicluv on November 02, 2012, 01:17 am
I am following all of the directions to decrypt a message in textedit, but every time I do, I get  a message that says decrypt failed! error code = 0.  I have the latest updates from gpg tools and I have been successful in sending encrypted messages, just not decrypting. any advice?
Title: Re: Help with Importing and Decrypting PGP keys on a Mac please!
Post by: Nightcrawler on November 02, 2012, 04:33 am
I am following all of the directions to decrypt a message in textedit, but every time I do, I get  a message that says decrypt failed! error code = 0.  I have the latest updates from gpg tools and I have been successful in sending encrypted messages, just not decrypting. any advice?

The only thing offhand that I can think of, is perhaps you have not set TextEdit to use plain-text, instead of .rtf format?

Also, when you copy and paste into TextEdit, use Command-A to select all the text so everything is copied to the clipboard; use Command-C to copy from the clipboard to TextEdit.
If messages are not properly copied, i.e. if any of the 5 dashes in the -----BEGIN PGP MESSAGE----- or -----END PGP MESSAGE----- is missing, it will cause gpg to throw an error message.

If all else fails, then you may have to resort to the command-line. I realize that this will suck from your perspective, but you may have little other option to decrypt your messages.

What you want to do is first, when you paste the message into TextEdit, save it as a file, usually under Documents.  For the purposes of example, let's call the file decrypt.txt

Then open up a Terminal, by: Finder --> Services --> Terminal.

You will then find yourself at a command prompt.

Switch to the Documents folder by issuing the following command: cd Documents

N.B. commands in Unix operating systems are case-sensitive.

Decrypt by using the following command: gpg --decrypt decrypt.txt >decrypted_file

You will be prompted for your passphrase, after which the decrypted message will be found in the Documents folder under decrypted_file.