Browse code

verification: fix formatting

traumschule authored on 26/08/2018 16:58:10
Showing 1 changed files
... ...
@@ -11,6 +11,18 @@
11 11
   <div id="maincol">
12 12
     <h1>How to verify signatures for packages</h1>
13 13
 
14
+    <hr>
15
+
16
+    <p>Digital signature is a process ensuring that a certain package was
17
+    generated by its developers and has not been tampered with. Below we explain
18
+    why it is important and how to verify that the Tor program you download is
19
+    the one we have created and has not been modified by some attacker.</p>
20
+
21
+    <p>Digital signature is a cryptographic mechanism. If you want to learn more
22
+    about how it works see<br/>
23
+    <a href="https://en.wikipedia.org/wiki/Digital_signature">
24
+    https://en.wikipedia.org/wiki/Digital_signature</a>.</p>
25
+
14 26
 <!-- START TOC -->
15 27
     <ol>
16 28
       <li><a href="#Why">What is a signature and why should I check it?</a></li>
... ...
@@ -22,62 +34,67 @@
22 34
       <li><a href="#MARVerification">Verifying MAR files we ship (advanced)</a></li>
23 35
     </ol>
24 36
 <!-- END TOC -->
25
-    <hr>
26
-
27
-    <p>Digital signature is a process ensuring that a certain package was
28
-    generated by its developers and has not been tampered with. Below we explain
29
-    why it is important and how to verify that the Tor program you download is
30
-    the one we have created and has not been modified by some attacker.</p>
31
-
32
-    <p>Digital signature is a cryptographic mechanism. If you want to learn more
33
-    about how it works see <a href="https://en.wikipedia.org/wiki/Digital_signature">
34
-    https://en.wikipedia.org/wiki/Digital_signature</a>.</p>
35 37
 
36 38
     <a name="Why"></a>
37 39
     <h3>What is a signature and why should I check it?</h3>
38 40
     <hr>
39 41
 
40
-    <p>How do you know that the Tor program you have is really the one we made?
42
+    <p>
43
+    How do you know that the Tor program you have is really the one we made?
41 44
     Digital signatures ensure that the package you are downloading was created by
42 45
     our developers. It uses a cryptographic mechanism to ensure that the software package
43
-    that you have just downloaded is authentic. </p>
46
+    that you have just downloaded is authentic.
47
+    </p>
44 48
 
45
-    <p>For many Tor users it is important to verify that the Tor software is authentic
49
+    <p>
50
+    For many Tor users it is important to verify that the Tor software is authentic
46 51
     as they have very real adversaries who might try to give them a fake version
47
-    of Tor.</p>
52
+    of Tor.
53
+    </p>
48 54
 
49
-    <p>If the Tor package has been modified by some attacker it is not safe to use.
50
-    It doesn't matter how secure and anonymous Tor is if you're not running the real Tor.</p>
55
+    <p>
56
+    If the Tor package has been modified by some attacker it is not safe to use.
57
+    It doesn't matter how secure and anonymous Tor is if you're not running the real Tor.
58
+    </p>
51 59
 
52
-    <p>Before you go ahead and download something, there are a few extra steps you
53
-    should take to make sure you have downloaded an authentic version of Tor.</p>
60
+    <p>
61
+    Before you go ahead and download something, there are a few extra steps you
62
+    should take to make sure you have downloaded an authentic version of Tor.
63
+    </p>
54 64
 
55 65
     <h4>Always download Tor from torproject.org</h4>
56 66
 
57
-    <p>There are a variety of attacks that can be used to make you download a fake
67
+    <p>
68
+    There are a variety of attacks that can be used to make you download a fake
58 69
     version of Tor. For example, an attacker could trick you into thinking some other
59 70
     website is a great place to download Tor. You should
60
-    always download Tor from <a href="https://www.torproject.org"><b>https</b>://www.torproject.org/</a>.</p>
71
+    always download Tor from <a href="https://www.torproject.org"><b>https</b>://www.torproject.org/</a>.
72
+    </p>
61 73
 
62 74
     <h4>Always make sure you are browsing over https</h4>
63 75
 
64
-    <p><a href="https://www.torproject.org">https://www.torproject.org/</a> uses https.
76
+    <p>
77
+    <a href="https://www.torproject.org">https://www.torproject.org/</a> uses https.
65 78
     Https is the secure version of the http protocol which uses encryption and authentication between your
66 79
     browser and the website. This makes it much harder for the attacker
67 80
     to modify your download. But it's not perfect. Some places in the
68 81
     world block the Tor website, making users to download Tor <a href="<page
