PGP Encryption: How It Works and How You Can Get Started - Make Tech Easier (2024)

Don’t let the name “Pretty Good Privacy” mislead you. PGP encryption is the gold standard for encrypted communication and has been used by everyone from nuclear activists to criminals since its invention in 1991. While the execution is complex, the concept is simple: you can encrypt text, making it unreadable to anyone who doesn’t have the key to decode it.

Content

  • How Does PGP Encryption Work?
  • What Can I Use PGP Encryption For?
  • How Do I Get Started?
  • Frequently Asked Questions

How Does PGP Encryption Work?

Imagine you want to send someone a letter but don’t want anyone except the recipient to be able to read it. The best way to do this is to write the letter in code, but you can’t send the code key along with the letter, as that’s not very secure.

PGP encryption gets around this problem using public key encryption. Everyone is assigned two keys: a public one that you can share with everyone and a private one, which you keep to yourself. What makes this system possible is that the codes only work one way. If Key A encrypts a file, Key A cannot reverse the process and decrypt it. Only its pair, Key B, can do that. Here’s how it usually works:

  1. Write down your message.
PGP Encryption: How It Works and How You Can Get Started - Make Tech Easier (1)
  1. Find your friend’s public key. He can email it to you, have it listed on a site, etc.
PGP Encryption: How It Works and How You Can Get Started - Make Tech Easier (2)
  1. Run a computer program that uses the public key to convert the message to code.
PGP Encryption: How It Works and How You Can Get Started - Make Tech Easier (3)
  1. Send the message. Anyone who intercepts it will only see gibberish.
PGP Encryption: How It Works and How You Can Get Started - Make Tech Easier (4)
  1. Your friend receives the message and runs it through his private key to decode it, restoring it to plain text.
PGP Encryption: How It Works and How You Can Get Started - Make Tech Easier (5)

This is a vastly simplified explanation of the process, but it covers the basics behind PGP encryption. If you want a more technical, mathematical explanation, Hackernoon breaks it down in much more detail.

What Can I Use PGP Encryption For?

PGP is most often used for encrypting emails, and there are many services to help you do that. ProtonMail is one great example of an encrypted email service that uses full end-to-end encryption. Beyond that, you can use your imagination: PGP can encrypt any text you need and can even be used on whole directories and drives. Investigative journalists often list their public keys online to make it easier for anonymous sources to get in touch with them, and sellers on darknet markets often use it to ensure their customers’ personal information stays secret.

How Do I Get Started?

Getting your own key pair is actually much easier than it sounds. You don’t need to understand anything at all about cryptography. You just have to figure out a few simple programs.

Install Encryption Program

  1. Download Gpg4win. This is a free (though you can donate or just choose $0 when prompted) set of encryption packages and tools. For macOS, check out GPG Suite. You can also add PGP to Linux. As I use Windows, I’ll go through the Windows process.
PGP Encryption: How It Works and How You Can Get Started - Make Tech Easier (6)
  1. Install Gpg4win. Make sure GnuPG (the actual encryption package) and Kleopatra (a nice user interface) are installed. The other components are optional, but it can’t hurt to have them.
PGP Encryption: How It Works and How You Can Get Started - Make Tech Easier (7)

How to Generate Encryption Keys

  1. Once everything is installed, find the Kleopatra program on your computer and open it.
PGP Encryption: How It Works and How You Can Get Started - Make Tech Easier (8)
  1. Go to the “File” tab and select “New Key Pair.” Or, choose “New Key Pair” under the “Certificates” tab. The second option is available only the first time you use the tool.
PGP Encryption: How It Works and How You Can Get Started - Make Tech Easier (9)
  1. Since you want PGP keys, select “Create a personal OpenPGP key pair.”
PGP Encryption: How It Works and How You Can Get Started - Make Tech Easier (10)
  1. If you want to attach your key to your identity, real or fake, you can enter that information here. Otherwise, you can skip this step. If you want to protect your key with a passphrase (which is more secure), check the “Protect the generated key with a passphrase” box.
