if you download software, you should verify that what you downloaded is not a altered file of a hacked server distributing trojan horses and keyloggers (malware).

it seems for the gpg verification it is a 3 step process.

1. download the public key of the author of the software (can be downloaded from a keyserver or author’s website)

2. verify the the key

3. check the gpg signature.asc against the downloaded software (that should be right next to the download-software-link)

example: Tor Browser Bundle

# it might be "okayish" (better-than-nothing-approach) to trust a public keyserver
# it might be better to publish public_key.file next to the file to download
# and then directly download public_key.file and import it like
gpg --import public_key.file

gpg --keyserver pool.sks-keyservers.net --recv-keys 0x4E2C6E8793298290 gpg: requesting key 93298290 from hkp server pool.sks-keyservers.net gpg: key 93298290: "Tor Browser Developers (signing key) <torbrowser@torproject.org>" not changed gpg: Total number processed: 1 gpg: unchanged: 1 gpg --fingerprint 0x4E2C6E8793298290 pub 4096R/93298290 2014-12-15 [expires: 2020-08-24] Key fingerprint = EF6E 286D DA85 EA2A 4BA7 DE68 4E2C 6E87 9329 8290 uid Tor Browser Developers (signing key) <torbrowser@torproject.org> sub 4096R/C3C07136 2016-08-24 [expires: 2018-08-24] gpg --verify tor-browser-linux64-7.5_en-US.tar.xz.asc tor-browser-linux64-7.5_en-US.tar.xz gpg: Signature made Tue 23 Jan 2018 01:50:13 AM CET using RSA key ID C3C07136 gpg: Good signature from "Tor Browser Developers (signing key) <torbrowser@torproject.org>" gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: EF6E 286D DA85 EA2A 4BA7 DE68 4E2C 6E87 9329 8290 Subkey fingerprint: A430 0A6B C93C 0877 A445 1486 D148 3FA6 C3C0 7136

official tutorial:

Mac OS X and Linux


You need to have GnuPG installed before you can verify signatures. If you are using Mac OS X, you can install it from https://www.gpgtools.org/. If you are using Linux, then it’s probably you already have GnuPG in your system, as most Linux distributions come with it preinstalled.

The next step is to use GnuPG to import the key that signed your package. The Tor Browser team signs Tor Browser releases. Import its key (0x4E2C6E8793298290) by starting the terminal (under “Applications” in Mac OS X) and typing:

gpg --keyserver pool.sks-keyservers.net --recv-keys 0x4E2C6E8793298290

After importing the key, you can verify that the fingerprint is correct:

gpg --fingerprint 0x4E2C6E8793298290

You should see:

    pub   4096R/93298290 2014-12-15
          Key fingerprint = EF6E 286D DA85 EA2A 4BA7  DE68 4E2C 6E87 9329 8290
    uid                  Tor Browser Developers (signing key) <torbrowser@torproject.org>
    sub   4096R/F65C2036 2014-12-15
    sub   4096R/D40814E0 2014-12-15
    sub   4096R/C3C07136 2016-08-24</torbrowser@torproject.org>

To verify the signature of the package you downloaded, you will need to download the “.asc” file as well. Assuming you downloaded the package and its signature to your Downloads folder, run:

For Mac OS X users:

gpg --verify ~/Downloads/TorBrowser-7.5-osx64_en-US.dmg{.asc*,}

For Linux users (change 64 to 32 if you have the 32-bit package):

gpg --verify tor-browser-linux64-7.5_en-US.tar.xz.asc tor-browser-linux64-7.5_en-US.tar.xz

The output should say “Good signature”:

    gpg: Signature made Tue 24 Jan 2015 09:29:09 AM CET using RSA key ID D40814E0
    gpg: Good signature from "Tor Browser Developers (signing key) <torbrowser@torproject.org>"
    gpg: WARNING: This key is not certified with a trusted signature!
    gpg:          There is no indication that the signature belongs to the owner.
    Primary key fingerprint: EF6E 286D DA85 EA2A 4BA7  DE68 4E2C 6E87 9329 8290</torbrowser@torproject.org>

