git.schokokeks.org
Repositories
Help
Report an Issue
tor-webwml.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
fa1a31d71
Branches
Tags
bridges
docs-debian
jobs
master
press-clips
tor-webwml.git
docs
en
verifying-signatures.wml
verification: split by OS (#17413)
traumschule
commited
fa1a31d71
at 2018-09-10 09:48:32
verifying-signatures.wml
Blame
History
Raw
## translation metadata # Revision: $Revision$ # Translation-Priority: 2-medium #include "head.wmi" TITLE="Tor Project: Verifying Signatures" CHARSET="UTF-8" <div id="content" class="clearfix"> <div id="breadcrumbs"> <a href="<page index>">Home » </a> <a href="<page docs/verifying-signatures>">Verifying Signatures</a> </div> <div id="maincol"> <section class="accordion"> <!-- This section uses a CSS accordion to hide and show topics. Styles are defined at the bottom of layout.css. --> <div> <input id="ac-0" name="accordion-0" type="checkbox" checked /> <label for="ac-0"> <h1><a name="TOC">How to verify signatures of packages</a></h1> <hr> </label> <article class="ac-small"> <!-- TOC --> <div class="nav img-shadow"> <div class="sidenav-sub"> <ul> <li><a href="#Why-verify-signature">Always verify downloads</a></li> <li><a href="#ImportKey">Import Tor's signing key</a></li> <li><a href="#VerifySignature">Verify OpenPGP signatures</a></li> <li><a href="#ChecksumVerification">Verify checksums</a></li> <li><a href="#MARVerification">MAR verification</a></li> <li><a href="#Troubleshooting">Troubleshooting</a></li> <li><a href="#Scripts">Scripts</a></li> </ul> </div> </div> <!-- Intro --> <p>Digital signature is a process ensuring that a certain package was generated by its developers and has not been tampered with. Below we explain why it is important and how to verify that the Tor program you download is the one we have created and has not been modified by some attacker.</p> <p>If you want to learn more about how it works see<br/> <a href="https://en.wikipedia.org/wiki/Digital_signature"> https://en.wikipedia.org/wiki/Digital_signature</a>.</p> <p class="hint">(Click on each headline to show or hide the section.)</p> </article> </div> <!-- Motivation --> <div> <input id="ac-1" name="accordion-1" type="checkbox" /> <label for="ac-1"> <a class="nav" title="link here" href="#Why-verify-signature">◄</a> <h3><a name="Why-verify-signature">Always verify the signature of downloaded files</a></h3> <hr> <p> How do you know that the Tor program you have is really the one we made? Digital signatures ensure that the package you are downloading was created by our <a href="<>page about/corepeople>">developers</a>. It uses a cryptographic mechanism to ensure that the software package that you have just downloaded is authentic. <span class="hint">(click to toggle)</span></p> </label> <article class="ac-small"> <p> For many Tor users it is important to verify that the Tor software is authentic as they have very real adversaries who might try to give them a fake version of Tor. </p> <p> If the Tor package has been modified by some attacker it is not safe to use it. It doesn't matter how secure and anonymous Tor is if you're not running the real Tor. </p> <p> Before you go ahead and download something, there are a few extra steps you should take to make sure you have downloaded an authentic version of Tor. </p> <h4>Always download Tor from torproject.org</h4> <p> There are a variety of attacks that can be used to make you download a fake version of Tor. For example, an attacker could trick you into thinking some other website is a great place to download Tor. You should always download Tor from <a href="https://www.torproject.org"><b>https</b>://www.torproject.org/</a>. </p> <h4>Always make sure you are browsing over https</h4> <p> <a href="https://www.torproject.org">https://www.torproject.org/</a> uses https. Https is the secure version of the http protocol which uses encryption and authentication between your browser and the website. This makes it much harder for the attacker to modify your download. But it's not perfect. Some places in the world block the Tor website, making users to download Tor <a href="<page docs/faq>#GetTor">somewhere else</a>. </p> <p> Large companies sometimes force employees to use a modified browser, so the company can listen in on all their browsing. We've even <a href="https://blog.torproject.org/blog/diginotar-debacle-and-what-you-should-do-about-it">seen</a> attackers who have the ability to trick your browser into thinking you're talking to the Tor website with https when you're not. </p> <h4>Always verify signatures of packages you have downloaded</h4> <p> Some software sites list <a href="https://en.wikipedia.org/wiki/Cryptographic_hash_function">sha1 hashes</a> alongside the software on their website, so users can verify that they downloaded the file without any errors. These "checksums" help you answer the question "Did I download this file correctly from whoever sent it to me?" They do a good job at making sure you didn't have any random errors in your download, but they don't help you figure out whether you were downloading it from the attacker. The better question to answer is: "Is this file that I just downloaded the file that Tor intended me to get?" </p> <a class="nav" href="#TOC" title="go up">↑</a> </article> </div> <!-- Import Tor's signing key --> <div> <input id="ac-2" name="accordion-2" type="checkbox" checked /> <label for="ac-2"> <a class="nav" title="link here" href="#ImportKey">◄</a> <h3><a name="ImportKey">Step 1: Import Tor's signing key</a></h3> <hr> <p> Each file on <a href="<page download/download>">our download page</a> is accompanied by a file with the same name as the package and the extension ".asc". These .asc files are GPG signatures. They allow you to verify the file you've downloaded is exactly the one that we intended you to get. For example, torbrowser-install-<version-torbrowserbundle>_en-US.exe is accompanied by torbrowser-install-<version-torbrowserbundle>_en-US.exe.asc. For a list of which developer signs which package, see our <a href="<page docs/signing-keys>">signing keys</a> page. </p> </label> <article class="ac-box"> <p><span class="hint">Choose your operating system:</span> <label for="ac-2-1"><a name="KeyWindows">► Windows</a></label> <label for="ac-2-2"><a name="KeyMacOS">► Mac OS X</a></label> <label for="ac-2-3"><a name="KeyLinux">► Linux</a></label> </p> <!-- Windows --> <div> <input id="ac-2-1" name="accordion-2" type="radio" checked /> <article class="ac-os"> <h3>Import OpenPGP keys on Windows</h3> <p> First of all you need to have GnuPG installed before you can verify signatures. <br/> Download it from <a href="https://gpg4win.org/download.html">https://gpg4win.org/download.html</a>. </p> <p> Once it's installed, use GnuPG to import the key that signed your package. In order to verify the signature you will need to type a few commands in windows command-line, <i>cmd.exe</i>. </p> <p> The Tor Browser team signs Tor Browser releases. Import its key (0x4E2C6E8793298290) by starting <i>cmd.exe</i> and typing: </p> <pre>gpg.exe --keyserver pool.sks-keyservers.net --recv-keys 0x4E2C6E8793298290</pre> <p> </article> </div> <!-- MacOS --> <div> <input id="ac-2-2" name="accordion-2" type="radio" /> <article class="ac-os"> <h3>Import OpenPGP keys on Mac OS</h3> <p> You need to have GnuPG installed before you can verify signatures. Install it from <a href="https://www.gpgtools.org/">https://www.gpgtools.org/</a>. </p> <p>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" and typing:</p> <pre>gpg --keyserver pool.sks-keyservers.net --recv-keys 0x4E2C6E8793298290</pre> <p> </article> </div> <!-- Linux --> <div> <input id="ac-2-3" name="accordion-2" type="radio" /> <article class="ac-os"> <h3>Import OpenPGP keys on Linux</h3> <p> You need to have GnuPG installed before you can verify signatures. It's probably GnuPG is alreadyy installed on your system, as most Linux distributions come with it preinstalled. </p> <p> 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 and typing:</p> <pre>gpg --keyserver pool.sks-keyservers.net --recv-keys 0x4E2C6E8793298290</pre> <p> </article> </div> <div> <p> After importing the key, you can verify that the fingerprint is correct: </p> <pre>gpg --fingerprint 0x4E2C6E8793298290</pre> <p>You should see:</p> <pre> pub rsa4096/0x4E2C6E8793298290 2014-12-15 [C] [expires: 2020-08-24] Key fingerprint = EF6E 286D DA85 EA2A 4BA7 DE68 4E2C 6E87 9329 8290 uid [ unknown] Tor Browser Developers (signing key) <torbrowser@torproject.org> sub rsa4096/0xD1483FA6C3C07136 2016-08-24 [S] [expires: 2018-08-24] Key fingerprint = A430 0A6B C93C 0877 A445 1486 D148 3FA6 C3C0 7136 sub rsa4096/0xEB774491D9FF06E2 2018-05-26 [S] [expires: 2020-09-12] Key fingerprint = 1107 75B5 D101 FB36 BC6C 911B EB77 4491 D9FF 06E2 </pre> <a class="nav" href="#TOC" title="go up">↑</a> </div> </article><!-- END Import --> </div> <!-- Verifiy with OpenPGP signature --> <div> <input id="ac-3" name="accordion-3" type="checkbox" /> <label for="ac-3"> <a class="nav" title="link here" href="#VerifySignature">◄</a> <h3><a name="VerifySignature">Step 2: Verification with OpenGPG signatures</a></h3> <hr> <p>This section explains how to verify the downloaded file's digital signature on different operating systems. Please notice that a signature is dated the moment the package has been signed. Therefore every time a new file is uploaded a new signature is generated with a different date. As long as you have verified the signature you should not worry that the reported date may vary. </p> </label> <article class="ac-box"> <p><span class="hint">Choose your operating system:</span> <label for="ac-3-1"><a name="VerifyWindows">► Windows</a></label> <label for="ac-3-2"><a name="VerifyMacOS">► Mac OS X</a></label> <label for="ac-3-3"><a name="VerifyLinux">► Linux</a></label> </p> <p> If you haven't already, <a href="<page download/download>">download</a> the files you are interested in. </p> <!-- Windows --> <div> <input id="ac-3-1" name="accordion-3" type="radio" checked /> <article class="ac-os"> <h3>Verify with an OpenPGP signature on Windows</h3> <p> 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 Desktop, run: </p> <pre>gpg.exe --verify C:\Users\Alice\Desktop\torbrowser-install-<version-torbrowserbundle>_en-US.exe.asc</pre> <p>Please substitute "Alice" with your own username.</p> <p>The output should say "Good signature":</p> <pre> gpg: assuming signed data in 'torbrowser-install-<version-torbrowserbundle>_en-US.exe' gpg: Signature made Wed 15 Nov 2017 05:52:38 PM CET gpg: using RSA key 0xD1483FA6C3C07136 gpg: Good signature from "Tor Browser Developers (signing key) <torbrowser@torproject.org>" [unknown] 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 </pre> </article> </div> <!-- MacOS --> <div> <input id="ac-3-2" name="accordion-3" type="radio" /> <article class="ac-os"> <h3>Verify with an OpenPGP signature on Mac OS</h3> <p> 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: </p> <pre>gpg --verify ~/Downloads/TorBrowser-<version-torbrowserbundleosx64>_en-US.dmg{.asc*,}</pre> <p>The output should say "Good signature":</p> <pre> gpg: assuming signed data in 'tor-browser-osx64-<version-torbrowserbundleosx64>_en-US.tar.xz' gpg: Signature made Wed 15 Nov 2017 05:52:38 PM CET gpg: using RSA key 0xD1483FA6C3C07136 gpg: Good signature from "Tor Browser Developers (signing key) <torbrowser@torproject.org>" [unknown] 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 </pre> </article> </div> <!-- Linux --> <div> <input id="ac-3-3" name="accordion-3" type="radio" /> <article class="ac-os"> <h3>Verify with an OpenPGP signature on Linux</h3> <p> 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: </p> <p>Change 64 to 32 if you have the 32-bit package:</p> <pre>gpg --verify tor-browser-linux64-<version-torbrowserbundlelinux64>_en-US.tar.xz.asc</pre> <p>The output should say "Good signature":</p> <pre> gpg: assuming signed data in 'tor-browser-linux64-<version-torbrowserbundlelinux64>_en-US.tar.xz' gpg: Signature made Wed 15 Nov 2017 05:52:38 PM CET gpg: using RSA key 0xD1483FA6C3C07136 gpg: Good signature from "Tor Browser Developers (signing key) <torbrowser@torproject.org>" [unknown] 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 </pre> <p> On <b>Debian</b> for Tor (not Tor Browser) packages, you should read the instructions on <a href="<page docs/debian>#packages">importing these keys to apt</a>. If you're using the <b>RPMs</b> (for Tor, not Tor Browser), you can manually verify the signatures on the RPM packages by <pre>rpm -K filename.rpm</pre> </p> </article> </div> <!-- END OS specific sections --> <p> Currently valid subkey fingerprints are: </p> <pre> 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 </pre> <p> 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. </p> <p>To learn more about GnuPG see <a href="https://www.gnupg.org/documentation/">https://www.gnupg.org/documentation/</a> </p> <a class="nav" href="#TOC" title="go up">↑</a> </article> </div> <!-- Verify checksums --> <div> <input id="ac-4" name="accordion-4" type="checkbox" /> <label for="ac-4"> <a class="nav" title="link here" href="#ChecksumVerification">◄</a> <h3><a id="Checksumerification">Step 3: Verify the file integrity</a></h3> <hr> <p> Build reproducibility is a <a href="https://blog.torproject.org/blog/deterministic-builds-part-one-cyberwar-and-global-compromise"> security property</a> 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 <a href="https://en.wikipedia.org/wiki/Cryptographic_hash">hashes</a> will confirm that multiple people have built Tor Browsers identical to the download. </p> </label> <article> <p> Note: This process does not work on OS X yet due to Apple's codesigning requirement. See <a href="#MARVerification">MAR verification</a> below. </p> <ul> <li> <a href="<page download/download>">Download</a> the Tor Browser package, the <tt>sha256sums-unsigned-build.txt</tt> file, and the <tt>sha256sums-unsigned-build.txt.asc</tt> signature file. They can all be found in the same directory under <a href="https://www.torproject.org/dist/torbrowser/"> https://www.torproject.org/dist/torbrowser/</a>, for example in '<version-torbrowserbundlelinux64>' for Tor Browser <version-torbrowserbundlelinux64>. </li> <li> Retrieve the signers' GPG keys with this id like described above<br/> (Other developers' key IDs can be found on <a href="<page docs/signing-keys>">this page)</a>: <pre id="ttb-key">0x4E2C6E8793298290</pre></li> </ul> </article> <article class="ac-box"> <p><span class="hint">Choose your operating system:</span> <span> <label for="ac-4-1"><a name="ChecksumsWindows">► Windows</a></label> </span> <!--<span> <input id="ac-4-2" name="accordion-4" type="radio" /> <label for="ac-4-2"><a name="ChecksumMacOS">MacOS</a></label> </span>--> <span> <label for="ac-4-3"><a name="ChecksumsLinux">► Linux</a></label> </span> </p> <!-- Windows --> <div> <input id="ac-4-1" name="accordion-4" type="radio" /> <article class="ac-os"> <h3>Verififcation with a checksum on Windows</h3> <h4>Verify the signature of the checksum file</h4> <p> Verify the sha256sums-unsigned-build.txt file by executing this command: </p> <pre>gpg.exe --verify sha256sums-unsigned-build.txt.asc sha256sums-unsigned-build.txt </pre> <p> You should see a message like <pre>"Good signature from <DEVELOPER NAME>"</pre>. If you don't, there is a problem. Try these steps again. </p> <h4>Verify the file integrity of Tor Browser</h4> <ul> <li>If you want to verify a Windows Tor Browser package you need to first strip off the authenticode signature of it.<br/> Tools that can be used for this purpose are <a href="http://osslsigncode.sourceforge.net">osslsigncode</a> and <a href="http://forum.xda-developers.com/showthread.php?t=416175">delcert.exe</a>. Assuming you have built e.g. <tt>osslsigncode</tt> on a Linux computer you can enter </li> <pre>C:\path\to\osslsigncode remove-signature \ C:\path\to\your\<TOR BROWSER FILE NAME>.exe <TOR BROWSER FILE NAME>.exe </pre> <li>Now use the sha256sum of the Tor Browser package with the <a href="http://md5deep.sourceforge.net/">hashdeep utility</a> and run </li> <pre>C:\location\where\you\saved\hashdeep -c sha256sum <TOR BROWSER FILE NAME>.exe</pre> </ul> </article> </div> <!-- Mac OS --><!-- <div> <article class="ac-os"> This process does not work on OS X yet due to Apple's codesigning requirement. </article> </div> --> <!-- Linux --> <input id="ac-4-3" name="accordion-4" type="radio" /> <article class="ac-os ac-4-3"> <h3>Verififcation with a checksum on Linux</h3> <h4>Verify the signature of the checksum file</h4> <ul> <li>Verify the sha256sums-unsigned-build.txt with this command:</li> <pre>gpg --verify sha256sums-unsigned-build.txt.asc sha256sums-unsigned-build.txt </pre> <li>><!-- TODO which OSs are meant here? --> In case your operating system is adding the .txt extension automatically to the SHA256 sums signature file strip it again by running </li>> <pre>mv sha256sums-unsigned-build.txt.asc.txt sha256sums-unsigned-build.txt.asc</pre> <li>> Verify the sha256sums-unsigned-build.txt file by executing this command: </li> <pre>gpg --verify sha256sums-unsigned-build.txt.asc sha256sums-unsigned-build.txt </pre> <li> You should see a message like <pre>"Good signature from <DEVELOPER NAME>"</pre>. If you don't, there is a problem. Try these steps again. </li> </ul> <h4>Verify the file integrity of Tor Browser</h4> <ul> <li>Calculate the SHA-256 checksum of Tor Browser:</li> <pre>sha256sum <TOR BROWSER FILE NAME>.tar.gz</pre> <li>You will see a string of letters and numbers.</li> <li>Open <tt>sha256sums-unsigned-build.txt</tt> in a text editor.</li> <li>Locate the name of the Tor Browser file you downloaded.</li> <li> 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. </li> </ul> </article> <a class="nav" href="#TOC" title="go up">↑</a> </article> </div> <!-- MAR verification --> <div> <input id="ac-5" name="accordion-5" type="checkbox" /> <label for="ac-5"> <a class="nav" title="link here" href="#MARVerification">◄</a> <h3><a name="MARVerification">MAR verification</a></h3> <hr> <p> Starting with Tor Browser 4.5a4 we sign our MAR files which helps securing our update process. The downside of this is the need for additional instructions to verify that the MAR files we ship are indeed the ones we produced with our rbm setup. </p> </label> <article class="ac-small"> <p> Assuming the verification happens on a Linux computer one first needs the <tt>mar-tools-linux*.zip</tt> out of the <tt>gitian-builder/inputs</tt> directory to remove the embedded signature(s). The steps to get the unsigned MAR file on a 64 bit Linux are</p> <pre> cd /path/to/MAR/file unzip /path/to/gitian-builder/inputs/mar-tools-linux64.zip export LD_LIBRARY_PATH=/path/to/MAR/file/mar-tools mar-tools/signmar -r your-signed-mar-file.mar your-unsigned-mar-file.mar</pre> <p>Now you can compare the SHA256 sum of <tt>your-unsigned-mar-file.mar</tt> with the one provided in the <tt>sha265sums-unsigned-build.txt</tt> or <tt>sha256sums-unsigned-build.incremental.txt</tt> as outlined in <a href="#ChekcksumVerification">Checksum verification</a> above. </p> </article> </div> <!-- Troubleshooting --> <div> <input id="ac-6" name="accordion-6" type="checkbox" /> <label for="ac-6"> <a class="nav" title="link here" href="#Troubleshooting">◄</a> <h3><a id="Troubleshooting">Troubleshooting</a></h3> <hr> <p>Does this guide work for you? Is a question missing? <a href="<page about/contact>#support">Reach out to us</a>!</p> </label> <article class="ac-small"> <a class="nav" href="#TOC" title="go up">↑</a> </article> </div> <!-- Scripts --> <div> <input id="ac-7" name="accordion-7" type="checkbox" checked /> <label for="ac-7"> <a class="nav" title="link here" href="#Scripts">◄</a> <h3><a id="Scripts">Automate the process with a script</a></h3> <hr> <p><a href="https://github.com/isislovecruft/scripts/blob/master/verify-gitian-builder-signatures">Scripts</a> to <a href="https://tor.stackexchange.com/questions/648/how-to-verify-tor-browser-bundle-tbb-3-x">automate</a> these steps have been written, but to use them you will need to modify them yourself with the latest Tor Browser filename.</p> </label> <article class="ac-small"> <a class="nav" href="#TOC" title="go up">↑</a> </article> </div> </section> </div> <!-- END MAINCOL --> <div id = "sidecol"> #include "side.wmi" #include "info.wmi" </div> <!-- END SIDECOL --> </div> <!-- END CONTENT --> #include <foot.wmi>