PGP Encryption: How It Works and How You Can Get Started - Make Tech Easier (11)
  1. From the same dialog box, visit “Advanced Settings” and make sure “RSA” is selected. Change the default 2048 to 4096; this level of encoding makes your encryption pretty much impenetrable and doesn’t really slow you down during normal use.
PGP Encryption: How It Works and How You Can Get Started - Make Tech Easier (12)
  1. Click “OK” to exit this settings menu, then click “Create” to start creating your key. The program is now generating thousands of random characters to make your keys and will ask you for a passphrase. It’s unrecoverable, so don’t forget it! It’s best to use a password manager to back up the passphrase.

If you didn’t check the passphrase box in Step 4, you won’t be asked for a passphrase.

PGP Encryption: How It Works and How You Can Get Started - Make Tech Easier (13)
  1. You now have a public and private key! If you want, you can back these up in a separate file somewhere, or you can email/publicly upload your public key.
PGP Encryption: How It Works and How You Can Get Started - Make Tech Easier (14)

How to Back Up and View Your Keys

  1. You can generate a file with your public key in it by right-clicking the key and clicking “Export.” There are several ways to view your public key, but this makes it easy to access it whenever you want, without the need to use Kleopatra.
  2. Choose where to save the file (it will save as an .asc ASCII file.)
PGP Encryption: How It Works and How You Can Get Started - Make Tech Easier (15)
  1. Open any text-editing app, like Notepad. Any application that supports .asc files will work.

If you’re using Notepad, go to “File” and select “Open.” Navigate to your file to view it. You may need to select “All Files” at the bottom right. Alternately, navigate to your file in File Explorer, right-click it, and select “Open with.” Choose the application you want to use.

PGP Encryption: How It Works and How You Can Get Started - Make Tech Easier (16)
  1. Open the file with your text editor to see your public key! Beautiful, isn’t it?
PGP Encryption: How It Works and How You Can Get Started - Make Tech Easier (17)
  1. You can export your private key by following the same process, except select “Backup secret keys” instead of “Export” in Step 1. Make sure you store this in a safe location or just keep it inside Kleopatra; it’s perfectly accessible there.

These public and private keys can be used with any program that works with PGP, and Kleopatra itself can actually encrypt and decrypt files using your keys. If you want to take them for a test run, try encrypting a text file with your public key and decrypting it with your private key. Use the “Sign/Encrypt” and “Decrypt/Verify” options in Kleopatra.

PGP Encryption: How It Works and How You Can Get Started - Make Tech Easier (18)

Frequently Asked Questions

Can I change my passphrase once set?

Yes. You’ll need to know your original passphrase to do so. In Kleopatra, double-click the key you want to change and select “Change Passphrase.” You can also use this option to set a passphrase if you didn’t do so during the creation phase.

How do I revoke a key once created?

If your private key has somehow become public knowledge, you may want to revoke it so it can’t be used to access a file any longer. Double-click the key/certificate you want to revoke and select “Generate Revocation Certificate.” Once you do this, it can’t be undone.So, if you have an encrypted file you need to access with the key, make sure you decrypt it before revoking access. Otherwise, the file will remain encrypted unless you already have a decrypted backup.

How can I safely backup my key(s) once created?

Ideally, you’ll want to store them off your device. This ensures if anyone gains access to your device, they can’t access your keys. Plus, if your device becomes corrupted, you want a backup elsewhere. Consider using a secured USB device or external drive. For extra security, encrypt or password protect the drive.

Can I encrypt files to store in the cloud?

Yes. You can manually encrypt files using the method above. You can also use something specifically designed to encrypt cloud drives, such as Rclone.

Image credit: geralt via Pixabay

PGP Encryption: How It Works and How You Can Get Started - Make Tech Easier (19)

Crystal Crowder

Crystal Crowder has spent over 15 years working in the tech industry, first as an IT technician and then as a writer. She works to help teach others how to get the most from their devices, systems, and apps. She stays on top of the latest trends and is always finding solutions to common tech problems.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

  • Facebook
  • Tweet
PGP Encryption: How It Works and How You Can Get Started - Make Tech Easier (2024)

FAQs

What is PGP and how does it work? ›