Currently valid subkey fingerprints are:

    5242 013F 02AF C851 B1C7  36B8 7017 ADCE F65C 2036
    BA1E E421 BBB4 5263 180E  1FC7 2E1A C68E D408 14E0
    A430 0A6B C93C 0877 A445  1486 D148 3FA6 C3C0 7136

Notice that there is a warning because you haven’t assigned a trust index to this person. This means that GnuPG verified that the key made that signature, but it’s up to you to decide if that key really belongs to the developer. The best method is to meet the developer in person and exchange key fingerprints.

If you’re a Linux user and you’re using the Debian Tor (not Tor Browser) packages, you should read the instructions on importing these keys to apt. If you’re using the RPMs (for Tor, not Tor Browser), you can manually verify the signatures on the RPM packages by

rpm -K filename.rpm

See https://www.gnupg.org/documentation/ to learn more about GnuPG.


Verifying sha256sums (advanced)


Build reproducibility is a security property of Tor Browser 3.0 and later. Anyone can build Tor Browser on their own machine and produce a binary that is bit-for-bit identical to the binary we offer on the download page. Fortunately, it is not necessary for everyone to build Tor Browser locally to get this security. Verifying and comparing the signed list of hashes will confirm that multiple people have built Tor Browsers identical to the download.

The steps below walk through this process:

  • Download the Tor Browser package, the sha256sums-unsigned-build.txt file, and the sha256sums-unsigned-build.txt.asc signature file. They can all be found in the same directory under https://www.torproject.org/dist/torbrowser/, for example in ‘7.5’ for Tor Browser 7.5.
  • In case your operating system is adding the .txt extension automatically to the SHA256 sums signature file strip it again by running
    mv sha256sums-unsigned-build.txt.asc.txt sha256sums-unsigned-build.txt.asc
  • Retrieve the signers’ GPG keys. This can be done from the command line by entering something like
    gpg --keyserver keys.mozilla.org --recv-keys 0x4E2C6E8793298290

    (This will bring you the public part of the Tor Browser developers’ signing key. Other developers’ key IDs can be found on this page.)

  • Verify the sha256sums-unsigned-build.txt file by executing this command:
    gpg --verify sha256sums-unsigned-build.txt.asc sha256sums-unsigned-build.txt
  • You should see a message like “Good signature from <DEVELOPER NAME>”. If you don’t, there is a problem. Try these steps again.
  • If you want to verify a Windows Tor Browser package you need to first strip off the authenticode signature of it. Tools that can be used for this purpose are osslsigncode and delcert.exe. Assuming you have built e.g. osslsigncode on a Linux computer you can enter
    /path/to/your/osslsigncode remove-signature \
            /path/to/your/<TOR BROWSER FILE NAME>.exe <TOR BROWSER FILE NAME>.exe
  • Now you can take the sha256sum of the Tor Browser package. On Windows you can use the hashdeep utility and run
    C:\location\where\you\saved\hashdeep -c sha256sum <TOR BROWSER FILE NAME>.exe

    On Linux you can run

    sha256sum <TOR BROWSER FILE NAME>.tar.gz

    without having to download a utility. Note: this does not work for OS X yet due to Apple’s codesigning requirement.

  • You will see a string of letters and numbers.
  • Open sha256sums-unsigned-build.txt in a text editor.
  • Locate the name of the Tor Browser file you downloaded.
  • Compare the string of letters and numbers to the left of your filename with the string of letters and numbers that appeared on your command line. If they match, you’ve successfully verified the build.

Scripts to automate these steps have been written, but to use them you will need to modify them yourself with the latest Tor Browser filename.

src: https://www.torproject.org/docs/verifying-signatures.html.en

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin