Addressing Mike's design doc review comments
Georg Koppen

Georg Koppen commited on 2018-02-19 16:58:59
Zeige 1 geänderte Dateien mit 92 Einfügungen und 40 Löschungen.

... ...
@@ -1,5 +1,5 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>The Design and Implementation of the Tor Browser [DRAFT]</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /></head><body><div class="article"><div class="titlepage"><div><div><h2 class="title"><a id="design"></a>The Design and Implementation of the Tor Browser [DRAFT]</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Mike</span> <span class="surname">Perry</span></h3><div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:mikeperry#torproject org">mikeperry#torproject org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Erinn</span> <span class="surname">Clark</span></h3><div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:erinn#torproject org">erinn#torproject org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Steven</span> <span class="surname">Murdoch</span></h3><div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:sjmurdoch#torproject org">sjmurdoch#torproject org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Georg</span> <span class="surname">Koppen</span></h3><div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:gk#torproject org">gk#torproject org</a>&gt;</code></p></div></div></div></div><div><p class="pubdate">January 25th, 2018</p></div></div><hr /></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="sect1"><a href="#idm29">1. Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="#components">1.1. Browser Component Overview</a></span></dt></dl></dd><dt><span class="sect1"><a href="#DesignRequirements">2. Design Requirements and Philosophy</a></span></dt><dd><dl><dt><span class="sect2"><a href="#security">2.1. Security Requirements</a></span></dt><dt><span class="sect2"><a href="#privacy">2.2. Privacy Requirements</a></span></dt><dt><span class="sect2"><a href="#philosophy">2.3. Philosophy</a></span></dt></dl></dd><dt><span class="sect1"><a href="#adversary">3. Adversary Model</a></span></dt><dd><dl><dt><span class="sect2"><a href="#adversary-goals">3.1. Adversary Goals</a></span></dt><dt><span class="sect2"><a href="#adversary-positioning">3.2. Adversary Capabilities - Positioning</a></span></dt><dt><span class="sect2"><a href="#attacks">3.3. Adversary Capabilities - Attacks</a></span></dt></dl></dd><dt><span class="sect1"><a href="#Implementation">4. Implementation</a></span></dt><dd><dl><dt><span class="sect2"><a href="#proxy-obedience">4.1. Proxy Obedience</a></span></dt><dt><span class="sect2"><a href="#state-separation">4.2. State Separation</a></span></dt><dt><span class="sect2"><a href="#disk-avoidance">4.3. Disk Avoidance</a></span></dt><dt><span class="sect2"><a href="#app-data-isolation">4.4. Application Data Isolation</a></span></dt><dt><span class="sect2"><a href="#identifier-linkability">4.5. Cross-Origin Identifier Unlinkability</a></span></dt><dt><span class="sect2"><a href="#fingerprinting-linkability">4.6. Cross-Origin Fingerprinting Unlinkability</a></span></dt><dt><span class="sect2"><a href="#new-identity">4.7. Long-Term Unlinkability via "New Identity" button</a></span></dt><dt><span class="sect2"><a href="#other-security">4.8. Other Security Measures</a></span></dt></dl></dd><dt><span class="sect1"><a href="#BuildSecurity">5. Build Security and Package Integrity</a></span></dt><dd><dl><dt><span class="sect2"><a href="#idm1144">5.1. Achieving Binary Reproducibility</a></span></dt><dt><span class="sect2"><a href="#idm1176">5.2. Package Signatures and Verification</a></span></dt><dt><span class="sect2"><a href="#idm1183">5.3. Anonymous Verification</a></span></dt><dt><span class="sect2"><a href="#update-safety">5.4. Update Safety</a></span></dt></dl></dd><dt><span class="appendix"><a href="#Transparency">A. Towards Transparency in Navigation Tracking</a></span></dt><dd><dl><dt><span class="sect1"><a href="#deprecate">A.1. Deprecation Wishlist</a></span></dt><dt><span class="sect1"><a href="#idm1226">A.2. Promising Standards</a></span></dt></dl></dd></dl></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="idm29"></a>1. Introduction</h2></div></div></div><p>
2
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>The Design and Implementation of the Tor Browser [DRAFT]</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /></head><body><div class="article"><div class="titlepage"><div><div><h2 class="title"><a id="design"></a>The Design and Implementation of the Tor Browser [DRAFT]</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Mike</span> <span class="surname">Perry</span></h3><div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:mikeperry#torproject org">mikeperry#torproject org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Erinn</span> <span class="surname">Clark</span></h3><div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:erinn#torproject org">erinn#torproject org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Steven</span> <span class="surname">Murdoch</span></h3><div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:sjmurdoch#torproject org">sjmurdoch#torproject org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Georg</span> <span class="surname">Koppen</span></h3><div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:gk#torproject org">gk#torproject org</a>&gt;</code></p></div></div></div></div><div><p class="pubdate">February 19th, 2018</p></div></div><hr /></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="sect1"><a href="#idm29">1. Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="#components">1.1. Browser Component Overview</a></span></dt></dl></dd><dt><span class="sect1"><a href="#DesignRequirements">2. Design Requirements and Philosophy</a></span></dt><dd><dl><dt><span class="sect2"><a href="#security">2.1. Security Requirements</a></span></dt><dt><span class="sect2"><a href="#privacy">2.2. Privacy Requirements</a></span></dt><dt><span class="sect2"><a href="#philosophy">2.3. Philosophy</a></span></dt></dl></dd><dt><span class="sect1"><a href="#adversary">3. Adversary Model</a></span></dt><dd><dl><dt><span class="sect2"><a href="#adversary-goals">3.1. Adversary Goals</a></span></dt><dt><span class="sect2"><a href="#adversary-positioning">3.2. Adversary Capabilities - Positioning</a></span></dt><dt><span class="sect2"><a href="#attacks">3.3. Adversary Capabilities - Attacks</a></span></dt></dl></dd><dt><span class="sect1"><a href="#Implementation">4. Implementation</a></span></dt><dd><dl><dt><span class="sect2"><a href="#proxy-obedience">4.1. Proxy Obedience</a></span></dt><dt><span class="sect2"><a href="#state-separation">4.2. State Separation</a></span></dt><dt><span class="sect2"><a href="#disk-avoidance">4.3. Disk Avoidance</a></span></dt><dt><span class="sect2"><a href="#app-data-isolation">4.4. Application Data Isolation</a></span></dt><dt><span class="sect2"><a href="#identifier-linkability">4.5. Cross-Origin Identifier Unlinkability</a></span></dt><dt><span class="sect2"><a href="#fingerprinting-linkability">4.6. Cross-Origin Fingerprinting Unlinkability</a></span></dt><dt><span class="sect2"><a href="#new-identity">4.7. Long-Term Unlinkability via "New Identity" button</a></span></dt><dt><span class="sect2"><a href="#other-security">4.8. Other Security Measures</a></span></dt></dl></dd><dt><span class="sect1"><a href="#BuildSecurity">5. Build Security and Package Integrity</a></span></dt><dd><dl><dt><span class="sect2"><a href="#idm1164">5.1. Achieving Binary Reproducibility</a></span></dt><dt><span class="sect2"><a href="#idm1196">5.2. Package Signatures and Verification</a></span></dt><dt><span class="sect2"><a href="#idm1203">5.3. Anonymous Verification</a></span></dt><dt><span class="sect2"><a href="#update-safety">5.4. Update Safety</a></span></dt></dl></dd><dt><span class="appendix"><a href="#Transparency">A. Towards Transparency in Navigation Tracking</a></span></dt><dd><dl><dt><span class="sect1"><a href="#deprecate">A.1. Deprecation Wishlist</a></span></dt><dt><span class="sect1"><a href="#idm1246">A.2. Promising Standards</a></span></dt></dl></dd></dl></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="idm29"></a>1. Introduction</h2></div></div></div><p>
3 3
 