69
-    docs/faq>#GetTor">somewhere else</a>.</p>
82
+    docs/faq>#GetTor">somewhere else</a>.
83
+    </p>
70 84
 
71
-    <p>Large companies sometimes force employees to use a modified browser,
85
+    <p>
86
+    Large companies sometimes force employees to use a modified browser,
72 87
     so the company can listen in on all their browsing. We've even <a
73 88
     href="https://blog.torproject.org/blog/diginotar-debacle-and-what-you-should-do-about-it">seen</a>
74 89
     attackers who have the ability to trick your browser into thinking
75
-    you're talking to the Tor website with https when you're not.</p>
90
+    you're talking to the Tor website with https when you're not.
91
+    </p>
76 92
 
77 93
     <h4>Always verify signatures of packages you have downloaded</h4>
78 94
 
79
-    <p>Some software sites list <a
80
-    href="https://en.wikipedia.org/wiki/Cryptographic_hash_function">sha1
95
+    <p>
96
+    Some software sites list
97
+    <a href="https://en.wikipedia.org/wiki/Cryptographic_hash_function">sha1
81 98
     hashes</a> alongside the software on their website, so users can
82 99
     verify that they downloaded the file without any errors. These
83 100
     "checksums" help you answer the question "Did I download this file
... ...
@@ -85,71 +102,92 @@
85 102
     sure you didn't have any random errors in your download, but they
86 103
     don't help you figure out whether you were downloading it from the
87 104
     attacker. The better question to answer is: "Is this file that I
88
-    just downloaded the file that Tor intended me to get?"</p>
105
+    just downloaded the file that Tor intended me to get?"
106
+    </p>
89 107
 
90 108
     <a name="Where"></a>
91 109
     <h3>Where do I get the signatures and the keys that made them?</h3>
92 110
     <hr>
93
-    <p>Each file on <a href="<page download/download>">our download
111
+    <p>
112
+    Each file on <a href="<page download/download>">our download
94 113
     page</a> is accompanied by a file with the same name as the
95 114
     package and the extension ".asc". These .asc files are GPG
96 115
     signatures. They allow you to verify the file you've downloaded
97 116
     is exactly the one that we intended you to get. For example,
98 117
     torbrowser-install-<version-torbrowserbundle>_en-US.exe is accompanied by
99 118
     torbrowser-install-<version-torbrowserbundle>_en-US.exe.asc. For a list
100
-    of which developer signs which package, see our <a href="<page docs/signing-keys>">signing keys</a> page.</p>
119
+    of which developer signs which package, see our
120
+    <a href="<page docs/signing-keys>">signing keys</a> page.
121
+    </p>
101 122
 
102
-    <p>We now show how you can verify the downloaded file's digital signature on
103
-    different operating systems. Please notice that a signature is dated the moment
104
-    the package has been signed. Therefore every time a new file is uploaded a new
105
-    signature is generated with a different date. As long as you have verified the
106
-    signature you should not worry that the reported date may vary.
123
+    <p>
124
+    We now show how you can verify the downloaded file's digital signature on
125
+    different operating systems. Please notice that a signature is dated the
126
+    moment the package has been signed. Therefore every time a new file is
127
+    uploaded a new signature is generated with a different date. As long as you
128
+    have verified the signature you should not worry that the reported date may
129
+    vary.
107 130
     </p>
108 131
 
109 132
     <a name="Windows"></a>
110 133
     <h3>Windows</h3>
111 134
     <hr>
112
-    <p>First of all you need to have GnuPG installed before you can verify signatures.
113
-    Download it from <a href="https://gpg4win.org/download.html">https://gpg4win.org/download.html</a>.</p>
114
-    <p>Once it's installed, use GnuPG to import the key that signed your
135
+    <p>
136
+    First of all you need to have GnuPG installed before you can verify
137
+    signatures.
138
+    <br/>
139
+    Download it from
140
+    <a href="https://gpg4win.org/download.html">https://gpg4win.org/download.html</a>.
141
+    </p>
142
+    <p>
143
+    Once it's installed, use GnuPG to import the key that signed your
115 144
     package. In order to verify the signature you will need to type a few commands
116 145
     in windows command-line, <i>cmd.exe</i>.
117
-    <p>The Tor Browser team signs Tor Browser releases. Import its key
118
-    (0x4E2C6E8793298290) by starting <i>cmd.exe</i> and typing:</p>
146
+    </p>
147
+    <p>
148
+    The Tor Browser team signs Tor Browser releases. Import its key
149
+    (0x4E2C6E8793298290) by starting <i>cmd.exe</i> and typing:
150
+    </p>
119 151
     <pre>gpg.exe --keyserver pool.sks-keyservers.net --recv-keys 0x4E2C6E8793298290</pre>
