1 # -*- coding: utf-8 ; mode: org -*-
3 Filename: XXX-social-bridge-distribution.txt
4 Title: Social Bridge Distribution
5 Author: Isis Agora Lovecruft
7 Related Proposals: 199-bridgefinder-integration.txt
8 XXX-bridgedb-database-improvements.txt
13 This proposal specifies a system for social distribution of the
14 centrally-stored bridges within BridgeDB. It is primarily based upon Part
15 IV of the rBridge paper, [1] utilising a coin-based incentivisation scheme
16 to ensure that malicious users and/or censoring entities are deterred from
17 blocking bridges, as well as socially-distributed invite tickets to prevent
18 such malicious users and/or censoring entities from joining the pool of
19 Tor clients who are able to receive distributed bridges.
21 * II. Motivation & Problem Scope
23 As it currently stands, Tor bridges which are stored within BridgeDB may be
24 freely requested by any entity at nearly any time. While the openness, that
25 is to say public accessibility, of any anonymity system certainly
26 provisions its users with the protections of a more greatly diversified
27 anonymity set, the damages to usability, and the efficacy of such an
28 anonymity system for censorship circumvention, are devastatingly impacted
29 due to the equal capabilities of both a censoring/malicious entity and an
30 honest user to request new Tor bridges.
32 Thus far, very little has been done to protect the volunteered bridges from
33 eventually being blocked in various regions. This severely restricts the
34 overall usability of Tor for clients within these regions, who, arguably,
35 can be even more in need of the identity protections and free speech
36 enablement which Tor can provide, given their political contexts.
38 ** II.A. Current Tor bridge distribution mechanisms and known pitfalls:
40 *** 1. HTTP(S) Distributor
42 At https://bridges.torproject.org, users may request new bridges, provided
43 that they are able to pass a CAPTCHA test. Requests through the HTTP(S)
44 Distributor are not allowed to be made from any current Tor exit relay,
45 and a hash of the user's actual IP address is used to place them within a
46 hash ring so that only a subset of the bridges allotted to the HTTP(S)
47 Distributor's pool may become known to a(n) adversary/user at that IP
50 **** 1.a. Known attacks/pitfalls:
52 1) An adversary with a diverse and large IP address space can easily
53 retrieve some significant portion of the bridges in the HTTPS
56 2) The relatively low cost of employing humans to solve CAPTCHAs is not
57 sufficient to deter adversaries with requisite economic resources from
58 doing so to obtain bridges. [XXX cost of employment]
60 *** 2. Email Distributor
62 Clients may send email to bridges@bridges.torproject.org with the line
63 "get bridges" in the body of the email to obtain new bridges. Such emails
64 must be sent from a Gmail or Yahoo! account, which is required under the
65 assumption that such accounts are non-trivial to obtain.
67 **** 2.a. Known attacks/pitfalls:
69 1) Mechanisms for purchasing pre-registered Gmail accounts en masse
70 exists, charging between USD$0.25 and USD$0.70 per account. With
71 roughly 1000 bridges in the Email Distributor's pool, distributing 3
72 bridges per email response,
74 * III. Terminology & Notations
75 ** III.A. Terminology Definitions
77 User := A client connecting to BridgeDB in order to obtain bridges.
81 |--------------------+---------------------------------------------------------------------------------------------|
82 | Symbol | Definition |
83 |--------------------+---------------------------------------------------------------------------------------------|
84 | U | A user connecting to BridgeDB in order to obtain bridges, identified by a User Credential |
85 | D | The bridge distributor, i.e. BridgeDB |
86 | Gᵐᵃˣ | Upper limit (maximum) number of bridge users for a bridge Bᵢ |
87 | Gˢᵗᵃʳᵗ | Number of starting users |
88 | Gᵃᵛᵍ | Average number of users per bridge |
89 | M | Fraction of users which are malicious |
91 | {B₁, …, Bᵢ, …, Bₖ} | The set of bridges assigned and given to user U |
92 | k | The number of bridges which have been given to user U |
93 | Tᵐⁱⁿ | The minimum time which a bridge must remain reachable |
94 | Tᶜᵘʳ | The current time, given in Unix Era (UE) seconds notation (an integer, seconds since epoch) |
95 | Tᵐᵃˣ | The upper bound on the time for which a user U can earn coins from Bᵢ |
96 | τᵢ | The time when bridge Bᵢ was first given to user U |
97 | tᵢ | The time from when U was first given Bᵢ to either Tᶜᵘʳ or ßᵢ, whichever is greater |
98 | ßᵢ | The time when bridge Bᵢ was first considered blocked; if not blocked, ßᵢ = 0 |
99 | ϕ | Total coins owned by user U |
100 | φᵢ | The coins which user U has earned thus far from bridge Bᵢ |
101 | ϱᵢ | Rate of earning coins from bridge Bᵢ |
102 | λᵢ | The probability that bridge Bᵢ has been blocked |
103 | ω | The last time that U requested and Invite Ticket from D |
104 |--------------------+---------------------------------------------------------------------------------------------|
108 In the original rBridge scheme, there are two separate proposals: the first
109 does not make any attempt to hide information such as the user's (U)
110 identity, the list of bridges given to U, the from BridgeDBBridgeDB is
112 In our modifications to the rBridge social bridge distribution scheme,
113 BridgeDB is considered a trusted party, that is to say, BridgeDB is
114 assumed to be honest in all protocols, and no protections are taken to
115 protect clients from malicious behaviour from BridgeDB.
117 **** Why we should still hide the Credential from BridgeDB:
121 A User Credential contains that User's list of Bridges, and thus, in all
122 probability, it uniquely identifies the User.
126 For simplicity's sake, if we falsely assume ☥ that the Bridges in a
127 User's Credential is a constant and static number, then an estimate for
128 the number of possible Credentials is given by:
131 nCₖ = ⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽⎽
134 for the binomial coefficient ⎝m⎠, where n is the number of Bridges, m is
135 the number of Bridges in a User Credential, and Γ is the gamma function.
137 With ⎝ 3 ⎠ there are 2.0820835 x 10¹⁰ possible Credentials, or, roughly
138 three unique Credentials for every one of the seven billion people alive
139 on Earth today. The binomial coefficient grows tetrationally for
140 increasing n and increasing m, [0] and so as the number of Bridge relays
141 grows over time, and with Users perpetually appending newer Bridges to
142 their Creditials, the probability of colliding Credentials decreases
143 tetrationally. Therefore, Credentials are taken to be unique.
145 Because the Credentials are uniquely identifying, care should be taken so
146 that two User Credentials cannot be linked by BridgeDB, as this would allow
147 BridgeDB to obtain a social graph of the network of Bridge Users.
148 Therefore, it is necessary to hide the Credential from BridgeDB; otherwise,
149 when requesting an Invite Ticket, the User openly sending their Credential
150 to BridgeDB to prove possession of the minimum number of Credits would be
151 linkable to the created Invite Ticket.
154 ☥ It would actually be some complicated series of binomial coefficients with
155 respect to the individual q-binomial coefficients with q being a
156 differential of the Bridge turnover w.r.t. time.
158 *** 1. BridgeDB is permitted to know the following information:
162 **** Which Bridges a User is being given
165 o How many credits a User has
167 ** IV.A. Modifications
169 The original rBridge scheme is modified to model BridgeDB as a potential
170 malicious actor. Protecting against this at this point in time is too
171 costly, both in terms of development time, as well as in network bandwidth
172 and computational overhead. Instead, prioritization should be placed on
173 eliminating BridgeDB's ability to obtain a social graph for Tor bridge
174 users, as this is not information it currently possesses.
176 The rBridge scheme utilises 1-out-of-m Oblivious Transfer (OT) to allow
177 BridgeDB to blind a set of m Bridges, letting U pick (and thus learn the
178 address of) at most one out of the m Bridges. Think of it like a stage
179 magician waving a fanned deck of cards face down, and asking an audience
180 member to "pick a card! any card!" While the authors of the original paper
181 choose Naor and Pinkas' 1-out-of-m OT scheme [2] for its efficiency, they
182 failed to specify which of Naor and Pinkas' OT schemes ― as there are four
183 within the referenced paper and several more described elsewhere. For the
184 sake of continuing the argument against their recommendations to use OT
185 within the social bridge distribution scheme, it is presumed that the
186 rBridge authors were referring to the round-optimal 1-out-of-N oblivious
187 transfer scheme in §4 of that paper.
189 During the OT process, for each Bridge in m, BridgeDB creates a Blind
190 Signature of the Bridge and tags each signature to its corresponding
191 Bridge, so that if U chooses that Bridge, she will also recieve the
192 signature. The signature schemes utilised is Au et al.'s k-TAA Blind
193 Signature scheme, [8] which requires a bilinear pairing (XXX what type?)
194 and is q-SDH secure in the standard model. That k-TAA scheme is chosen
195 because it is compatible with Zero-Knowledge Proofs-of-Knowledge (ZKPoK),
196 such that ZKPoK may be made for k-TAA signatures, as well as for
197 Commitments. Additionally, Au et al.'s k-TAA signature scheme is a
198 modification to that proposed by Camenisch and Stadler, i.e. it allows for
199 signatures on message vectors, provided that a nonce is included with the
200 message vector. See §VII.B for an open research question regarding k-TAA
203 Next, U creates a Pedersens Commitment (CMT) to the total amount of Credits
204 owned by U, and another commitment to the last time that U requested an
205 Invite Ticket. For each of these commitments, U obtains from BridgeDB
206 another k_-TAA blind signature on the commitment. Then, U constructs her
207 own Credential, consisting of the Bridge's tagged blind signature, the
208 blind signature on each of the commitments, and a hash of the nonce that
209 used as the blinding factor. (The hash of the nonce is included so that
210 multiple users may not collude to swap portions of their Credentials by
211 using the same blinding factor.) The Fiat-Shamir transformation is then
212 used to convert the aformentioned ZKPoK scheme into a Zero-Knowledge
213 Non-Interactive Proof-of-Knowledge (NIPK) scheme. With this, U send to D
214 a Proof of their Credential, without revealing any of its contents.
216 Every so often, the User requests that BridgeDB update their Credential
217 with recently earned tokens. XXX finish describing this process
219 When one of U's Bridges is "blocked", U notifies BridgeDB of the "block"
220 and, likely, if she has enough Credits to afford it, requests a new bridge.
221 In the original rBridge design, BridgeDB is only to acknowledge requests
222 for new bridges after confirming that the Bridge is indeed blocked.
224 This is where the rBridge design begins to do a bit of handwaving. Either
225 that, or they neglected both to put sufficient effort into defining the
226 term "blocked", as well as enough thought into precisely how BridgeDB might
227 check this. Take for example a User behind a corporate firewall which
228 blocks undentified encrypted protocols: that User will report her Bridges
229 as "blocked" ― and they are, for her at least ― though for everyone else
230 they work just fine. BridgeDB can easily check Bridge reachability from
231 the location of BridgeDB's server, and possibly can check bridge
232 reachability from various network vantage points around the world (though
233 doing this without *causing* the Bridge to become blocked when checking
234 from censoring regions can quickly become quite complex). [9]
236 [#]: Au, Man Ho, Willy Susilo, and Yi Mu.
237 "Proof-of-knowledge of representation of committed value and its
238 applications." Information Security and Privacy.
239 Springer Berlin Heidelberg, 2010.
240 http://web.science.mq.edu.au/conferences/acisp2010/program/Session%2010%20-%20Public%20Key%20Encryption%20and%20Protocols/10-04-AuSM10acisp.pdf
245 As mentioned, most of this proposal is based upon §IV of the rBridge
246 paper, which is the non-privacy preserving portion of the paper. [1] The
247 reasons for deferring implementation of §V include:
249 - Adding a simpler out-of-band distribution of bridges. Requiring users to
250 copy+paste Bridge lines into their torrc is ridiculous.
254 Modifications to the original rBridge scheme:
256 - Remove Oblivious Transfer, keep blind signatures and Pedersen's Commitments.
258 rBridge uses 1-out-of-m Oblivious Transfer (OT) in order to allow each
259 client to choose their own Bridges. Simply put, if a User is to be given
260 three Bridges, then 1-out-of-m OT is run three times: for each time, the
261 following steps are taken:
263 1. User picks a set of m nonces and uses them to generate point in the
267 yⱼ̍ ⟵―― ℤ*ₚ, where 1 ≤ j ≤ m
269 2. User computes a Non-Interactive Proof-of-Knowledge (NIPK) of the set
270 of nonces in the following manner:
273 ᴨ₀ = NIPK ⎨ ⎜{yⱼ̍}ⱼ₌₁⎟: ∀ⱼ₌₁⎢ Yⱼ̍ = ɡ₁ ⎥ ⎬
277 and sends ⎜{Yⱼ̍}ⱼ₌₁ ⃦ ᴨ₀⎟ to BridgeDB.
280 3. BridgeDB verifies the NIPK of the set of nonces, ᴨ₀, and then created
286 For each available bridge Bⱼ, BridgeDB randomly selects
297 and tags (Aⱼ̊,eⱼ̊,yⱼ̎) to Bⱼ.
299 4. After OT… ZKNIPK… XXX
301 Specifically, the 1-out-of-m OT scheme used within the "Part V: rBridge
302 with Privacy Preservation" section of the paper is described in
303 "Efficient oblivious transfer protocols" by M. Naor and B. Pinkas. [2] It
304 requires the use of a bilinear group pairing on a Type-3 supersingular
307 Unfortunately, there are very few FLOSS libraries which currently exist
308 for pairing-based cryptography. The one used in the benchmarking section
309 of the rBridge paper is libpbc [3] from Stanford University. Several
310 cryptographers have offhandedly remarked to me that I should not use this
311 library in any deployed system. When I mentioned the need for a vetted
312 pairing-based cryptographic library to Dr. Tanja Lange, she replied that
313 she has a graduate student working on it -- though when this new library
314 will be complete is uncertain.
316 libpbc has Python bindings, although pypbc [4] is quite incomplete and
317 only in py3k. Additionally, pypbc requires dynamic library overloading of
318 the shared object libraried for both libpbc and libgmp (the Gnu
319 Multi-Precision library, [5] which allows for calculations of arbitrary
320 precision on floats).
322 Rather than waiting for Dr. Lange's student to complete the new library,
323 I propose spending some small amount of time (not more than a couple
324 weeks) creating Python2 bindings for libpbc. From my experience, the
325 simplest, least error-prone method for creating Python bindings to C
326 libraries (and with the least amount of effort/knowledge of internal
327 Python functions involved) is to use CFFI. [7]
329 - Pedersens' Commitments
335 *** 1. User Credential
337 A Credential is a signed document obtained from BridgeDB. It contains all
338 of the state required to verify honest client behavior, and is formatted
339 as a JSON object with the following format:
342 { "BridgeLine" : BridgeLine,
343 "LearnedTS" : TimeStamp,
344 "CreditsEarned" : INT
348 "CrenditialTS" : TimeStamp,
349 "TotalUnspentCredits" : INT
352 BridgeLine := <Bridge line from BridgeDB>
356 The Timestamp in this case is the time which a user first learned the
357 existence of that bridge.
362 {'BridgeLine': '1.2.3.4:6666 obfs3 adc83b19e793491b1c6ea0fd8b46cd9f32e592fc',
364 'Timestamp': 1382078292.864117},
365 {'BridgeLine': '6.6.6.6:1234 d929c82d2ee727ccbea9c50c669a71075249899f',
367 'LearnedTS': 1382078292.864117}],
368 'CredentialTS': 982398423,
369 'TotalUnspentCredits': 10}
371 *** XXX other formats
374 ** VI.A. In which component of the Tor ecosystem should the client application code go?
375 *** 1. Should this be done as a Pluggable Transport?
379 **** 1a. It doesn't need to modify the user's application-level traffic
381 The clientside will eventually need to be able to build a circuit to the
382 BridgeDB backend, but it is not necessary that the clientside handle
383 any of the user's application level traffic. However, the clientside
384 system of rBridge must start when TBB (or tor) is started.
386 **** 1b. It needs to be able to start tor.
388 This is necessary because the lines:
393 must be present before tor is started; tor will not reload these
396 **** 1c. TorLaucher is not the correct place for this functionality.
398 I am *not* adding this to TorLauncher. The clientside of rBridge will
399 eventually need to handle a lot of complicated new cryptographic
400 primitives, including commitments and zero-knowledge proofs. This is
401 dangerous enough, period, because there aren't really any libraries
402 for Pairing-Based Cryptography yet (though Tanya Lange has mentioned
403 to me that a student of theirs should have a good one finished some
404 time this year -- but I'm still going to count that as existing like
405 a unicorn). If I am to write this, I am doing it in
406 C/Python/Python-extensions. Not JS.
408 ***** c.i It could possibly launch TorLauncher
410 In other words, this thing edits the torrc according to it's state,
411 and then either launches tor (if the user wants to use an installed
412 tor binary) or launches TorLauncher if we're running TBB.
414 **** 1d. Little-t tor is not the correct place for this either.
416 It might be possible, instead of (b) or (c), to add this to little-t
417 tor. However, I feel like the bridge distribution problem is a
418 separate to tor, which should be (more or less) strictly an
419 implementation of the onion-routing design. Additionally, I do not
420 wish to pile more code or maintenance upon eith Nick or Andrea, nor
421 do I wish to make little-t tor more monolithic.
423 I talked with Nick briefly about this at the Summer 2013 Tor Dev
424 meeting in München, and he agreed that little-t tor isn't where this
427 ** VI.B. Anonymous Authentication/Signature Schemes?
429 As the property of conditional anonymity of k-TAA blind signatures is not
430 utilised in any version of the social bridge distribution design, some
431 research should be done on other Anonymous or Partial signature schemes
432 which allow signatures to be made on message vectors. The k-TAA
433 signature scheme used in rBridge, designed by Au et al., [XXX] was based
434 off of one of Camenisch and Lysyanskaya's signature schemes. (Which one?)
436 Of particular interest, the cryptologists Camenisch and Lysyanskaya have
437 several schemes for various types of anonymous signatures, with varying
438 properties, as well as "A Formal Treatment of Onion Routing." [XXX] I am
439 under the impresseion that when they say "anonymous" they mean in the
440 strong sense (versus other cryptologists who attempt to design signature
441 schemes with "revocable anonymity", for example, trusted Centralised-PKI
442 Anonymous Proxy Signature schemes, or signature schemes with "anonymity"
443 that is revocable by a third party). [XXX]
445 Specifically, one paper, "Randomizable Proofs and Delegatable Anonymous
446 Credentials" by Camenisch and Lysyanskaya could be applicable to
447 simultaneously ensuring all of the following properties for Invite
450 * The Unlinkability of a generated Invite Ticket to one used later for
452 * Strong Anonymity for the holders of such Invite Tickets and for their
453 eventual recipients. Many "unlinkable token" schemes which rely on
454 blind signatures, i.e. Chaum's tokens, remain vulnerable to a
455 particular deanonymisation attack if the Signer is modelled as a
456 "curious" or malicious entity who stores records of the protocol
457 steps for blind signatures. [XXX explain]
461 * VII. Dependencies Upon Other Tor Software
462 ** VII.A. Tor Controllers
463 *** 1. Proposal #199: Integration of BridgeFinder and BridgeFinderHelper
465 The client-side code of BridgeDB will essentially be acting as a
466 BridgeFinder, and thus BridgeDB will require a client-side mechanism for
467 communication with various Tor Controllers. This is necessary in order to
468 present a discovery mechanism whereby a Tor Controller may learn the
469 current number of Credits and Invite Tickets available to a User, and may
470 display this information in some meaningful manner.
475 [0]: Ayad, Hanan. "Growth Rate of the Binomial Coefficient."
476 Lecture Notes on SYDE423 - Computer Algorithm Design and Analysis.
477 University of Waterloo, Canada, 2008.
478 http://www.hananayad.com/teaching/syde423/binomialCoefficient.pdf
479 [1]: http://www-users.cs.umn.edu/~hopper/rbridge_ndss13.pdf
480 [2]: Naor, Moni, and Benny Pinkas. "Efficient oblivious transfer protocols."
481 Proceedings of the twelfth annual ACM-SIAM symposium on Discrete algorithms.
482 Society for Industrial and Applied Mathematics, 2001.
483 http://www.wisdom.weizmann.ac.il/%7Enaor/PAPERS/eotp.ps
484 https://gitweb.torproject.org/user/isis/bridgedb.git/tree/doc/papers/naor2001efficient.pdf?h=feature/7520-social-dist-design
485 [3]: https://crypto.stanford.edu/pbc/
486 http://repo.or.cz/r/pbc.git
487 [4]: https://www.gitorious.org/pypbc/pages/Documentation
488 git@gitorious.org:pypbc/pypbc.git
489 [5]: http://gmplib.org/
490 [6]: https://metrics.torproject.org/formats.html#descriptortypes
491 [7]: https://bitbucket.org/cffi/cffi
492 [8]: Au, Man Ho, Willy Susilo, and Yi Mu. "Constant-size dynamic k-TAA."
493 Security and Cryptography for Networks.
494 Springer Berlin Heidelberg, 2006. 111-125.
495 http://ro.uow.edu.au/cgi/viewcontent.cgi?article=10257&context=infopapers
496 [19]: https://trac.torproject.org/projects/tor/ticket/6396#comment:16