#1771: PGP vs GPG: The Key to Docker & Hugging Face

PGP or GPG? We break down the alphabet soup of signing Docker images and AI models, and why it matters for supply chain security.

0:000:00
Episode Details
Episode ID
MWP-1925
Published
Duration
21:15
Audio
Direct link
Pipeline
V5
TTS Engine
chatterbox-regular
Script Writing Agent
Gemini 3 Flash

AI-Generated Content: This podcast is created using AI personas. Please verify any important information independently.

Understanding PGP, GPG, and the Security of Your Software Supply Chain

If you’ve ever installed a package on Linux, pulled a Docker image, or downloaded a model from Hugging Face, you’ve likely encountered a prompt to verify a GPG signature. While many developers copy-paste the command without a second thought, the distinction between PGP and GPG is foundational to the security of the modern software supply chain. This episode explores the history, mechanics, and practical implications of this ubiquitous cryptography standard.

The Alphabet Soup: PGP, OpenPGP, and GPG

The confusion begins with naming. PGP, or "Pretty Good Privacy," was created by Phil Zimmermann in 1991. It was so effective that the U.S. government opened a criminal investigation against him, considering high-grade encryption to be "munitions" subject to export controls. This led to the "illegal t-shirt" era, where activists printed source code on clothing to protest the idea that math could be restricted.

As PGP evolved, it transitioned from an open project to a series of corporate acquisitions, eventually becoming a proprietary product under Symantec. To prevent vendor lock-in, the community established the OpenPGP standard (defined by RFC 4880), which specifies how the encryption should work. GPG, or GNU Privacy Guard, is the free, open-source implementation of that standard.

Think of it like this: OpenPGP is the recipe for cola, PGP was the original name-brand soda, and GPG is the open-source version you can brew yourself. Today, when you type gpg in a terminal, you are using the GNU tool, even though we often colloquially call the keys "PGP keys."

Signing vs. Encrypting: Integrity and Provenance

A common misconception is that signing a file means encrypting it. When signing a massive AI model file—potentially hundreds of gigabytes—you aren't encrypting the whole file. Instead, you are signing a "hash" of the file. The computer runs the file through an algorithm like SHA-256, producing a unique, short digital fingerprint. The private key signs only this fingerprint.

This process provides two critical guarantees:

  1. Integrity: If even one bit of the file changes, the hash changes completely, and the signature becomes invalid. This ensures the file hasn't been tampered with during download or storage.
  2. Provenance: The signature proves who signed the file, provided you trust their public key.

The Challenge of Trust: Web of Trust vs. Centralized Authorities

Why doesn't the open-source world just use commercial certificate authorities (CAs) like the ones used for HTTPS websites or PDF signatures? The answer lies in cost and control. Commercial CAs require payment and identity verification, which isn't scalable for the vast ecosystem of open-source developers. GPG is decentralized; anyone can generate a key for free.

However, decentralization brings complexity. In the "Web of Trust" model, users manually verify keys, often at "key signing parties." If I trust Alice, and Alice signs Bob's key, I might transitively trust Bob. While philosophically pure, this model didn't scale well and led to messy key servers filled with spam and obsolete keys.

Today, we use a hybrid model. Platforms like GitHub, Docker, and Hugging Face act as soft authorities. When you upload your public key to your profile, the platform associates that key with your identity. When you sign a commit or a model file, the platform verifies it against the uploaded key, providing a "Verified" badge. This combines the decentralization of GPG with the usability of a centralized identity provider.

Key Management: The Weakest Link

The biggest vulnerability in GPG isn't the math—it's key management. If a private key is stolen or leaked, an attacker can sign malicious code that appears legitimate. This was a factor in supply chain attacks like the XZ Utils backdoor.

To mitigate this, developers increasingly use hardware security modules like YubiKeys. These devices store the private key internally; it never leaves the hardware. When signing a file, the computer calculates the hash and sends only that small string to the YubiKey. The key signs it internally and returns the signature. This "air-gapped" approach prevents the private key from being extracted, even if the host computer is compromised.

Relevance to AI and Automation

As AI agents become more common in development workflows, verifying signatures is critical. Imagine an agent automatically pulling models and deploying them. Without checking GPG signatures, the agent could easily be poisoned by a malicious mirror, potentially exfiltrating API keys or executing harmful code.