120
-    <p>After importing the key, you can verify that the fingerprint
121
-    is correct:</p>
152
+    <p>
153
+    After importing the key, you can verify that the fingerprint
154
+    is correct:
155
+    </p>
122 156
     <pre>gpg.exe --fingerprint 0x4E2C6E8793298290</pre>
123 157
     <p>You should see:</p>
124 158
     <pre>
125 159
 pub   rsa4096/0x4E2C6E8793298290 2014-12-15 [C] [expires: 2020-08-24]
126 160
       Key fingerprint = EF6E 286D DA85 EA2A 4BA7  DE68 4E2C 6E87 9329 8290
127
-uid                   [ unknown] Tor Browser Developers (signing key) <torbrowser@torproject.org>
161
+uid                   [ unknown] Tor Browser Developers (signing key) &lt;torbrowser@torproject.org&gt;
128 162
 sub   rsa4096/0xD1483FA6C3C07136 2016-08-24 [S] [expires: 2018-08-24]
129 163
       Key fingerprint = A430 0A6B C93C 0877 A445  1486 D148 3FA6 C3C0 7136
130 164
 sub   rsa4096/0xEB774491D9FF06E2 2018-05-26 [S] [expires: 2020-09-12]
131 165
       Key fingerprint = 1107 75B5 D101 FB36 BC6C  911B EB77 4491 D9FF 06E2
132
-</pre>
133
-    <p>To verify the signature of the package you downloaded, you will need
166
+    </pre>
167
+    <p>
168
+    To verify the signature of the package you downloaded, you will need
134 169
     to download the ".asc" file as well. Assuming you downloaded the
135
-    package and its signature to your Desktop, run:</p>
170
+    package and its signature to your Desktop, run:
171
+    </p>
136 172
     <pre>gpg.exe --verify C:\Users\Alice\Desktop\torbrowser-install-<version-torbrowserbundle>_en-US.exe.asc</pre>
137 173
     <p>Please substitute "Alice" with your own username.</p>
138
-    <p>The output should say "Good signature": </p>
174
+    <p>The output should say "Good signature":</p>
139 175
     <pre>
140 176
 gpg: assuming signed data in 'torbrowser-install-<version-torbrowserbundle>_en-US.exe'
141 177
 gpg: Signature made Wed 15 Nov 2017 05:52:38 PM CET
142 178
 gpg:                using RSA key 0xD1483FA6C3C07136
143
-gpg: Good signature from "Tor Browser Developers (signing key) <torbrowser@torproject.org>" [unknown]
179
+gpg: Good signature from "Tor Browser Developers (signing key) &lt;torbrowser@torproject.org&gt;" [unknown]
144 180
 gpg: WARNING: This key is not certified with a trusted signature!
145 181
 gpg:          There is no indication that the signature belongs to the owner.
146 182
 Primary key fingerprint: EF6E 286D DA85 EA2A 4BA7  DE68 4E2C 6E87 9329 8290
147 183
      Subkey fingerprint: A430 0A6B C93C 0877 A445  1486 D148 3FA6 C3C0 7136
148
-    <p>Currently valid subkey fingerprints are:
184
+    </pre>
185
+    <p>Currently valid subkey fingerprints are:</p>
149 186
     <pre>
150 187
     5242 013F 02AF C851 B1C7  36B8 7017 ADCE F65C 2036
151 188
     BA1E E421 BBB4 5263 180E  1FC7 2E1A C68E D408 14E0
152
-    A430 0A6B C93C 0877 A445  1486 D148 3FA6 C3C0 7136</pre></p>
189
+    A430 0A6B C93C 0877 A445  1486 D148 3FA6 C3C0 7136
190
+    </pre>
153 191
     <p>
154 192
     Notice that there is a warning because you haven't assigned a trust
155 193
     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
161 199
     <a name="MacosLinux"></a>
162 200
     <h3>Mac OS X and Linux</h3>
163 201
     <hr>
164
-
165 202
     <p>You need to have GnuPG installed before you can verify
166 203
     signatures. If you are using Mac OS X, you can install it from <a
167 204
     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
173 210
     your package. The Tor Browser team signs Tor Browser releases. Import its
174 211
     key (0x4E2C6E8793298290) by starting the terminal (under "Applications"
175 212
     in Mac OS X) and typing:</p>
