This repository has been archived by the owner on Jul 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1fd98ec
commit b77b1d9
Showing
1 changed file
with
133 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,18 @@ | |
<div id="maincol"> | ||
<h1>How to verify signatures for packages</h1> | ||
|
||
<hr> | ||
|
||
<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>Digital signature is a cryptographic mechanism. 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> | ||
|
||
<!-- START TOC --> | ||
<ol> | ||
<li><a href="#Why">What is a signature and why should I check it?</a></li> | ||
|
@@ -22,134 +34,160 @@ | |
<li><a href="#MARVerification">Verifying MAR files we ship (advanced)</a></li> | ||
</ol> | ||
<!-- END TOC --> | ||
<hr> | ||
|
||
<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>Digital signature is a cryptographic mechanism. If you want to learn more | ||
about how it works see <a href="https://en.wikipedia.org/wiki/Digital_signature"> | ||
https://en.wikipedia.org/wiki/Digital_signature</a>.</p> | ||
|
||
<a name="Why"></a> | ||
<h3>What is a signature and why should I check it?</h3> | ||
<hr> | ||
|
||
<p>How do you know that the Tor program you have is really the one we made? | ||
<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 developers. It uses a cryptographic mechanism to ensure that the software package | ||
that you have just downloaded is authentic. </p> | ||
that you have just downloaded is authentic. | ||
</p> | ||
|
||
<p>For many Tor users it is important to verify that the Tor software is authentic | ||
<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> | ||
of Tor. | ||
</p> | ||
|
||
<p>If the Tor package has been modified by some attacker it is not safe to use. | ||
It doesn't matter how secure and anonymous Tor is if you're not running the real Tor.</p> | ||
<p> | ||
If the Tor package has been modified by some attacker it is not safe to use. | ||
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> | ||
<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 | ||
<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> | ||
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. | ||
<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> | ||
docs/faq>#GetTor">somewhere else</a>. | ||
</p> | ||
|
||
<p>Large companies sometimes force employees to use a modified browser, | ||
<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> | ||
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 | ||
<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> | ||
just downloaded the file that Tor intended me to get?" | ||
</p> | ||
|
||
<a name="Where"></a> | ||
<h3>Where do I get the signatures and the keys that made them?</h3> | ||
<hr> | ||
<p>Each file on <a href="<page download/download>">our download | ||
<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> | ||
of which developer signs which package, see our | ||
<a href="<page docs/signing-keys>">signing keys</a> page. | ||
</p> | ||
|
||
<p>We now show how you can 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> | ||
We now show how you can 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> | ||
|
||
<a name="Windows"></a> | ||
<h3>Windows</h3> | ||
<hr> | ||
<p>First of all you need to have GnuPG installed before you can verify signatures. | ||
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 | ||
<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>The Tor Browser team signs Tor Browser releases. Import its key | ||
(0x4E2C6E8793298290) by starting <i>cmd.exe</i> and typing:</p> | ||
</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>After importing the key, you can verify that the fingerprint | ||
is correct:</p> | ||
<p> | ||
After importing the key, you can verify that the fingerprint | ||
is correct: | ||
</p> | ||
<pre>gpg.exe --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) <[email protected]> | ||
uid [ unknown] Tor Browser Developers (signing key) <[email protected]> | ||
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> | ||
<p>To verify the signature of the package you downloaded, you will need | ||
</pre> | ||
<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> | ||
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> | ||
<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) <[email protected]>" [unknown] | ||
gpg: Good signature from "Tor Browser Developers (signing key) <[email protected]>" [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 | ||
<p>Currently valid subkey fingerprints are: | ||
</pre> | ||
<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> | ||
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 | ||
|
@@ -161,7 +199,6 @@ Primary key fingerprint: EF6E 286D DA85 EA2A 4BA7 DE68 4E2C 6E87 9329 8290 | |
<a name="MacosLinux"></a> | ||
<h3>Mac OS X and Linux</h3> | ||
<hr> | ||
|
||
<p>You need to have GnuPG installed before you can verify | ||
signatures. If you are using Mac OS X, you can install it from <a | ||
href="https://www.gpgtools.org/">https://www.gpgtools.org/</a>. If you | ||
|
@@ -173,32 +210,33 @@ Primary key fingerprint: EF6E 286D DA85 EA2A 4BA7 DE68 4E2C 6E87 9329 8290 | |
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:</p> | ||
|
||
<pre>gpg --keyserver pool.sks-keyservers.net --recv-keys 0x4E2C6E8793298290</pre> | ||
|
||
<p>After importing the key, you can verify that the fingerprint | ||
is correct:</p> | ||
|
||
<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) <[email protected]> | ||
uid [ unknown] Tor Browser Developers (signing key) <[email protected]> | ||
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> | ||
<p>To verify the signature of the package you downloaded, you will need | ||
<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> | ||
package and its signature to your Downloads folder, run: | ||
</p> | ||
|
||
<strong>For Mac OS X users</strong>:<br /> | ||
<p><strong>For Mac OS X users</strong>:<br /></p> | ||
<pre>gpg --verify ~/Downloads/TorBrowser-<version-torbrowserbundleosx64>-osx64_en-US.dmg{.asc*,}</pre> | ||
|
||
<strong>For Linux users</strong> (change 64 to 32 if you have the 32-bit package):<br /> | ||
<p><strong>For Linux users</strong> (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> | ||
|
@@ -207,17 +245,20 @@ sub rsa4096/0xEB774491D9FF06E2 2018-05-26 [S] [expires: 2020-09-12] | |
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) <[email protected]>" [unknown] | ||
gpg: Good signature from "Tor Browser Developers (signing key) <[email protected]>" [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> Currently valid subkey fingerprints are: | ||
<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> | ||
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 | ||
|
@@ -265,39 +306,59 @@ Primary key fingerprint: EF6E 286D DA85 EA2A 4BA7 DE68 4E2C 6E87 9329 8290 | |
<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>In case your operating system is adding the .txt extension | ||
automatically to the SHA256 sums signature file strip it again by running | ||
<pre>mv sha256sums-unsigned-build.txt.asc.txt sha256sums-unsigned-build.txt.asc</pre> | ||
|
||
<li>Retrieve the signers' GPG keys. This can be done from the command | ||
line by entering something like | ||
<pre>gpg --keyserver keys.mozilla.org --recv-keys 0x4E2C6E8793298290</pre> | ||
(This will bring you the public part of the Tor Browser developers' | ||
signing key. Other developers' key IDs can be found on | ||
<a href="<page docs/signing-keys>">this | ||
page</a>.)</li> | ||
<li>Verify the sha256sums-unsigned-build.txt file by executing this | ||
command: | ||
<pre>gpg --verify sha256sums-unsigned-build.txt.asc sha256sums-unsigned-build.txt</pre></li> | ||
<li>You should see a message like "Good signature from <DEVELOPER | ||
NAME>". If you don't, there is a problem. Try these steps again.</li> | ||
|
||
<li> | ||
Verify the sha256sums-unsigned-build.txt file by executing this command: | ||
<pre> | ||
gpg --verify sha256sums-unsigned-build.txt.asc sha256sums-unsigned-build.txt | ||
</pre> | ||
</li> | ||
|
||
<li> | ||
You should see a message like "Good signature from <DEVELOPER | ||
NAME>". If you don't, there is a problem. Try these steps again. | ||
</li> | ||
|
||
<li>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 <a href="http://osslsigncode.sourceforge.net">osslsigncode</a> and | ||
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 | ||
<pre>/path/to/your/osslsigncode remove-signature \ | ||
/path/to/your/<TOR BROWSER FILE NAME>.exe <TOR BROWSER FILE NAME>.exe</pre></li> | ||
/path/to/your/<TOR BROWSER FILE NAME>.exe <TOR BROWSER FILE NAME>.exe | ||
</pre> | ||
</li> | ||
|
||
<li>Now you can take the sha256sum of the Tor Browser package. On | ||
Windows you can use the <a href="http://md5deep.sourceforge.net/"> | ||
hashdeep utility</a> and run | ||
<pre>C:\location\where\you\saved\hashdeep -c sha256sum <TOR BROWSER FILE NAME>.exe</pre> | ||
<pre> | ||
C:\location\where\you\saved\hashdeep -c sha256sum <TOR BROWSER FILE NAME>.exe | ||
</pre> | ||
<p>On Linux you can run</p> | ||
<pre>sha256sum <TOR BROWSER FILE NAME>.tar.gz</pre> | ||
without having to download a utility. Note: this does not work for OS X | ||
yet due to Apple's codesigning requirement.</li> | ||
|
||
<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 | ||
|