In conclusion, GPG is the invisible foundation of software integrity. While it requires more manual effort than centralized commercial certificates, its open and decentralized nature makes it the only viable option for the global open-source ecosystem. Whether you're managing a Docker repository or downloading an LLM, understanding the difference between PGP and GPG—and how to verify signatures—is essential for secure development.

Downloads

Episode Audio

Download the full episode as an MP3 file

Download MP3
Transcript (TXT)

Plain text transcript file

Transcript (PDF)

Formatted PDF with styling

#1771: PGP vs GPG: The Key to Docker & Hugging Face

Corn
You know, Herman, I was looking at some documentation for a new container image yesterday, and I saw that familiar prompt to verify the GPG signature. And it hit me—how many people actually know the difference between PGP and GPG? Because we use the terms almost interchangeably, but they aren't actually the same thing.
Herman
It’s one of those classic "Kleenex versus facial tissue" situations in tech, isn’t it? Today's prompt from Daniel is about exactly that—the naming confusion between PGP and GPG, and more importantly, why this specific flavor of cryptography has become the backbone of integrity for places like Docker and Hugging Face. Herman Poppleberry here, by the way, ready to dive into the weeds of the Web of Trust.
Corn
And I'm Corn, the one who usually has to ask why we’re making things so complicated. Also, quick bit of housekeeping—Google Gemini 1.5 Flash is actually helping us put the words together for this episode today. So if we sound particularly synthetic, you know why.
Herman
Or particularly brilliant. Let’s go with brilliant.
Corn
We’ll see about that. But seriously, let's start with the alphabet soup. PGP, GPG, OpenPGP. If I’m a developer just trying to sign a commit, do I actually care which one I’m using? Or is it all just the same math under the hood?
Herman
It is mostly the same math, but the history matters for why the tools look the way they do today. PGP, or Pretty Good Privacy, is the grandfather. Phil Zimmermann created it in nineteen ninety-one. It was actually a huge deal back then—the government even opened a criminal investigation against him because they considered high-level encryption to be "munitions" that couldn't be exported.
Corn
Right, the whole "illegal t-shirt" era where people printed the source code on their clothes because the code itself was restricted. That’s a wild bit of history. I remember seeing those shirts—the RSA algorithm in three lines of Perl or something similar. It was a protest against the idea that math could be a weapon of war. So PGP was the original product, but then it went corporate, right?
Herman
It did. It went through a series of acquisitions—it was its own company, then it was part of Network Associates, then PGP Corporation, and eventually ended up as a proprietary brand owned by Symantec. Because it was proprietary, the community needed a way to ensure that the world wasn't locked into a single vendor's implementation of this vital security tech. That led to the creation of the OpenPGP standard—specifically RFC forty-eight eighty. That’s the "recipe" for how the encryption should work.
Corn
And that’s where GPG comes in?
Herman
Precisely. GPG stands for GNU Privacy Guard. It’s the free, open-source implementation of the OpenPGP standard. If PGP is the name-brand soda, GPG is the open-source recipe that anyone can brew, but they both taste like cola because they follow the same standard. When you’re on a Linux server or using a Mac and you type "gpg" into the terminal, you’re using the GNU tool. Almost nobody is actually using "PGP" the product anymore in the open-source world, even though we still call the keys "PGP keys."
Corn
So it’s a standard versus implementation distinction. Like HTML is the standard and Chrome is the implementation.
Herman
That’s a perfect way to look at it. And because GPG is open source and follows that RFC standard, it’s become the de facto choice for the entire software supply chain. When Daniel mentions Docker or Hugging Face, they aren't asking you to go buy a license from Symantec. They’re using the GPG infrastructure because it’s transparent and accessible.
Corn
Okay, so let’s talk about that "why." Why are these platforms so obsessed with GPG signing? I get encryption—I want my messages to be private. But signing is different. If I’m downloading a machine learning model from Hugging Face, what does a GPG signature actually tell me? Is it just a "seal of approval" or is there something more mechanical happening?
Herman
It tells you two critical things: integrity and provenance. Integrity means the bits haven't changed since the author signed them. Imagine a model weight file is like a giant jar of jellybeans. If someone opens the jar and swaps one red bean for a blue one, the seal is broken. If a malicious actor intercepts the download or hacks a mirror and injects a backdoor into that model, the signature will break. Provenance means you know who actually signed it.
Corn
But couldn't an attacker just generate their own GPG key and sign the malicious version? "Hey, I'm Corn, and I totally signed this definitely-not-a-virus model." I mean, I can generate a key in five seconds on my laptop. What stops a hacker from doing the same?
Herman
They could, but that’s where the "Web of Trust" or the public key infrastructure comes in. For a signature to mean something to you, you have to have the author's public key from a source you trust. On Hugging Face, for example, for a commit to show up as "Verified," the user has to upload their public GPG key to their profile. When they sign a commit locally with their private key, Hugging Face checks it against the public key on file.
Corn
So it’s about tying the code to a specific identity. But I feel like we’ve seen this go wrong. Remember the XZ Utils backdoor from earlier this year? Or the various supply chain attacks where people's credentials were stolen? If my private key is on my laptop and someone steals my laptop, they can sign whatever they want as me.
Herman
You’re hitting on the biggest weakness of GPG: key management. It is the user's responsibility to keep that private key private. If the key is compromised, the "trust" is still there mathematically, but the person behind the keyboard has changed. That’s why you see people using hardware security modules or YubiKeys to store their GPG keys. The key never actually leaves the physical device.
Corn
Wait, so how does that work in practice? If the key never leaves the YubiKey, how does the computer sign the file? Does it send the whole file into the USB stick?
Herman
No, that would be incredibly slow! Instead, the computer calculates a hash of the file—that digital fingerprint we talked about—and sends just that tiny string to the YubiKey. The YubiKey signs it internally and sends the signature back. It’s a very elegant "air-gapped" way to handle secrets.
Corn
It’s funny because we talk about this like it's a modern solution for AI models on Hugging Face, but GPG has been doing this for Linux distros for decades. If you use "apt get" on Ubuntu, you’re using GPG every single time you update your system.
Herman
It’s the invisible foundation. Since two thousand fourteen, Docker has required GPG keys for their official repositories. When you add a new repo to your Linux machine, the first thing it usually asks you to do is "curl" a GPG key and add it to your keyring. Most people just copy-paste that command without thinking, but that’s the moment you are deciding who to trust. You’re saying, "I trust that this key actually belongs to the Docker developers."
Corn
And if you skip that step or use a "force" flag to ignore signatures, you’re essentially walking into a dark alley and taking candy from a stranger. It might be delicious candy, or it might be a rootkit.
Herman
I love the dark alley analogy, even though you know I try to avoid them. But it’s true. In the context of "My Weird Prompts," we often talk about AI automation and agentic workflows. Imagine an AI agent that is automatically pulling down models and deploying them. If that agent isn't checking GPG signatures, it could be poisoned very easily.
Corn
That’s a scary thought. "Agent, build me a sentiment analysis tool," and the agent pulls a signed-but-malicious model from a mirror that exfiltrates your API keys. But wait, Daniel asked about the difference between this and the commercial certificate authority model. Like when I sign a PDF in Adobe Acrobat. Why don’t we just use that for software? Why is GPG this separate, slightly more annoying world?
Herman
This is where the philosophy of the internet really splits in two. The commercial model—the one used for SSL certificates on websites or PDF signing—relies on a "Centralized Authority." You pay a company like DigiCert or Sectigo to verify your identity. They look at your business license, maybe your ID, and then they issue you a certificate.
Corn
It’s a "pay to play" trust model.
Herman
And it’s very user-friendly because the "root" of that trust is already built into your operating system. Microsoft and Apple decide which CAs are trustworthy, so when you open a signed PDF, Acrobat just shows a green checkmark. You don’t have to manually hunt down a public key from a random GitHub profile.
Corn
So why doesn't the open-source world just do that? It sounds way easier than me having to manage a keyring and verify fingerprints on a command line. If I'm a developer in a garage, why can't I just get a "Verified" sticker from DigiCert?
Herman
Cost and control. If every open-source developer had to pay five hundred dollars a year for a code-signing certificate from a commercial CA, the ecosystem would collapse. GPG is decentralized. I can generate a key right now, for free, and start signing things. I don't need permission from a corporation to be "trustworthy."
Corn
But that lack of permission is also why it’s harder to use. In the GPG world, I am the one who has to decide if your key is valid. There’s no central "God" of keys telling me you’re legit.
Herman
That’s the "Web of Trust" concept. In the original PGP vision, we would go to "key signing parties." I’d meet you in person, look at your driver’s license, and then digitally sign your public key with my private key. It was like a social network of trust. If I trust Corn, and Corn has signed Daniel’s key, then I can transitively trust Daniel.
Corn
That sounds incredibly nerdy and also like it would never scale to the size of the modern internet. I can't imagine flying to Tokyo just to sign a developer's key so I can safely download their Javascript library.
Herman
It didn't scale. The Web of Trust is mostly dead in its original form. Key servers became a mess of spam and old, revoked keys. There was even a "poisoning" attack on the key servers a few years ago where people flooded legitimate keys with thousands of fake signatures, making the keys so large they crashed the software. Today, we’ve moved toward a hybrid model. Platforms like GitHub and Hugging Face act as a sort of "soft" central authority. They don't certify your identity in a legal sense, but they provide a place where we can all agree: "This is the key that this specific account uses."
Corn
So it’s like a middle ground. We’re using the decentralized tool—GPG—but we’re letting a central platform—Hugging Face—handle the "who is who" part.
Herman
Right. And that’s very different from the Adobe PDF model. In the PDF world, if you sign a contract, that signature has legal weight in many jurisdictions because a third-party corporation has "vouched" for you through a rigorous verification process. GPG signing on a Docker image is more about technical integrity. It’s a developer saying, "I am the same person who wrote the code you’re expecting."
Corn
I want to go deeper on the technical side of the signing process itself. When I sign a Docker image or a model file, am I encrypting the whole file? Because some of these models are hundreds of gigabytes. My CPU would melt if I had to encrypt and decrypt that every time I wanted to check a signature.
Herman
No, and that’s a common misconception. Signing and encryption are two different applications of the same math. When you sign a file, you’re actually signing a "hash" of the file. You run the file through an algorithm like SHA-twenty-five-six, which produces a unique, short string of characters—a digital fingerprint. You then encrypt that fingerprint with your private key.
Corn
Ah, so the recipient takes the file, generates their own hash, decrypts your signature using your public key, and if the two hashes match, we’re golden.
Herman
You got it. It’s incredibly fast because you’re only doing the heavy math on a tiny piece of data, regardless of whether the original file is a one-kilobyte text file or a one-terabyte LLM weight file.
Corn
That makes so much more sense. But what about the "commercial" side Daniel mentioned? If I’m a big enterprise, say a bank, and I’m deploying code, am I using GPG or am I using those fancy DigiCert certificates?
Herman
Often, they’re using both for different layers. For internal code review and commit history, they might use GPG because it integrates so well with Git. But for the actual binaries they ship to customers—like a mobile banking app—they use commercial code-signing certificates. Why? Because Windows and macOS will literally block an app from running if it isn't signed by a recognized commercial CA.
Corn
It’s the "Unidentified Developer" warning. I hate that thing. It feels like my computer is judging my friends' software.
Herman
It’s annoying, but it’s a security layer. Apple and Microsoft are essentially saying, "We don't know who this GPG guy is, but we know who DigiCert is, and they say this app is okay." It’s an "institutional" trust versus "individual" trust.
Corn
So GPG is the tool for the "bazaar," the open-source community where we all look out for each other, and the CA model is for the "cathedral," the formal, corporate world.
Herman
That’s a great way to put it. But the lines are blurring. Have you heard of Sigstore?
Corn
Sounds like a place where I buy pens. Or maybe a very specific boutique for sign-makers.
Herman
Not quite. Sigstore is a new project that’s trying to bring the ease of the CA model to the open-source world without the cost. It uses "short-lived" certificates tied to your OpenID identity—like your Google or GitHub login. It’s trying to solve the "GPG is too hard to manage" problem. It’s actually gaining a lot of traction in the Kubernetes community.
Corn
Is it going to replace GPG? Because GPG feels like it’s been "about to be replaced" for twenty years and yet here we are, still talking about it. Every time I think it's gone, I see a new .asc file on a server.
Herman
GPG is like COBOL—it’s too deeply embedded to ever truly die. Every Linux distribution, every major package manager, and now every AI hub relies on it. Even if something "better" comes along, we’ll be verifying GPG signatures for the rest of our lives. It's the "legacy" that actually works.
Corn
It’s the "good enough" privacy that actually became "everywhere" privacy. I think what’s interesting is the second-order effect of this. Because GPG is so standard, it’s allowed for the rise of these massive, decentralized repositories like Hugging Face. If we didn't have a free, open way to verify model weights, would we trust downloading a "black box" neural network from a random user?
Herman
Probably not. Or at least, the risk would be much higher. We’re already seeing "model hijacking" where people upload models that look legitimate but have hidden layers designed to trigger on specific prompts. GPG signing doesn't stop the model from being "bad," but it stops someone from tampering with a "good" model after it’s been published.
Corn
But how does that work in practice with AI? If I download a Llama model, and it's signed, does that mean Meta signed it? Or just the person who uploaded it to Hugging Face?
Herman
That depends on the repository. If you're on the official Meta account, the signature should link back to their verified key. If it's a "quantized" version uploaded by a community member, the signature only tells you that that specific community member hasn't changed the file since they uploaded it. You're still trusting the uploader, but the GPG signature ensures that no "man-in-the-middle" has injected code into the download stream.
Corn
It’s a subtle distinction, but a huge one. It’s the difference between "I trust this author" and "I trust this file hasn't been messed with."
Herman
And that’s why the Hugging Face integration is so cool. It’s bringing that "Verified" badge we’re used to on social media into the world of hard math. When you see that green "Verified" check on a model repository, it means the platform has kryptographically confirmed that the person who owns that account is the person who uploaded those specific bits.
Corn
It’s funny, we started this talking about naming confusion, but it really comes down to a fundamental question of how we build a society on top of a network where nobody knows if you’re a dog—or in our case, a sloth and a donkey.
Herman
Or a generative AI.
Corn
If I can’t see you, and I can’t talk to you, I need the math to vouch for you. GPG is the math that vouches for the individual developer. The commercial CA model is the math that vouches for the corporation.
Herman
And if you’re a developer listening to this, especially if you’re working in AI or DevOps, the takeaway is pretty clear: don't ignore the GPG steps in the documentation. Don't just "sudo apt-key add" without checking where that key came from. It's like checking the ID of the plumber before you let them into your basement.
Corn
Is there a "GPG for Dummies" tip? Like, if I’ve never generated a key, what’s the one thing I should do today? Is there a "Hello World" of GPG?
Herman
Go to your terminal, type "gpg --full-generate-key," and just see what the process looks like. It’ll ask you for your name, your email, and a passphrase. That passphrase is the most important part—if you lose it, your key is useless. If someone steals it, your identity is toast. It’s a great exercise in understanding how digital identity actually works at the bottom of the stack. You'll see options for RSA or Elliptic Curve. For most people today, EdDSA is the modern choice.
Corn
And once you have that key, you can add it to your GitHub profile. Then every time you commit code, you get that little "Verified" badge. It makes you look like a pro, and it actually makes the world a tiny bit safer.
Herman
It really does. It’s a small bit of friction that prevents a massive amount of potential chaos. We talk about "shifting left" in security all the time—moving security earlier in the development process. GPG signing is the ultimate "shift left" because it starts at the very first "git commit."
Corn
I think we’ve successfully demystified the alphabet soup. PGP is the grandaddy brand, GPG is the open-source tool we all actually use, and they both exist to make sure that "trust" isn't just a feeling, but a mathematical certainty.
Herman
Well said. It’s a bit more work than the commercial model, but that’s the price of freedom and decentralization. You manage your own keys, you own your own identity.
Corn
I can live with that price. Especially if it means I don't have to pay five hundred bucks to DigiCert just to sign my hobby projects. I'd rather spend that on more jellybeans for my jar.
Herman
Just make sure they're the signed, verified jellybeans.
Corn
Alright, I think that’s a wrap on the PGP versus GPG saga. If you’re still confused, just remember: if it’s free and it’s on Linux, it’s probably GPG. If it’s a PDF and it cost you money, it’s probably a commercial CA.
Herman
A simple rule for a complex world.
Corn
Thanks as always to our producer, Hilbert Flumingtop, for keeping us on track and making sure our hashes match. And a big thanks to Modal for providing the GPU credits that power this show—including the ones used by Gemini 1.5 Flash to help write our script today.
Herman
If you found this dive into the weeds of crypto-naming useful, or if you now feel empowered to go generate your first key pair, we’d love to hear about it. This has been My Weird Prompts.
Corn
Find us at myweirdprompts dot com for the full archive and all the ways to subscribe. We’re on Spotify, Apple Podcasts, and pretty much everywhere else you’d expect to find two brothers—well, two animals—talking about technology.
Herman
Until next time, stay secure and keep verifying those signatures.
Corn
Later, Herman.
Herman
Later, Corn. Don't forget your passphrase.
Corn
I've got it tattooed on my... wait, no, that's a bad security practice. I've got it in my head.
Herman
Good luck with that. See ya.

This episode was generated with AI assistance. Hosts Herman and Corn are AI personalities.