4 4
 This document describes the <a class="link" href="#adversary" title="3. Adversary Model">adversary model</a>,
5 5
 <a class="link" href="#DesignRequirements" title="2. Design Requirements and Philosophy">design requirements</a>, and <a class="link" href="#Implementation" title="4. Implementation">implementation</a>  of the Tor Browser. It is current as of Tor Browser
... ...
@@ -439,7 +439,7 @@ about the user agent.
439 439
 Also, JavaScript can be used to query the user's timezone via the
440 440
 <code class="function">Date()</code> object, <a class="ulink" href="https://www.khronos.org/registry/webgl/specs/1.0/#5.13" target="_top">WebGL</a> can
441 441
 reveal information about the video card in use, and high precision timing
442
-information can be used to <a class="ulink" href="https://cseweb.ucsd.edu/~hovav/dist/jspriv.pdf" target="_top">fingerprint the cpu and
442
+information can be used to <a class="ulink" href="https://cseweb.ucsd.edu/~hovav/dist/jspriv.pdf" target="_top">fingerprint the CPU and
443 443
 interpreter speed</a>. JavaScript features such as
444 444
 <a class="ulink" href="https://www.w3.org/TR/resource-timing/" target="_top">Resource Timing</a>
445 445
 may leak an unknown amount of network timing related information. And, moreover,
