2

The instructions at https://tutorials.ubuntu.com/tutorial/tutorial-how-to-verify-ubuntu#3 suggest that you can download an ISO for installing an OS, along with the checksums and a signature. You then attempt to verify the signature with

gpg --keyid-format long --verify SHA256SUMS.gpg SHA256SUMS

which, if you don't already have the required keys, will give an error like:

gpg: Signature made Thu Apr  5 22:19:36 2018 EDT
                    using DSA key ID 46181433FBB75451
gpg: Can't check signature: No public key
gpg: Signature made Thu Apr  5 22:19:36 2018 EDT
                    using RSA key ID D94AA3F0EFE21092
gpg: Can't check signature: No public key

It then suggests that "This is actually a really useful message..." since it tells us which keys to download. It then proceeds to tell the user how to download the keys from a keyserver.

What I don't understand is this: if I have somehow downloaded a compromised file, why would I ever trust the key IDs given when I attempt to verify the file? If the file is compromised, it could be signed with a different key. My understanding of keyservers is that anyone can upload keys, and they keep in sync with each other, and so doing gpg --keyid-format long --keyserver hkp://keyserver.ubuntu.com --recv-keys ... would simply download the wrong key, tell me the file is verified and lure me in to a false sense of security. What have I missed?

  • 1
    From a web of trust point of view, you may find when you receive the key it's signed by other people who you do trust, verifying that the key likely is genuine. In practice this isn't done and you're just verifying that the file has a signature – Torin Mar 24 at 13:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.