PGP is important to know for those who like to engage in potentially illegal activites, erhmm, online. I'll try to make this as simple and easy as possible to understand. Mods, please consider NOT moving this to the security subforum, if you must, I understand... but this is important information for a not insignificant number of members on this site.
What is PGP? PGP stands for "Pretty good Privacy", it is a cryptography standard used to communicate securely without the need to exchange a secret password. It can also be used to authenticate communications between individuals. It is secure, and currently adequate protection for highly sensitive information.
Why use PGP? Using PGP eliminates the possibility of a third party eavesdropping on your conversations, including the NSA. You can speak to other PGP users with complete freedom from the fear of prosecution or arrest. If you get into trouble with the law all of your communications will be absolutely useless to prosecutors, they will only see scrambled text.
How does PGP work? Instead of using one password to encrypt and decrypt files, PGP generates two keys, one being your
private key, which only you should have, and the other being a
public key, a key which is public and is needed by anyone that wants to send encrypted data to you. If someone encrypts a file using your publicly available key, it can
only be decrypted by your private key, which no one else should have access to but you. It does this using
trapdoor functions and operates on the
P vs NP problem.
How difficult is it to use? Not that difficult, anyone capable of posting on this site will not have a problem if they follow this guide. Commands lines can be scary to non techies, just roll with it... it's not rocket surgery.
On Absolute File Paths If you need to find the absolute path of a file follow these instructions:
MAC Just drag the file you want the path of into terminal, terminal will echo the absolute file path. Copy it and store it in a temporary text file for further reference.
Windows (Vista, 7, 8) Hold down Shift and right click on the file you want the path of, click "Copy as Path". Your file's path is now stored in your clipboard, save it to a text file for further reference.
Getting Started Step one: Download GnuPG
WindowsMacAndroidInstall it.
Creating your private and public key Open the program "GPG Keychain Access" you previously downloaded.
Click on the button "New"

Enter in a fake name. Do not use your real name. Do not enter your real email. Change the keylength field to to 4096.

Enter in a secure password, it should be random and look something like this: #jP0_5*d@ejNk^8Mn!_&Is. Save this password in a secure place, do not type it online, ever, and do not share it with anyone.
Now, your "GPG Keychain Access" program should look something like this:

Note the left column designations. Across from the account you created it will say "sec/pub" meaning you have both the secret and public keys for this account. Notice the default contact labeled "GPG Tools Team", it is only designated "pub" as you only have this account's public key. You can encrypt information with this public key, but you can't decrypt it as you don't have the private key.
Next, on the right you can see the column labeled "Short ID", this column will be extremely important later.
Ok, so now you have a public and private key pair. How do you share/obtain your public key?
Right click on the key pair you have just created and click "Export":

Name the file whatever you want, I usually just keep it as a default ID, but make sure you have the ASCII option selected:

Now you have a text file somewhere labeled (whatever you chose).asc. ASC files contain plain text. The one I created for this example looks like this when opened with TextEditor:
Code:
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: GPGTools - https://gpgtools.org
mQINBFUt2CgBEADFjZuR//qpsZhj1h2oYL1SChe6QiESAmClSsC+Ws9cJ+XHar0o
zDl8112BIY4bDzjcyxfAVzY60+GUxgpQFiAWdFF2tPtP2U/4dbdv8HwztGGQOd60
cveKCM2aotAhnajLGX/CS/XWNnru9rc2axuCjbobwF3C38ucplZXfUEGaUa9nsXG
sC9x+aAFdyhw7TIZcwE/j0AxIEa3MD/8R0aRYaJMKxFku2N0sZNt1dY0GCh5ybhG
mOGmHxecD7q4pQUuVEoNzKiAst4Gl8PwLlYOVIgG1CL0lBQGmc74FEeYmtJUBpFu
G4/LWqyImnYZbHte6+U5NS8JJGNosclNx8RhsXp6LkGipFywYT2cR5ALqXL6PTXI
0FbAk2Nz+dL9a1YzVM57eIAiXqhXCa4BW5eE5wtggG9lhq/Lx3nk0TSOsJsZPpv3
bUsSReZHkKQvv5mIIlpt20umxF/9thW9+7q4hJZmfavVChVOc0buXwR61VnYZlgr
QGGwcqOkkiHfBlKKkQdYUSSuTgV5Swkr2krR4GVyp8u0M5wUoi4DtwlcRZ+NK2rz
wOqdetr0jCcWHOUpIJkmPASFCFnopKip119Ad4Xl83Pzwd8Y0fU0kxmfaNjk2uCp
X1CBoe233GvrN2djXhG2WG+h2K0NwQE1HZ5GaVaOzok/J0OLgjDwf0AT3wARAQAB
tApKb2huIFNtaXRoiQI9BBMBCgAnBQJVLdgoAhsDBQkHhh+ABQsJCAcDBRUKCQgL
BRYCAwEAAh4BAheAAAoJEMR8+MkCYYJDno4P/A6U0LSINu/gI01zhzZECl25d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
=mpNM
-----END PGP PUBLIC KEY BLOCK-----
If you want to send someone your public key, just copy the text from this ASC file and send it to them. It doesn't matter if anyone gets ahold of this text, it can only be used for encryption.
Importing a Public Key To import a public key first create a text file, it doesn't matter if it's plaintext (.txt extension) or a rich text file (.rtf extension). Paste the receiver's public key block (as shown above) into this
blank file and save it. Its label doesn't matter.
Click "Import":

