Verify Downloaded Files

From Pabut
Jump to navigation Jump to search

If you haven't done so already import the public key of the file provider into your gpg keyring. Hopefully you're getting the public key from a reliable source.

gpg --import keyfile.asc

Where keyfile.asc is the public key in ascii format. Alternatively, if you leave off the filename the public key can be added to the keyring from stdin (i.e. pasted from a web page) Download the target file AND the gpg signature. The gpg signature will be a separate small file with contents resemble:

Version: GnuPG v1.4.9 (GNU/Linux)


Run the file and the signature through gpg:

gpg --verify slackware-12.1-install-dvd.iso.asc slackware-12.1-install-dvd.iso
gpg: Signature made Thu 01 May 2008 11:45:50 PM GMT using DSA key ID 40102233
gpg: Good signature from "Slackware Linux Project <>"
Primary key fingerprint: EC56 49DA 401E 22AB FA67  36EF 6A44 63C0 4010 2233