... ...
@@ -707,7 +707,7 @@ a helper application.
707 707
 
708 708
 Furthermore, we ship a <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-52.5.2esr-7.0-2&amp;id=d75b79f6fa920e6a1e3043005dfd50060ea70e57" target="_top">patch for Linux users</a> that makes
709 709
 sure sftp:// and smb:// URLs are not passed along to the operating system as this
710
-can lead to proxy bypasses on systems that have GIO/GnomeVS support. And proxy
710
+can lead to proxy bypasses on systems that have GIO/GnomeVFS support. And proxy
711 711
 bypass risks due to file:// URLs should be mitigated for macOS and Linux users
712 712
 by <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-52.5.2esr-7.0-2&amp;id=8db44df10d1d82850e8b4cfe81ac3b5fce32a663" target="_top">
713 713
 two</a> <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-52.5.2esr-7.0-2&amp;id=a8e1fcc8678aa1583f73ef231c99f77cf17196d9" target="_top">
... ...
@@ -715,7 +715,7 @@ further patches</a>.
715 715
 
716 716
   </p><p>
717 717
 
718
-Additionally, modern desktops now pre-emptively fetch any URLs in Drag and
718
+Additionally, modern desktops now preemptively fetch any URLs in Drag and
719 719
 Drop events as soon as the drag is initiated. This download happens
720 720
 independent of the browser's Tor settings, and can be triggered by something
721 721
 as simple as holding the mouse button down for slightly too long while
... ...
@@ -835,7 +835,7 @@ and no other browser vendor or standards body had invested the effort to
835 835
 enumerate or otherwise deal with these vectors for third party tracking. As
836 836
 such, we have had to enumerate and isolate these identifier sources on a
837 837
 piecemeal basis. This has gotten better lately with Mozilla stepping up and
838
-helping us with uplifting our patches, and with contributing own ones where we
838
+helping us with uplifting our patches, and with contributing their own patches where we
839 839
 lacked proper fixes. However, we are not done yet with our unlinkability defense
840 840
 as new identifier sources are still getting added to the web platform. Here is
841 841
 the list that we have discovered and dealt with to date:
... ...
@@ -863,11 +863,19 @@ We isolate the content and image cache to the URL bar domain by setting
863 863
 <span class="command"><strong>privacy.firstparty.isolate</strong></span> to <span class="command"><strong>true</strong></span>.
864 864
 
865 865
       </p><p>
866
-Furthermore there is the Cache API (CacheStorage). That one is currently not
867
-available in Tor Browser as we do not allow third party cookies and are in
868
-Private Browsing Mode by default.
866
+Furthermore there is the <a class="ulink" href="https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage" target="_top">
867
+CacheStorage API</a>. That one is currently not available in Tor Browser as
868
+we do not allow third party cookies and are in Private Browsing Mode by default.
869
+As the cache entries are written to disk the CacheStorage API
870
+<a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1173467" target="_top">got disabled</a>
871
+in that mode in Firefox, similar to how IndexedDB is handled. There are
872
+<a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1117808" target="_top">thoughts</a>
873
+about enabling it by providing a memory-only database but that is still work
874
+in progress. But even if users are leaving the Private Browsing Mode and are
875
+enabling third party cookies the storage is isolated to the URL bar domain by
876
+<span class="command"><strong>privacy.firstparty.isolate</strong></span> set to <span class="command"><strong>true</strong></span>.
869 877
       </p><p>