Select the file which contains your friend's public key block:

The program will automatically create a short ID, pay attention to this, it will be important. GnuPG will also add this account to your list in the main program panel, it will be saved until you choose to delete it.
Encrypting Plain Text To encrypt plain text, first create a plain text file (in TextEdit this is Format->Make Plain Text), type your message in this file and save it.
Next, open up Terminal if you're on a mac or CMD if you're on a PC, if you use Linux you already know what's up.
Type into the command line:
Code:
gpg -r [RECEIVER'S SHORT ID] -ea [COMPLETE FILE PATH]
Example (On mac -- windows/linux use the same commands):

This outputs the file /Users/myusername/Desktop/shroom
yman.txt.asc. When opened, this file looks like this:
Code:
-----BEGIN PGP MESSAGE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: GPGTools - https://gpgtools.org
hQIMA++LNj6U1+I1ARAAnsVmkGdMJWQcx+8Omvnl7tWXfx1hBCjyu/uAFQU3cAiS
x4dDGp+lHgdQziohMrk7Fc8qPi78yTjFXAOs0oEM1cUTAcwzyA1oFGZFePw6lMXr
Jx1zPQH3el1hhxBsR2KaiIDZ19kBRceWbBxl0P2w1rB5A7cuF9sDxehUIwAcKm41
OvOUYxbQCZc4IpHi30/X7672QR0WqWnUr4F4iXiviHIG6qGemJagyQUqiGpz+w3p
7iWHAMzj9X1IGpN1UJukhakKR1x3IPJGpMU09aU8+Zxy8kTOFyZ0XbVSkUmltGkK
Vqm2Nyv17ARDcGsnqFQJlnJdvK7mUho8A/+205cQTEkf/gGomd4A6f+xx/8joV2k
+vUP3OWplQ5ljDBPM48rVOrzFZku+E24W03qrL5H5TMG/iyREmiyaxo+24Ba97zT
Y2YHeotra7gqCR9hJ9S3Le3YwJlluO3bwCodZXeKfeYPAI9/B3KKh7uk6lnBWbIo
80vBz1mexxbgjU7/GgfoEIWtvQY1zBNma4kJYUKEvt4FylzpqQM8qUyOzXHtSQvM
s6EotV7Kai6q2pPPzd56TntYjiGHvYwRRSaPtLQsLFloPrF4iUQPFCFPOl4/uz77
VRop2VNs83RaCTwdw4Km5kvBw2itXIEn/nyEKrZNvWJXh68sDAIavguKJ682EIbS
iwH2oMi9axhtRbwJjy6IiPWlVZ254sN/Yn282eUNX3fGO+SHIiCztyCD1ROK1F3j
bAINMQoAzCD1jdE54RW0geIvfyaxq54891Qallmef3Zs6Oa0TofBpBwB2v0dyv4j
2pVz1B4EGoNjuP49TVwuSh6ImcR+0t4qAmbs6RcRZ5luVf/pAKbiEcR+W0U=
=iiEB
-----END PGP MESSAGE-----
If the short ID of the person you're sending a message to is 01010101 and the path of the file you want to encrypt is C:\user\docs\Letter.txt the proper command would be:
Code:
gpg -r 01010101 -ea C:\user\docs\Letter.txt
A new file will be created with the path "C:\user\docs\Letter.txt.asc".
The file "C:\user\docs\Letter.txt.asc" will contain a block of text which you can view with a text editor. You can now send this block of text to the receiver, at which point he will decrypt it using the following steps. How you get this block of text to him is not important. Email, filedropper... privnote... etc.
Encrypting a Document
Command:
Code:
gpg -e -r [RECEIVER's SHORT ID] [PATH TO TARGET FILE]
Say a file with the path of "/path/to/file.zip" exists.
If this command is entered:
Code:
gpg -e -r 01010101 /path/to/file.zip
A new file will be created with the path "path/to/file.zip.gpg".
The GPG extension means it is encrypted, and can only be decrypted by the receiver's private key.
This command will work on all types of files, however I recommend using the plain text commands for sending text.
Decrypting a Document
Code:
gpg -o [PATH TO OUTPUT FILE] -d [PATH TO ENCRYPTED FILE]
[PATH TO OUTPUT FILE] is arbitrary, just make sure the extension is correct for the type of file you're decrypting. E.X. If you are decrypting "/path/to/file.bz2.gpg", your output file should be "/path/to/file.bz2", or you can rename it like "/path/to/newfile.bz2".
If you have the private key to the target file GnuPG will prompt you for the password you used to create the keypair. It will then create a file you specified in [PATH TO OUTPUT FILE]
Decrypting a Plaintext File
Create a plain text file and paste the encrypted PGP block to it. Save is as whatever.txt.asc and use the commands from "decrypting a file".
EX:
[ENCRYPTED FILE] = "/path/to/whatever.txt.asc"
[OUTPUT FILE] = "/path/to/whatever.txt"
Resulting in the command:
Code:
gpg -o /path/to/whatever.txt -d /path/to/whatever.txt.asc
This will create the file "/path/to/whatever.txt" which will be decrypted plaintext.
_____________________________________________________________________________
If anyone has any questions please ask away, I'm here to help... well... I mean if I'm still sober enough to type in one hour. I'll be available throughout this week, and perhaps indefinitely. So seriously, if you are having trouble or need some help, let me know.
This guide could be the difference between freedom and imprisonment if you're Darknet inclined.