Pretty Good Privacy (PGP) is a security program used to decrypt and encrypt email and authenticate email messages through digital signatures and file encryption. PGP was first designed and developed in 1991 by Paul Zimmerman, a political activist.

What is the PGP encryption technique? ›

PGP uses a passphrase to encrypt your private key on your machine. Your private key is encrypted on your disk using a hash of your passphrase as the secret key. You use the passphrase to decrypt and use your private key.

What are the benefits of PGP encryption? ›

Data Confidentiality: PGP uses strong encryption algorithms that help to ensure that sensitive, encrypted data remains private. Data Integrity: The digital signature algorithms used are equally secure, providing strong authentication of the sender's identity and that data has not been modified in transit.

What are 3 types of PGP? ›

PGP makes use of four types of keys: one-time session symmetric keys, public keys, private keys, passphrase-based symmetric keys. A single user can have multiple public/private key pairs. Each session key is associated with a single message and used only once.

What are the 5 principles of PGP? ›

PGP was designed to provide all four aspects of security, i.e., privacy, integrity, authentication, and non-repudiation in the sending of email. PGP uses a digital signature (a combination of hashing and public key encryption) to provide integrity, authentication, and non-repudiation.

What are the four types of keys used by PGP? ›

Cryptographic Keys and Key Rings

PGP makes use of four types of keys: one-time session symmetric keys, public keys, private keys, and passphrase-based symmetric keys.

Is PGP still being used? ›

The major pro of PGP encryption is that it is essentially unbreakable. That's why it is still used by journalists and activists, and why it is often regarded as the best way of improving cloud security. In short, it is essentially impossible for anyone – be they a hacker or even the NSA – to break PGP encryption.

Is PGP the best encryption? ›

Data is only encrypted with a public key, and thus, can only be decrypted with its matching private key. PGP is just as strong as that of AES, but it adds an additional layer of security to prevent anyone who only has the public key from being able to decrypt data.

What is better than PGP encryption? ›

Virtru End-to-End Encryption –Better than Pretty Good

Virtru overcomes inherent weaknesses in PGP and S/MIME and represents the next generation of end-to-end encryption. “Virtru offers encryption as secure as PGP but makes it easy enough that our end users, customers and partners can use it regularly.”

How do you decrypt messages using PGP? ›

Decrypt messages

Highlight the block of ciphertext. Open the PGP Tray. Select Current Window. Choose Decrypt & Verify.

Is PGP encryption at rest? ›

What Is PGP Encryption? To secure data, we may look for a good algorithm that can help in encrypting it at rest. The commonly thought – after method for encrypting and decrypting data is PGP (Pretty Good Privacy). PGP uses symmetric and asymmetric keys to encrypt data being transferred across networks.

How do I enable PGP encryption? ›

To configure a connection to use PGP: Create or modify an existing file system connection. Expand the Advanced options. Select Enable PGP cryptographic.

Is PGP still used today? ›

The major pro of PGP encryption is that it is essentially unbreakable. That's why it is still used by journalists and activists, and why it is often regarded as the best way of improving cloud security. In short, it is essentially impossible for anyone – be they a hacker or even the NSA – to break PGP encryption.

Does Gmail use PGP? ›

To send a truly secure, private email in Gmail, you have two different options: Use a browser extension. Use manual PGP/GPG encryption.

Is PGP the same as RSA? ›

PGP uses the RSA cryptosystem to deliver the session key; it simply encrypts the randomly-generated session key with Bob's public key and then appends the RSA-encrypted session key to the beginning of Alice's session-key-encrypted document.

Top Articles
Latest Posts
Article information

Author: Edmund Hettinger DC

Last Updated:

Views: 6258

Rating: 4.8 / 5 (58 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Edmund Hettinger DC

Birthday: 1994-08-17

Address: 2033 Gerhold Pine, Port Jocelyn, VA 12101-5654

Phone: +8524399971620

Job: Central Manufacturing Supervisor

Hobby: Jogging, Metalworking, Tai chi, Shopping, Puzzles, Rock climbing, Crocheting

Introduction: My name is Edmund Hettinger DC, I am a adventurous, colorful, gifted, determined, precious, open, colorful person who loves writing and wants to share my knowledge and understanding with you.