That is always a risk, which is why next to the downloads there is a gpg-signed SHASUMS.asc file.
where? it isn't on the
http://bitcoin.org homepage. The PGP keys for the devs are, but not that file. And if you click the download links from the top right hand corner then you get nowhere near to being able to get the SHASUMS.asc file unless you know how sourceforge works.
http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.5.2/SHASUMS.asc/download+ Check the signature on the SHASUMS.asc file:
$ gpg --verify SHASUMS.asc
gpg: Signature made Wed Feb 29 20:51:40 2012 EST using RSA key ID 1FC730C1
gpg: Good signature from "Gavin Andresen (CODE SIGNING KEY) <gavinandresen@gmail.com>"
+ Make sure the checksum for the downloaded file matches the checksum in the SHASUMS.asc file:
$ shasum bitcoin-0.6.0rc2-macosx.dmg
7ab035250ad32a95adf12f2bf8751df9adae0ad4 bitcoin-0.6.0rc2-macosx.dmg
$ grep macosx SHASUMS.asc
7ab035250ad32a95adf12f2bf8751df9adae0ad4 bitcoin-0.6.0rc2-macosx.dmg
That doesn't verify it at all - it verifies that the files signature was created by someone who had a key that was used to create the signatures of the file, and called themselves
gavinandresen@gmail.com. That does not mean that Gavin actually created the key.
$ gpg --verify SHASUMS.asc
gpg: Signature made Wed Feb 29 20:51:40 2012 EST using RSA key ID
1FC730C1gpg: Good signature from "Gavin Andresen (CODE SIGNING KEY) <
gavinandresen@gmail.com>"
To be verified you need to know that the key really belongs to GAVIN ANDRESEN and therefore you must find a way to obtain the key not via the github site, or the bitcoin.org site in a manner that is trusted. i.e Gavin's keyID (the bit highlighed in bold above - using RSA key ID 1FC730C1 ) must be authenticated by him in some form that is trusted (#bitcoin-otc, PM on this site, phone conversation, other users who have WOT verified the key etc.)
Even via here it can't really be trusted as forum admins can view and edit messages without a user being aware.
To be 100% certain you would need to be physically near Gavin whilst he performed a key operation (e.g. signing a file) using that key or a subkey. Everything else is just reduced trust, and how much you are willing to take on that reduction.
And everyone wonders why GPG and PGP never took off...
marked