870
-Finally, we have the asm.js cache. The cache entry of the sript is (among
878
+Finally, we have the asm.js cache. The cache entry of the script is (among
871 879
 others things, like type of CPU, build ID, source characters of the asm.js
872 880
 module etc.) keyed <a class="ulink" href="https://blog.mozilla.org/luke/2014/01/14/asm-js-aot-compilation-and-startup-performance/" target="_top">to the origin of the script</a>.
873 881
 Lacking a good solution for binding it to the URL bar domain instead we decided
... ...
@@ -888,6 +896,19 @@ DOM storage for third party domains MUST be isolated to the URL bar domain,
888 896
 to prevent linkability between sites. We achieve this by setting
889 897
 <span class="command"><strong>privacy.firstparty.isolate</strong></span> to <span class="command"><strong>true</strong></span>.
890 898
 
899
+      </p></li><li class="listitem"><span class="command"><strong>IndexedDB Storage</strong></span><p>
900
+
901
+IndexedDB storage for third party domains MUST be isolated to the URL bar
902
+domain, to prevent linkability between sites. By default
903
+<a class="ulink" href="https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API" target="_top">
904
+IndexedDB storage</a> is disabled as Tor Browser is using Firefox's Private
905
+Browsing Mode and does not allow third party cookies. There are
906
+<a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=781982" target="_top">thoughts</a>
907
+about enabling this API in Private Browsing Mode as well but that is still work
908
+in progress. However, if users are leaving this mode and are enabling third
909
+party cookies, isolation to the URL bar is achieved, though, by
910
+<span class="command"><strong>privacy.firstparty.isolate</strong></span> set to <span class="command"><strong>true</strong></span>.
911
+
891 912
       </p></li><li class="listitem"><span class="command"><strong>Flash cookies</strong></span><p><span class="command"><strong>Design Goal:</strong></span>
892 913
 
893 914
 Users should be able to click-to-play flash objects from trusted sites. To
... ...
@@ -1077,7 +1098,7 @@ We provide the isolation in Tor Browser by setting
1077 1098
 
1078 1099
       </p></li><li class="listitem"><span class="command"><strong>OCSP</strong></span><p>
1079 1100
 
1080
-OCSP requests go to Certfication Authorities (CAs) to check for revoked
1101
+OCSP requests go to Certificate Authorities (CAs) to check for revoked
1081 1102
 certificates. They are sent once the browser is visiting a website via HTTPS and
1082 1103
 no cached results are available. Thus, to avoid information leaks, e.g. to exit
1083 1104
 relays, OCSP requests MUST go over the same circuit as the HTTPS request causing
... ...
@@ -1092,7 +1113,7 @@ When visiting a website its favicon is fetched via a request originating from
1092 1113
 the browser itself (similar to the OCSP mechanism mentioned in the previous
1093 1114
 section). Those requests MUST be isolated to the URL bar domain.
1094 1115
 
1095
-      </p><p><span class="command"><strong>Implemetation Status:</strong></span>
1116
+      </p><p><span class="command"><strong>Implementation Status:</strong></span>
1096 1117
 
1097 1118
 Favicon requests are isolated to the URL bar domain by setting
1098 1119
 <span class="command"><strong>privacy.firstparty.isolate</strong></span> to <span class="command"><strong>true</strong></span>.
... ...
@@ -1144,7 +1165,7 @@ We allow these requests to proceed, but we isolate them.
1144 1165
 
1145 1166
 The Permissions API allows a website to query the status of different
1146 1167
 permissions. Although permissions are keyed to the origin, that is not enough to
1147
-alleviate cross-linkabilility concerns: the combined permission state could work
1168
+alleviate cross-linkability concerns: the combined permission state could work
1148 1169
 like an identifier given more and more permissions and their state being
1149 1170
 accessible under this API.
1150 1171
 
... ...
@@ -1270,7 +1291,14 @@ most of our fingerprinting defenses serve to differentiate Tor Browser users
1270 1291
 from normal Firefox users. Because of this, any study that lumps browser vendor
1271 1292
 and version differences into its analysis of the fingerprintability of a
1272 1293
 population is largely useless for evaluating either attacks or defenses.
1273
-Unfortunately, this includes popular large-scale studies such as <a class="ulink" href="https://panopticlick.eff.org/" target="_top">Panopticlick</a> and <a class="ulink" href="https://amiunique.org/" target="_top">Am I Unique</a>.
1294
+Unfortunately, this includes popular large-scale studies such as <a class="ulink" href="https://panopticlick.eff.org/" target="_top">Panopticlick</a> and <a class="ulink" href="https://amiunique.org/" target="_top">Am I Unique</a>. To gather usable data about
1295
+Tor Browser's fingerprinting defenses we launched a Google Summer of Code
1296
+project in 2016, called <a class="ulink" href="https://github.com/plaperdr/fp-central" target="_top">
1297
+FPCentral</a>, with the aim to provide us an own testbed. We set this up
1298
+during 2017 and <a class="ulink" href="https://fpcentral.tbb.torproject.org/" target="_top">have it
1299
+available now</a> for further integration into our quality assurance efforts
1300
+and possible research into improving our fingerprinting defenses and measuring
1301
+their effectiveness.
1274 1302
 
1275 1303
       </p></li></ol></div></div><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="fingerprinting-defenses-general"></a>General Fingerprinting Defenses</h4></div></div></div><p>
1276 1304
 
... ...
@@ -1333,7 +1361,7 @@ narrow domain or use case, or when there are alternate ways of accomplishing
1333 1361
 the same task, these features and/or certain aspects of their functionality
1334 1362
 may be simply removed.
1335 1363
 
1336
-   </p></li></ol></div></div><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idm646"></a>Strategies for Defense: Randomization versus Uniformity</h4></div></div></div><p>
1364
+   </p></li></ol></div></div><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idm660"></a>Strategies for Defense: Randomization versus Uniformity</h4></div></div></div><p>
1337 1365
 
1338 1366
 When applying a form of defense to a specific fingerprinting vector or source,
1339 1367
 there are two general strategies available: either the implementation for all
... ...
@@ -1357,7 +1385,9 @@ implementation that strives for uniformity is very simple to evaluate. Despite
1357 1385
 their current flaws, a properly designed version of <a class="ulink" href="https://panopticlick.eff.org/" target="_top">Panopticlick</a> or <a class="ulink" href="https://amiunique.org/" target="_top">Am I Unique</a> could report the entropy and
1358 1386
 uniqueness rates for all users of a single user agent version, without the
1359 1387
 need for complicated statistics about the variance of the measured behaviors.
1360
-
1388
+<a class="ulink" href="https://fpcentral.tbb.torproject.org/fp" target="_top">FPCentral</a> is trying
1389
+to achieve that for Tor Browser by providing feedback on acceptable browser
1390
+properties and giving guidance on possible improvements.
1361 1391
       </p><p>
1362 1392
 
1363 1393
 Randomization (especially incomplete randomization) may also provide a false
... ...
@@ -1583,7 +1613,7 @@ use those fonts exclusively. In addition to that we set the <span class="command
1583 1613
 is always displayed with the same font. This is not guaranteed even if we bundle
1584 1614
 all the fonts Tor Browser uses as it can happen that fonts are loaded in a
1585 1615
 different order on different systems. Setting the above mentioned preferences
1586
-works around this issue by specifying the font to use explicitely.
1616
+works around this issue by specifying the font to use explicitly.
1587 1617
 
1588 1618
      </p><p>
1589 1619
 
... ...
@@ -1725,7 +1755,7 @@ SpeechRecognition (Asynchronous Speech Recognition). The latter is still
1725 1755
 disabled in Firefox. However, the former is enabled by default and there is the
1726 1756
 risk that <span class="command"><strong>speechSynthesis.getVoices()</strong></span> has access to
1727 1757
 computer-specific speech packages making them available in an enumerable
1728
-fashion. Morevover, there are callbacks that would allow JavaScript to time how
1758
+fashion. Moreover, there are callbacks that would allow JavaScript to time how
1729 1759
 long a phrase takes to be "uttered". To prevent both we set
1730 1760
 <span class="command"><strong>media.webspeech.synth.enabled</strong></span> to <span class="command"><strong>false</strong></span>.
1731 1761
 
... ...
@@ -1757,7 +1788,7 @@ still after that got fixed (and on other platforms where the precision was just
1757 1788
 two significant digits anyway) the risk for tracking users remained as combined
1758 1789
 with the <span class="command"><strong>chargingTime</strong></span> and <span class="command"><strong>dischargingTime</strong></span>
1759 1790
 the possible values <a class="ulink" href="https://senglehardt.com/papers/iwpe17_battery_status_case_study.pdf" target="_top">
1760
-got estimated to be in the millons</a> under normal conditions. We avoid all
1791
+got estimated to be in the millions</a> under normal conditions. We avoid all
1761 1792
 those possible issues with disabling the Battery Status API by setting
1762 1793
 <span class="command"><strong>dom.battery.enabled</strong></span> to <span class="command"><strong>false</strong></span>.
1763 1794
 
... ...
@@ -1765,7 +1796,14 @@ those possible issues with disabling the Battery Status API by setting
1765 1796
 
1766 1797
 It is possible to get the system uptime of a Tor Browser user by querying the
1767 1798
 <span class="command"><strong>Event.timestamp</strong></span> property. We avoid this by setting <span class="command"><strong>
1768
-dom.event.highrestimestamp.enabled</strong></span> to <span class="command"><strong>true</strong></span>.
1799
+dom.event.highrestimestamp.enabled</strong></span> to <span class="command"><strong>true</strong></span>. This
1800
+might seem to be counterintuitive at first glance but the effect of setting
1801
+that preference to <code class="code">true</code> is a
1802
+<a class="ulink" href="https://trac.torproject.org/projects/tor/ticket/17046#comment:8" target="_top">
1803
+normalization</a> of <code class="code">evt.timestamp</code> and
1804
+<code class="code">new Event('').timeStamp</code>. Together with clamping the timer
1805
+resolution to 100ms this provides an effective means against system uptime
1806
+fingerprinting.
1769 1807
 
1770 1808
       </p></li><li class="listitem"><span class="command"><strong>Keyboard Layout Fingerprinting</strong></span><p>
1771 1809
 
... ...
@@ -1795,6 +1833,18 @@ are currently returning an empty <span class="command"><strong>KeyboardEvent.cod
1795 1833
 <span class="command"><strong>KeyboardEvent.keyCode</strong></span> of <span class="command"><strong>0</strong></span>. Moreover,
1796 1834
 neither <span class="command"><strong>Alt</strong></span> or <span class="command"><strong>Shift</strong></span>, or
1797 1835
 <span class="command"><strong>AltGr</strong></span> keyboard events are reported to content.
1836
+
1837
+      </p><p>
1838
+
1839
+We are currently not taking the actually deployed browser locale or the locale
1840
+indicated by a loaded document into account when spoofing the keyboard layout.
1841
+We think that would be the right thing to do in the longer run, to mitigate
1842
+possible usability issues and broken functionality on websites. Similarily to
1843
+how users of non-english Tor Browser bundles right now can choose between
1844
+keeping the Accept header spoofed or not they would then be able to keep a
1845
+spoofed english keyboard or a spoofed one depending on the actual Tor Browser
1846
+locale or language of the document.
1847
+
1798 1848
       </p></li><li class="listitem"><span class="command"><strong>User Agent and HTTP Headers</strong></span><p><span class="command"><strong>Design Goal:</strong></span>
1799 1849
 
1800 1850
 All Tor Browser users MUST provide websites with an identical user agent and
... ...
@@ -1853,7 +1903,7 @@ and <span class="command"><strong>document.timeline.currentTime</strong></span>.
1853 1903
 
1854 1904
       </p><p>
1855 1905
 
1856
-While clamping the clock resolution to 100ms is a step towards neutering the
1906
+While clamping the clock resolution to 100ms is a step towards mitigating
1857 1907
 timing-based side channel fingerprinting, it is by no means sufficient. It turns
1858 1908
 out that it is possible to subvert our clamping of explicit clocks by using
1859 1909
 <a class="ulink" href="https://www.usenix.org/system/files/conference/usenixsecurity16/sec16_paper_kohlbrenner.pdf" target="_top">
... ...
@@ -1884,7 +1934,7 @@ out of a Tor Browser user by deploying resource:// and/or chrome:// URIs. Until
1884 1934
 this is fixed in Firefox <a class="ulink" href="https://gitweb.torproject.org/torbutton.git/tree/src/components/content-policy.js" target="_top">
1885 1935
 we filter</a> resource:// and chrome:// requests done
1886 1936
 by web content denying them by default. We need a whitelist of resource:// and
1887
-chrome:// URIs, though, to avoid breaking parts of Firefox. Those more than a
1937
+chrome:// URIs, though, to avoid breaking parts of Firefox. There are more than a
1888 1938
 dozen Firefox resources do not aid in fingerprinting Tor Browser users as they
1889 1939
 are not different on the platforms and in the locales we support.
1890 1940
 
... ...
@@ -1984,8 +2034,9 @@ We clamp keyboard event resolution to 100ms with a <a class="ulink" href="https:
1984 2034
 
1985 2035
      </p></li><li class="listitem"><span class="command"><strong>Amount of Processor Cores (hardwareConcurrency)</strong></span><p>
1986 2036
 
1987
-Modern computers have multiple physical processor cores in their CPU available.
1988
-One core typically allows to run more than one thread at a time and
2037
+Modern computers have multiple physical processor cores available in their
2038
+CPU.  For optimum performance, native code typically attempts to run as many
2039
+threads as there are cores, and
1989 2040
 <span class="command"><strong>navigator.hardwareConcurrency</strong></span> makes the number of those
1990 2041
 threads (i.e. logical processors) available to web content.
1991 2042
 
... ...
@@ -1998,7 +2049,7 @@ the amount of logical processors available.
1998 2049
 
1999 2050
 We set <span class="command"><strong>dom.maxHardwareConcurrency</strong></span> to <span class="command"><strong>1</strong></span> to
2000 2051
 report the same amount of logical processors for everyone. However, there are
2001
-<a class="ulink" href="https://github.com/oftn/core-estimator" target="_top">probablistic ways of
2052
+<a class="ulink" href="https://github.com/oftn/core-estimator" target="_top">probabilistic ways of
2002 2053
 determining the same information available</a> which we are not defending
2003 2054
 against currently. Moreover, we might even want to think about a more elaborate
2004 2055
 approach defending against this fingerprinting technique by not making all users
... ...
@@ -2010,7 +2061,7 @@ size exfiltration.
2010 2061
 
2011 2062
 The <a class="ulink" href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API" target="_top">
2012 2063
 Web Audio API</a> provides several means to aid in fingerprinting users.
2013
-At the simplest level it allows differentiating between users having the API
2064
+At the simplest level it allows differentiating between users who have the API
2014 2065
 available and those who don't by checking for an <span class="command"><strong>AudioContext</strong></span>
2015 2066
 or <span class="command"><strong>OscillatorNode</strong></span> object. However, there are more bits of
2016 2067
 information that the Web Audio API reveals if audio signals generated with an
... ...
@@ -2052,7 +2103,9 @@ is a Firefox feature to view web pages clutter-free and easily adjusted to
2052 2103
 own needs and preferences. To avoid fingerprintability risks we make Tor Browser
2053 2104
 users uniform by setting <span class="command"><strong>reader.parse-on-load.enabled</strong></span> to
2054 2105
 <span class="command"><strong>false</strong></span> and <span class="command"><strong>browser.reader.detectedFirstArticle</strong></span>
2055
-to <span class="command"><strong>true</strong></span>.
2106
+to <span class="command"><strong>true</strong></span>. This makes sure that documents are not parsed on
2107
+load as this is disabled on some devices due to memory consumption and we
2108
+pretend that everybody has already been using that feature in the past.
2056 2109
 
2057 2110
      </p></li><li class="listitem"><span class="command"><strong>Contacting Mozilla Services</strong></span><p>
2058 2111
 
... ...
@@ -2063,8 +2116,8 @@ This is often implemented by contacting Mozilla services, be it for displaying
2063 2116
 further information about a new feature or by
2064 2117
 <a class="ulink" href="https://wiki.mozilla.org/Telemetry" target="_top">sending (aggregated) data back
2065 2118
 for analysis</a>. While some of those mechanisms are disabled by default on
2066
-release channels (gathering telemetry data comes to mind) others are not. We
2067
-make sure that non of those Mozilla services is contacted to avoid possible
2119
+release channels (such as telemetry data) others are not. We
2120
+make sure that none of those Mozilla services are contacted to avoid possible
2068 2121
 fingerprinting risks.
2069 2122
 
2070 2123
       </p><p>
... ...
@@ -2152,11 +2205,11 @@ In order to avoid long-term linkability, we provide a "New Identity" context
2152 2205
 menu option in Torbutton. This context menu option is active if Torbutton can
2153 2206
 read the environment variables $TOR_CONTROL_PASSWD and $TOR_CONTROL_PORT.
2154 2207
 
2155
-   </p><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idm1048"></a>Design Goal:</h4></div></div></div><div class="blockquote"><blockquote class="blockquote">
2208
+   </p><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idm1068"></a>Design Goal:</h4></div></div></div><div class="blockquote"><blockquote class="blockquote">
2156 2209
 
2157 2210
 All linkable identifiers and browser state MUST be cleared by this feature.
2158 2211
 
2159
-    </blockquote></div></div><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idm1051"></a>Implementation Status:</h4></div></div></div><div class="blockquote"><blockquote class="blockquote"><p>
2212
+    </blockquote></div></div><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idm1071"></a>Implementation Status:</h4></div></div></div><div class="blockquote"><blockquote class="blockquote"><p>
2160 2213
 
2161 2214
 First, Torbutton disables JavaScript in all open tabs and windows by using
2162 2215
 both the <a class="ulink" href="https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIDocShell#Attributes" target="_top">browser.docShell.allowJavaScript</a>
... ...
@@ -2175,10 +2228,10 @@ After closing all tabs, we then clear the searchbox and findbox text and emit
2175 2228
 state). Then we manually clear the following state: HTTP auth, SSL state,