176
-
177 213
     <pre>gpg --keyserver pool.sks-keyservers.net --recv-keys 0x4E2C6E8793298290</pre>
178
-
179
-    <p>After importing the key, you can verify that the fingerprint
180
-    is correct:</p>
181
-
214
+    <p>
215
+    After importing the key, you can verify that the fingerprint
216
+    is correct:
217
+    </p>
182 218
     <pre>gpg --fingerprint 0x4E2C6E8793298290</pre>
183
-
184 219
     <p>You should see:</p>
185 220
     <pre>
186 221
 pub   rsa4096/0x4E2C6E8793298290 2014-12-15 [C] [expires: 2020-08-24]
187 222
       Key fingerprint = EF6E 286D DA85 EA2A 4BA7  DE68 4E2C 6E87 9329 8290
188
-uid                   [ unknown] Tor Browser Developers (signing key) <torbrowser@torproject.org>
223
+uid                   [ unknown] Tor Browser Developers (signing key) &lt;torbrowser@torproject.org&gt;
189 224
 sub   rsa4096/0xD1483FA6C3C07136 2016-08-24 [S] [expires: 2018-08-24]
190 225
       Key fingerprint = A430 0A6B C93C 0877 A445  1486 D148 3FA6 C3C0 7136
191 226
 sub   rsa4096/0xEB774491D9FF06E2 2018-05-26 [S] [expires: 2020-09-12]
192 227
       Key fingerprint = 1107 75B5 D101 FB36 BC6C  911B EB77 4491 D9FF 06E2
193 228
     </pre>
194
-    <p>To verify the signature of the package you downloaded, you will need
229
+    <p>
230
+    To verify the signature of the package you downloaded, you will need
195 231
     to download the ".asc" file as well. Assuming you downloaded the
196
-    package and its signature to your Downloads folder, run:</p>
232
+    package and its signature to your Downloads folder, run:
233
+    </p>
197 234
 
198
-    <strong>For Mac OS X users</strong>:<br />
235
+    <p><strong>For Mac OS X users</strong>:<br /></p>
199 236
     <pre>gpg --verify ~/Downloads/TorBrowser-<version-torbrowserbundleosx64>-osx64_en-US.dmg{.asc*,}</pre>
200 237
 
201
-    <strong>For Linux users</strong> (change 64 to 32 if you have the 32-bit package):<br />
238
+    <p><strong>For Linux users</strong> (change 64 to 32 if you have the 32-bit package):</p>
239
+
202 240
     <pre>gpg --verify tor-browser-linux64-<version-torbrowserbundlelinux64>_en-US.tar.xz.asc</pre>
203 241
 
204 242
     <p>The output should say "Good signature":</p>
... ...
@@ -207,17 +245,20 @@ sub   rsa4096/0xEB774491D9FF06E2 2018-05-26 [S] [expires: 2020-09-12]
207 245
 gpg: assuming signed data in 'tor-browser-linux64-<version-torbrowserbundlelinux64>_en-US.tar.xz'
208 246
 gpg: Signature made Wed 15 Nov 2017 05:52:38 PM CET
209 247
 gpg:                using RSA key 0xD1483FA6C3C07136
210
-gpg: Good signature from "Tor Browser Developers (signing key) <torbrowser@torproject.org>" [unknown]
248
+gpg: Good signature from "Tor Browser Developers (signing key) &lt;torbrowser@torproject.org&gt;" [unknown]
211 249
 gpg: WARNING: This key is not certified with a trusted signature!
212 250
 gpg:          There is no indication that the signature belongs to the owner.
213 251
 Primary key fingerprint: EF6E 286D DA85 EA2A 4BA7  DE68 4E2C 6E87 9329 8290
214 252
      Subkey fingerprint: A430 0A6B C93C 0877 A445  1486 D148 3FA6 C3C0 7136
215 253
     </pre>
216
-    <p> Currently valid subkey fingerprints are:
254
+    <p>
255
+    Currently valid subkey fingerprints are:
256
+    </p>
217 257
     <pre>
218 258
     5242 013F 02AF C851 B1C7  36B8 7017 ADCE F65C 2036
219 259
     BA1E E421 BBB4 5263 180E  1FC7 2E1A C68E D408 14E0
220
-    A430 0A6B C93C 0877 A445  1486 D148 3FA6 C3C0 7136</pre></p>
260
+    A430 0A6B C93C 0877 A445  1486 D148 3FA6 C3C0 7136
261
+    </pre>
221 262
     <p>
222 263
     Notice that there is a warning because you haven't assigned a trust
223 264
     index to this person. This means that GnuPG verified that the key made
