Verify a PGP Signature Before You Trust a Download
Most people check that a download finished, not who signed it. A PGP signature is the one part of a download you can check without trusting the server that served it, but only if you verify the key as carefully as the file. The steps below take a few minutes and defend against the common case: a compromised mirror or a lookalike site handing you a modified file together with a matching fake signature.
Verify the file, then verify the key that signed it
Update GnuPG before you use it. Run the version check and confirm you are on a current release. Older builds handle key revocation and modern key types poorly, and a verifier with stale crypto libraries can report success on material it should reject. GnuPG remains the reference implementation for OpenPGP work on the desktop.
Get the public key from a different channel than the file. If the download came from a mirror, take the key from the project documentation page, a signed release announcement, or a key server. This defends against the main attack: whoever controls the mirror controls both the file and any key you pick up next to it.
Compare the fingerprint by eye, character by character. Ask GnuPG for the fingerprint of the key you just fetched and read it in groups of four against a value published somewhere you already trust. Do not skim. Key substitution is cheap, and a key that is one character off will still produce a perfectly valid signature over a malicious file.
Import the key, then check expiry and revocation. After importing, list the key and look at two fields: the expiration date and whether it has been revoked. A signature made by an expired or revoked key means the owner has moved on, possibly because the private key leaked. Treat that as a stop sign, not a technicality.
Run the verify command with the signature file first and the download second. You will get one of three results. A good signature means the file matches what that key signed. A bad signature means the file was altered after signing. An unknown key message means you have not imported the right public key yet. Only the first result is a pass, and only if the previous steps held.
Read who signed and when, not just the word good. A valid signature only proves the file matches that key at that moment. If the signer identity is not the party you expected, or the signature date is years older than a release that should be current, stop. Replaying an old signed file with known flaws is a standard trick.
Treat a failure as an incident. Do not open the file, do not run it, and do not try to repair the download in place. Delete it, fetch it again from a different source, and if a file that verified before now fails, you have evidence of tampering worth reporting to the project.
Protect your own key the same way you check someone else's. Put a strong passphrase on the private key, keep an offline copy of the revocation certificate, and secure the email account that can reset your identity with a hardware security key. Anyone who takes over that account can publish a new key in your name, and your contacts will have no way to tell.
Signature checking is a habit rather than a single act. The file is only as trustworthy as the key, and the key is only as trustworthy as the path you used to get its fingerprint.