2176 2229
 crypto tokens, OCSP state, site-specific content preferences (including HSTS
2177 2230
 state), the undo tab history, content and image cache, offline and memory cache,
2178
-offline storage, IndexedDB storage, asm.js cache, cookies, DOM storage, the
2179
-safe browsing key, the Google wifi geolocation token (if it exists), and the
2180
-domain isolator state. We also clear NoScript's site and temporary permissions,
2181
-and all other browser site permissions.
2231
+offline storage, Cache storage, IndexedDB storage, asm.js cache, cookies,
2232
+DOM storage, the safe browsing key, the Google wifi geolocation token (if it
2233
+exists), and the domain isolator state. We also clear NoScript's site and
2234
+temporary permissions, and all other browser site permissions.
2182 2235
 
2183 2236
      </p><p>
2184 2237
 
... ...
@@ -2261,7 +2314,7 @@ images (<span class="command"><strong>svg.in-content.enabled</strong></span>).
2261 2314
 Fingerprinting</a> is a statistical attack to attempt to recognize specific
2262 2315
 encrypted website activity.
2263 2316
 
2264
-     </p><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idm1109"></a>Design Goal:</h4></div></div></div><div class="blockquote"><blockquote class="blockquote"><p>
2317
+     </p><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idm1129"></a>Design Goal:</h4></div></div></div><div class="blockquote"><blockquote class="blockquote"><p>
2265 2318
 