... ...
@@ -265,9 +306,11 @@ Primary key fingerprint: EF6E 286D DA85 EA2A 4BA7  DE68 4E2C 6E87 9329 8290
265 306
       <a href="https://www.torproject.org/dist/torbrowser/">
266 307
       https://www.torproject.org/dist/torbrowser/</a>, for example in '<version-torbrowserbundlelinux64>'
267 308
       for Tor Browser <version-torbrowserbundlelinux64>.</li>
309
+
268 310
       <li>In case your operating system is adding the .txt extension
269 311
       automatically to the SHA256 sums signature file strip it again by running
270 312
       <pre>mv sha256sums-unsigned-build.txt.asc.txt sha256sums-unsigned-build.txt.asc</pre>
313
+
271 314
       <li>Retrieve the signers' GPG keys. This can be done from the command
272 315
       line by entering something like
273 316
       <pre>gpg --keyserver keys.mozilla.org --recv-keys 0x4E2C6E8793298290</pre>
... ...
@@ -275,29 +318,47 @@ Primary key fingerprint: EF6E 286D DA85 EA2A 4BA7  DE68 4E2C 6E87 9329 8290
275 318
        signing key. Other developers' key IDs can be found on
276 319
       <a href="<page docs/signing-keys>">this
277 320
       page</a>.)</li>
278
-      <li>Verify the sha256sums-unsigned-build.txt file by executing this
279
-      command:
280
-      <pre>gpg --verify sha256sums-unsigned-build.txt.asc sha256sums-unsigned-build.txt</pre></li>
281
-      <li>You should see a message like "Good signature from &lt;DEVELOPER
282
-      NAME&gt;". If you don't, there is a problem. Try these steps again.</li>
321
+
322
+      <li>
323
+      Verify the sha256sums-unsigned-build.txt file by executing this command:
324
+      <pre>
325
+      gpg --verify sha256sums-unsigned-build.txt.asc sha256sums-unsigned-build.txt
326
+      </pre>
327
+      </li>
328
+
329
+      <li>
330
+      You should see a message like "Good signature from &lt;DEVELOPER
331
+      NAME&gt;". If you don't, there is a problem. Try these steps again.
332
+      </li>
333
+
283 334
       <li>If you want to verify a Windows Tor Browser package you need to first
284 335
       strip off the authenticode signature of it. Tools that can be used for
285
-      this purpose are <a href="http://osslsigncode.sourceforge.net">osslsigncode</a> and
336
+      this purpose are
337
+      <a href="http://osslsigncode.sourceforge.net">osslsigncode</a> and
286 338
       <a href="http://forum.xda-developers.com/showthread.php?t=416175">delcert.exe</a>.
287 339
       Assuming you have built e.g. <tt>osslsigncode</tt> on a Linux computer you can enter
288 340
       <pre>/path/to/your/osslsigncode remove-signature &#92;
289
-        /path/to/your/&lt;TOR BROWSER FILE NAME&gt;.exe &lt;TOR BROWSER FILE NAME&gt;.exe</pre></li>
341
+        /path/to/your/&lt;TOR BROWSER FILE NAME&gt;.exe &lt;TOR BROWSER FILE NAME&gt;.exe
342
+      </pre>
343
+      </li>
344
+
290 345
       <li>Now you can take the sha256sum of the Tor Browser package. On
291 346
       Windows you can use the <a href="http://md5deep.sourceforge.net/">
292 347
       hashdeep utility</a> and run
293
-      <pre>C:\location\where\you\saved\hashdeep -c sha256sum &lt;TOR BROWSER FILE NAME&gt;.exe</pre>
348
+      <pre>
349
+      C:\location\where\you\saved\hashdeep -c sha256sum &lt;TOR BROWSER FILE NAME&gt;.exe
350
+      </pre>
294 351
       <p>On Linux you can run</p>
295 352
       <pre>sha256sum &lt;TOR BROWSER FILE NAME&gt;.tar.gz</pre>
296 353
       without having to download a utility. Note: this does not work for OS X
297 354
       yet due to Apple's codesigning requirement.</li>
355
+
298 356
       <li>You will see a string of letters and numbers.</li>
357
+
299 358
       <li>Open <tt>sha256sums-unsigned-build.txt</tt> in a text editor.</li>
359
+
300 360
       <li>Locate the name of the Tor Browser file you downloaded.</li>
361
+
301 362
       <li>Compare the string of letters and numbers to the left of your
302 363
       filename with the string of letters and numbers that appeared
303 364
       on your command line. If they match, you've successfully verified the