forked from torproject/torspec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
227-vote-on-package-fingerprints.txt
147 lines (110 loc) · 5.73 KB
/
227-vote-on-package-fingerprints.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
Filename: 227-vote-on-package-fingerprints.txt
Title: Include package fingerprints in consensus documents
Author: Nick Mathewson, Mike Perry
Created: 2014-02-14
Status: Closed
Implemented-In: 0.2.6.3-alpha
0. Abstract
We propose extending the Tor consensus document to include
digests of the latest versions of one or more package files, to
allow software using Tor to determine its up-to-dateness, and
help users verify that they are getting the correct software.
1. Introduction
To improve the integrity and security of updates, it would be
useful to provide a way to authenticate the latest versions of
core Tor software through the consensus. By listing a location
with this information for each version of each package, we can
augment the update process of Tor software to authenticate the
packages it downloads through the Tor consensus.
2. Proposal
We introduce a new line for inclusion in votes and consensuses.
Its format is:
"package" SP PACKAGENAME SP VERSION SP URL SP DIGESTS NL
PACKAGENAME = NONSPACE
VERSION = NONSPACE
URL = NONSPACE
DIGESTS = DIGEST | DIGESTS SP DIGEST
DIGEST = DIGESTTYPE "=" DIGESTVAL
NONSPACE = one or more non-space printing characters
DIGESTVAL = DIGESTTYPE = one or more non-=, non-" " characters.
SP = " "
NL = a newline
Votes and consensuses may include any number of "package" lines,
but no vote or consensus may include more than one "package" line
with the same PACKAGENAME and VERSION values. All "package"
lines must be sorted by "PACKAGENAME VERSION", in
lexical (strcmp) order.
(If a vote contains multiple entries with the same PACKAGENAME and
VERSION, then only the last one is considered.)
If the consensus-method is at least 19, then when computing
the consensus, package lines for a given PACKAGENAME/VERSION pair
should be included if at least three authorities list such a
package in their votes. (Call these lines the "input" lines for
PACKAGENAME.) That consensus should contain every "package" line
that is listed verbatim by more than half of the authorities
listing a line for the PACKAGENAME/VERSION pair, and no
others.
These lines appear immediately following the client-versions and
server-versions lines.
3. Recommended usage
Programs that want to use this facility should pick their
PACKAGENAME values, and arrange to have their versions listed in
the consensus by at least three friendly authority operators.
Programs may want to have multiple PACKAGENAME values in order to
keep separate lists. These lists could correspond to how the
software is used (as tor has client-versions and
server-versions); or to a release series (as in tbb-alpha,
tbb-beta, and tbb-stable); or to how bad it is to use versions
not listed (as in foo-noknownexploits, foo-recommended).
Programs MUST NOT use "package" lines from consensuses that have
not been verified and accepted as valid according to the rules in
dir-spec.txt, and SHOULD NOT fetch their own consensuses if there
is a tor process also running that can fetch the consensus
itself.
For safety, programs MAY want to disable functionality until
confirming that their versions are acceptable.
To avoid synchronization problems, programs that use the DIGEST
field to store a digest of the contents of the URL SHOULD NOT use
any URLs whose contents are expected to change while any valid
consensus lists them.
3.1. Intended usage by the Tor Browser Bundle
Tor Browser Bundle packages will be listed with package names
'tbb-stable, 'tbb-beta', and 'tbb-alpha'. We will list a line for
the latest version of each release series.
When the updater downloads a new update, it always downloads the
latest version of the Tor Browser Bundle. Because of this, and
because we will only use these lines to authenticate updates, we
should not need to list more than one version per series in the
consensus.
After completing a package download and verifying the download
signatures (which are handled independently from the Tor
Consensus), it will consult the appropriate current consensus
document through the control port.
If the current consensus timestamp is not yet more recent than
the proposed update timestamp, the updater will delay installing
the package until a consensus timestamp that is more recent than
the update timestamp has been obtained by the Tor client.
If the consensus document has a package line for the current
release series with a matching version, it will then download the
file at the specified URL, and then compute its hash to make sure
it matches the value in the consensus.
If the hash matches, the Tor Browser will download the file and
parse its contents, which will be a JSON file which lists
information needed to verify the hashes of the downloaded update
file.
If the hash does not match, the Tor Browser Bundle should display
an error to the user and not install the package.
If there are no package lines in the consensus for the expected
version, the updater will delay installing the update (but the
bundle should still inform the user they are out of date and may
update manually).
If there are no package lines in the consensus for the current
release series at all, the updater should install the package
using only normal signature verification.
4. Limitations and open questions
This proposal won't tell users how to upgrade, or even exactly
what version to upgrade to.
If software is so broken that it won't start at all, or shouldn't
be started at all, this proposal can't help with that.
This proposal is not a substitute for a proper software update
tool.