2266 2319
 We want to deploy a mechanism that reduces the accuracy of <a class="ulink" href="https://en.wikipedia.org/wiki/Feature_selection" target="_top">useful features</a> available
2267 2320
 for classification. This mechanism would either impact the true and false
... ...
@@ -2283,7 +2336,7 @@ Congestion-Sensitive BUFLO</a>. It may be also possible to <a class="ulink" href
2283 2336
 defenses</a> such that they only use existing spare Guard bandwidth capacity in the Tor
2284 2337
 network, making them also effectively no-overhead.
2285 2338
 
2286
-     </p></blockquote></div></div><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idm1121"></a>Implementation Status:</h4></div></div></div><div class="blockquote"><blockquote class="blockquote"><p>
2339
+     </p></blockquote></div></div><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idm1141"></a>Implementation Status:</h4></div></div></div><div class="blockquote"><blockquote class="blockquote"><p>
2287 2340
 Currently, we patch Firefox to <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-52.5.2esr-7.0-2&amp;id=b9fa77472aa67e26bd46a5ca889b20ce3448f9d1" target="_top">randomize
2288 2341
 pipeline order and depth</a>. Unfortunately, pipelining is very fragile.
2289 2342
 Many sites do not support it, and even sites that advertise support for
... ...
@@ -2348,7 +2401,7 @@ contend with. For this reason, we have deployed a build system
2348 2401
 that allows anyone to use our source code to reproduce byte-for-byte identical
2349 2402
 binary packages to the ones that we distribute.
2350 2403
 
2351
-  </p><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="idm1144"></a>5.1. Achieving Binary Reproducibility</h3></div></div></div><p>
2404
+  </p><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="idm1164"></a>5.1. Achieving Binary Reproducibility</h3></div></div></div><p>
2352 2405
 
2353 2406
 The GNU toolchain has been working on providing reproducible builds for some
2354 2407
 time, however a large software project such as Firefox typically ends up
... ...
@@ -2456,7 +2509,7 @@ particular: libgmp) attempt to detect the current CPU to determine which
2456 2509
 optimizations to compile in. This CPU type is uniform on our KVM instances,
2457 2510
 but differs under LXC.
2458 2511
 
2459
-   </p></li></ol></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="idm1176"></a>5.2. Package Signatures and Verification</h3></div></div></div><p>
2512
+   </p></li></ol></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="idm1196"></a>5.2. Package Signatures and Verification</h3></div></div></div><p>
2460 2513
 
2461 2514
 The build process generates a single sha256sums-unsigned-build.txt file that
2462 2515
 contains a sorted list of the SHA-256 hashes of every package produced for that
... ...
@@ -2489,7 +2542,7 @@ In order to verify package integrity, the signature must be stripped off using
2489 2542
 the osslsigncode tool, as described on the <a class="ulink" href="https://www.torproject.org/docs/verifying-signatures.html.en#BuildVerification" target="_top">Signature
2490 2543
 Verification</a> page.
2491 2544
 
2492
-    </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="idm1183"></a>5.3. Anonymous Verification</h3></div></div></div><p>
2545
+    </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="idm1203"></a>5.3. Anonymous Verification</h3></div></div></div><p>
2493 2546
 
2494 2547
 Due to the fact that bit-identical packages can be produced by anyone, the
2495 2548
 security of this build system extends beyond the security of the official
... ...
@@ -2625,7 +2678,7 @@ possible for us to <a class="ulink" href="https://trac.torproject.org/projects/t
2625 2678
 ourselves</a>, as they are comparatively rare and can be handled with site
2626 2679
 permissions.
2627 2680
 
2628
-   </p></li></ol></div></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="idm1226"></a>A.2. Promising Standards</h2></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><a class="ulink" href="https://web.archive.org/web/20130213034335/http://web-send.org:80/" target="_top">Web-Send Introducer</a><p>
2681
+   </p></li></ol></div></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="idm1246"></a>A.2. Promising Standards</h2></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><a class="ulink" href="https://web.archive.org/web/20130213034335/http://web-send.org:80/" target="_top">Web-Send Introducer</a><p>
2629 2682
 
2630 2683
 Web-Send is a browser-based link sharing and federated login widget that is
2631 2684
 designed to operate without relying on third-party tracking or abusing other
2632 2685