Re: [tor-dev] Proposal 300: Walking Onions: Scaling and Saving Bandwidth

2019-02-13 Thread teor

> On 12 Feb 2019, at 04:49, Ian Goldberg  wrote:
> 
> Another issue not addressed by the current proposal is how to handle the
> "not all the relays have upgraded" problem.

And how to handle the onion service protocol (in detail).

Here's one possible migration path:
(I think it works, but we should spec these changes in detail.)

Step 0: graceful protocol upgrades on new relays

The walking onions EXTEND and CREATE cells are different from the
legacy cells. (If the walking onions CREATE cell was exactly the
same as the current CREATE cell, clients would only need to check
the current hop's protocols.)

So, when extending, a client:
* sends the certified index as an additional link specifier in
  the EXTEND cell
* if both relays support the protocol, the EXTENDED cell contains an
  ENDIVE in addition to its legacy content. Otherwise, it is a legacy
  EXTENDED cell.

For v3 onion services:
* service descriptors contain the certified index as
  *an additional* link specifier
* client intro EXTENDs contain the certified index as
  *an additional* link specifier
* client INTRODUCE cells contain the certified index as
  *an additional* link specifier
* service rendezvous EXTEND cells contain the certified index as
  *an additional* link specifier

(If we implement unknown link specifier passthrough from the v3 onion
service proposal, these protocol upgrades should happen automatically.)

For v3 single onion services:
* introduction points are looked up via a 3-hop path, like guards, using a
  random middle index
* rendezvous points are connected to directly, using their IP and ID link
  specifiers. (A 3-hop lookup is too slow for rendezvous.)
* the rest of the protocol remains the same

(v2 onion services can't support walking onions, because their protocol
isn't flexible enough.)

Step 1: require protocol upgrades on new relays

For standard paths, like Step 0, but:
* if both relays support the protocol, send the certified index as
  *the only* link specifier in the EXTEND cell

For v3 onion services:
* descriptors remain the same as step 0.
  (The link specifiers in the descriptor can be 24 hours old, so the
  client can't rely on the service's view of the intro's protocols.)
* if both relays support the new protocol, client intro
  EXTEND cells contain the certified index as *the only* link specifier
* client INTRODUCE cells remain the same as step 0.
  (To support single onion services, which need legacy link specifiers.)
* if both relays support the new protocol, service rendezvous
  EXTEND cells contain the certified index as *the only* link specifier

For v3 single onion services, the protocol remains the same:
* rendezvous points are connected to directly, using their IP and ID link
  specifiers. (A 3-hop lookup is too slow for rendezvous.)

Step 2: ignore legacy relays

Like Step 1, but:
* check the consensus for a flag that tells us to ignore legacy relays

v3 onion services continue to include legacy ID and IP link specifiers,
for older tor versions, and single onion services.

Step 3: remove legacy onion service descriptor link specifiers

Once all onion services and clients support walking onions: 
* service descriptors contain the certified index as
  *the only* link specifier. (Clients will have to make a multi-hop path.
  But that's ok, because we don't support Tor2web on v3 onion services.)
* client INTRODUCE cells continue to include legacy IP and ID
  link specifiers, to support single onion services.

This upgrade process leads to some more questions:

1. How do clients discover protocol versions?

We can do one or more of:
* ENDIVEs contain a list of supported protocol versions for each relay, or
* clients ask the current hop for a copy of its descriptor, which contains
  protocol versions (see below for tradeoffs), or
* we have a flag in the consensus that tells clients if they can safely
  ignore legacy relays

2. How do clients keep their guard information up to date?

Two options:
* They ask the guard for its descriptor.
* They re-extend to the guard via a 3-hop path

Fetching the descriptor could also help us in situations where we need
to discover less common information about the relay. But it's slower,
and it looks different to the relay, and on the wire. So we might want to
avoid it. (That said, Tor already fetches descriptors from bridges.)

3. How do we minimise Tor version distinguishers?

We should implement all the stages in a small number of Tor releases,
then active them using a consensus parameter.

We should try to implement onion service link specifier passthrough in
the same release as full onion service IPv6 support, so we have fewer
onion service version distinguishers.

If we implement it later, we might end up with:
* 2-4 IPv6 distinguishers (until these versions are unsupported)
* 1 passthrough distinguisher
* 1-3 walking onions stage 0/1/2 distinguisher(s)

T

-- 
teor
--

Re: [tor-dev] Proposal 300: Walking Onions: Scaling and Saving Bandwidth

2019-02-11 Thread Ian Goldberg
Thanks for the proposal, Nick!  I think it's definitely discussion in a
good direction!

On Wed, Feb 06, 2019 at 11:18:12AM +0100, Karsten Loesing wrote:
> On 2019-02-05 18:44, Michael Rogers wrote:
> > Argh, I'm really sorry, I thought I'd reached the end of the proposal
> > but my questions were addressed further down. Sorry for the noise.
> 
> Hang on. The issues you mentioned are indeed addressed in the proposal,
> and there are also solutions given in the proposal. But it might be that
> your solution goes beyond the one in the proposal.
> 
> It's this part in your solution:
> 
> "[...], then send *that relay's index* in its extend cell, so the relay
> receiving the extend cell wouldn't know whether the index was picked
> randomly by a client with no special requirements, or non-randomly by a
> client with special requirements?"
> 
> This is also related to the concern in 3.12 of the proposal where
> falling back to the old mechanism for route selection is said to be
> fingerprintable.
> 
> I'd be curious whether your solution is really fingerprintable.

At some point, you hit the problem that if there's a really unusual port
that not many relays will exit to, and a very-low-bandwidth relay
does support that port, then anyone extending to that relay is pretty
likely doing so in order to exit to that port.  (This happens today, not
just with Walking Onions.)  So the question is whether the solution is
*more* fingerprintable than that.

> for the wonderful future where we have tens of thousands relays.

Think bigger.  :-)

[And to be clear in the proposal itself, I was not _advocating_ using
SNARKs, but rather just pointing out that that's a thing one could
conceivably use if you really wanted to keep the current consensus
format, but still prove that this SNIP was part of it,
Cinderella[0]-style.]

[0] https://www.andrew.cmu.edu/user/bparno/papers/cinderella.pdf

Another issue not addressed by the current proposal is how to handle the
"not all the relays have upgraded" problem.

-- 
Ian Goldberg
Professor and University Research Chair
Cheriton School of Computer Science
University of Waterloo
___
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev


Re: [tor-dev] Proposal 300: Walking Onions: Scaling and Saving Bandwidth

2019-02-08 Thread Paul Syverson
Hi Nick,

This is awesome. We at NRL discussed a very similar concept starting
about a year and half ago after going over the PIR-Tor paper in a
reading group. We've left it mostly backburnered since then, though I
thought we had talked about it a few times to people at the Tor Dev
meetings.

Anyway GMTA and now we don't have to wonder when we'll get around to
it since you're doing it. The core ideas we had are in this Proposal
already I think.  Here are a few thoughts that we've discussed that I
didn't see mentioned.

For handling exits:
Including just exit ports along with the index of relays on the list
given to clients doesn't seem like much overhead. 

For ASes, MyFamily, /16 separation etc.: 
The first and (especially) middle relay could be expected to know the
full consensus and enforce these and (provably) indicate a violation
of these policies if they occur. Alternatively if a client requests of
a guard or middle relay through which it is building a circuit,
descriptors of a handful (say 5) relays selected by index, then the
client can make this decision amongst those or start again if they all
fail policy.  (Clients might also make use of previously cached
descriptors This is another potential source of leakage, which is
reduced by including a relay index of an already cached descriptor in
a request if it is a candidate to be selected since it is know to
match, e.g., needed exit ports as well as family, etc. constraints.)
More issues, but it's an idea probably worth contemplating.

aloha,
Paul


On Tue, Feb 05, 2019 at 12:02:50PM -0500, Nick Mathewson wrote:
> Filename: 300-walking-onions.txt
> Title: Walking Onions: Scaling and Saving Bandwidth
> Author: Nick Mathewson
> Created: 5-Feb-2019
> Status: Draft
> 
> 0. Status
> 
>This proposal describes a mechanism called "Walking Onions" for
>scaling the Tor network and reducing the amount of client bandwidth
>used to maintain a client's view of the Tor network.
> 
>This is a draft proposal; there are problems left to be solved and
>questions left to be answered.  Once those parts are done, we can
>fill in section 4 with the final details of the design.
> 
> 1. Introduction
> 
>In the current Tor network design, we assume that every client has a
>complete view of all the relays in the network.  To achieve this,
>clients download consensus directories at regular intervals, and
>download descriptors for every relay listed in the directory.
> 
>The substitution of microdescriptors for regular descriptors
>(proposal 158) and the use of consensus diffs (proposal 140) have
>lowered the bytes that clients must dedicate to directory operations.
>But we still face the problem that, if we force each client to know
>about every relay in the network, each client's directory traffic
>will grow linearly with the number of relays in the network.
> 
>Another drawback in our current system is that client directory
>traffic is front-loaded: clients need to fetch an entire directory
>before they begin building circuits.  This places extra delays on
>clients, and extra load on the network.
> 
>To anonymize the world, we will need to scale to a much larger number
>of relays and clients: requiring clients to know about every relay in
>the set simply won't scale, and requiring every new client to download
>a large document is also problematic.
> 
>There are obvious responses here, and some other anonymity tools have
>taken them.  It's possible to have a client only use a fraction of
>the relays in a network--but doing so opens the client to _epistemic
>attacks_, in which the difference in clients' views of the
>network is used to partition their traffic.  It's also possible to
>move the problem of selecting relays from the client to the relays
>themselves, and let each relay select the next relay in turn--but
>this choice opens the client to _route capture attacks_, in which a
>malicious relay selects only other malicious relays.
> 
>In this proposal, I'll describe a design for eliminating up-front
>client directory downloads.  Clients still choose relays at random,
>but without ever having to hold a list of all the relays. This design
>does not require clients to trust relays any more than they do today,
>or open clients to epistemic attacks.
> 
>I hope to maintain feature parity with the current Tor design; I'll
>list the places in which I haven't figured out how to do so yet.
> 
>I'm naming this design "walking onions".  The walking onion (Allium x
>proliferum) reproduces by growing tiny little bulbs at the
>end of a long stalk.  When the stalk gets too top-heavy, it flops
>over, and the little bulbs start growing somewhere new.
> 
>The rest of this document will run as follows.  In section 2, I'll
>explain the ideas behind the "walking onions" design, and how they
>can eliminate the 

Re: [tor-dev] Proposal 300: Walking Onions: Scaling and Saving Bandwidth

2019-02-07 Thread Nick Mathewson
On Wed, Feb 6, 2019 at 10:45 PM Nicholas Hopper  wrote:
 [...]
>
> This is very cool.  One thing that comes to mind reading the proposal
> is that you will either want some fancy sorting scheme to try to make ranges
> (nearly) consistent across ENDIVEs, OR will want to have the Relay commit
> to an ENDIVE version before the client sends an index (otherwise an
> adversarial relay group can increase their effective weight by a factor of # 
> of
> acceptable ENDIVE versions).

That's right.  I had been think that we wouldn't go too wrong if we
sorted by identity, since bandwidth doesn't change too much from hour
to hour.  Another possibility to investigate is putting out ENDIVES
less frequently than we currently put out consensus directories.

But I like your commitment idea better, if we can make it work: as
part of its CREATED, a relay could promise that it would use a certain
ENDIVE for any extend attempts in the next N minutes.  We'd need to
make sure that this was authenticated by the create/created handshake,
but I think that should be doable.

cheers,
-- 
Nick
___
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev


Re: [tor-dev] Proposal 300: Walking Onions: Scaling and Saving Bandwidth

2019-02-06 Thread Nicholas Hopper
Hi Nick!

On Tue, Feb 5, 2019 at 11:03 AM Nick Mathewson  wrote:
>
> Filename: 300-walking-onions.txt
> Title: Walking Onions: Scaling and Saving Bandwidth
> Author: Nick Mathewson
> Created: 5-Feb-2019
> Status: Draft

...

> 2.3. Extending by certified index
...
>Here's how it works: let's have the authorities make a new kind of
>consensus-like thing.  We'll call it an Efficient Network Directory
>with Individually Verifiable Entries, or "ENDIVE" for short.  This
>will differ from the client's index table above in two ways.  First,
>every entry in the ENDIVE is normalized so that the bandwidth
>weights maximum index is 2^32-1:
>
>Relay  Normalized weightRange of index values
>R1 0x5546   0x..0x5545
>R2 0x4438   0x5546..0x997d
>R3 0x332a   0x997e..0xcca7
>R4 0x221c   0xcca8..0xeec3
>R5 0x113c   0xeec4..0x
>
>Second, every entry in the ENDIVE is timestamped and signed by the
>authorities independently, so that when a client sees a line from the
>table above, it can verify that it came from an authentic ENDIVE.
>When a client has chosen a random index, one of these entries will
>prove to the client that a given relay corresponds to that index.
>Because of this property, we'll be calling these entries "Separable
>Network Index Proofs", or "SNIP"s for short.
>
>For example, a single SNIP from the table above might consist of:
>  * A range of times during which this SNIP is valid
>  * R1's identity
>  * R1's ntor onion key
>  * R1's address
>  * The index range 0x..0x5545
>  * A signature of all of the above, by a number of authorities
>
>Let's put it together. Suppose that the client has a circuit from
>A->B, and it wants to extend to a random relay, chosen randomly
>weighted by bandwidth.
>
>1. The client picks a random index value between 0 and 2**32 - 1.  It
>   sends that index to relay B in its EXTEND cell, along with a
>   g^x value for the ntor handshake.
>
>   Note: the client doesn't send an address or identity for the next
>   relay, since it doesn't know what relay it has chosen!  (The
>   combination of an index and a g^x value is what I'm calling a
>   "walking onion".)
>
>2. Now, relay B looks up the index in its most recent ENDIVE, to
>   learn which relay the client selected.
>
>   (For example, suppose that the client's random index value is
>   0x5001.  This index value falls between 0x and
>   0x5546 in the table above, so the relay B sees that the client
>   has chosen R1 as its next hop.)
>
>3. Relay B sends a create cell to R1 as usual.  When it gets a
>   CREATED reply, it includes the authority-signed SNIP for
>   R1 as part of the EXTENDED cell.
>
>4. As part of verifying the handshake, the client verifies that the
>   SNIP was signed by enough authorities, that its timestamp
>   is recent enough, and that it actually corresponds to the
>   random index that the client selected.

This is very cool.  One thing that comes to mind reading the proposal
is that you will either want some fancy sorting scheme to try to make ranges
(nearly) consistent across ENDIVEs, OR will want to have the Relay commit
to an ENDIVE version before the client sends an index (otherwise an
adversarial relay group can increase their effective weight by a factor of # of
acceptable ENDIVE versions).

>
>Notice the properties we have with this design:
>
>- Clients can extend circuits without having a list of all the
>  relays.
>
>- Because the client's random index needs to match a routing
>  entry signed by the authorities, the client is still selecting
>  a relay randomly by weight.  A hostile relay cannot choose
>  which relay to send the client.
>
>
>On a failure to extend, a relay should still report the routing entry
>for the other relay that it couldn't connect to.  As before, a client
>will start a new circuit if a partially constructed circuit is a
>partial failure.
>
>
>We could achieve a reliability/security tradeoff by letting clients
>offer the relay a choice of two or more indices to extend to.
>This would help reliability, but give the relay more influence over
>the path.  We'd need to analyze this impact.
>
>
>In the next section, I'll discuss a bunch of details that we need to
>straighten out in order to make this design work.
>
>
> 3. Sorting out the details.
>
> 3.1. Will these routing entries fit in EXTEND2 and EXTENDED2 cells?
>
>The EXTEND2 cell is probably big enough for this design.  The random
>index that the client sends can be a new "link specifier" type,
>replacing the IP and identity 

Re: [tor-dev] Proposal 300: Walking Onions: Scaling and Saving Bandwidth

2019-02-06 Thread Karsten Loesing
On 2019-02-05 18:44, Michael Rogers wrote:
> Argh, I'm really sorry, I thought I'd reached the end of the proposal
> but my questions were addressed further down. Sorry for the noise.

Hang on. The issues you mentioned are indeed addressed in the proposal,
and there are also solutions given in the proposal. But it might be that
your solution goes beyond the one in the proposal.

It's this part in your solution:

"[...], then send *that relay's index* in its extend cell, so the relay
receiving the extend cell wouldn't know whether the index was picked
randomly by a client with no special requirements, or non-randomly by a
client with special requirements?"

This is also related to the concern in 3.12 of the proposal where
falling back to the old mechanism for route selection is said to be
fingerprintable.

I'd be curious whether your solution is really fingerprintable.

All in all, I'm excited to see this proposal! This seems like a huge
step forward for clients with limited bandwidth and for the wonderful
future where we have tens of thousands relays.

All the best,
Karsten


> 
> Cheers,
> Michael
> 
> On 05/02/2019 17:42, Michael Rogers wrote:
>> I'm very happy to see this proposal! Two quick questions about relay
>> selection:
>>
>> * Can a client specify that it wants an exit node whose policy allows
>> something unusual, e.g. exiting to a port that's not allowed by the
>> default policy? If not, does the client need to keep picking exit nodes
>> until it gets a SNIP with a suitable policy?
>>
>> * Similarly, if a client has restrictions on the guard nodes it can
>> connect to (fascist firewall or IPv4/v6 restrictions, for example), does
>> it need to keep picking guards via the directory fallback circuit until
>> it gets a suitable one?
>>
>> In both cases, perhaps a client with unusual requirements could first
>> download the consensus, find a relay matching its requirements, then
>> send that relay's index in its extend cell, so the relay receiving the
>> extend cell wouldn't know whether the index was picked randomly by a
>> client with no special requirements, or non-randomly by a client with
>> special requirements?
>>
>> I think this would allow the majority of clients to save bandwidth by
>> not downloading the consensus, without allowing relays to distinguish
>> the minority of clients with unusual exit/guard requirements. (The
>> presence of the full consensus on disk would indicate that the client
>> had unusual exit/guard requirements at some point, however.)
>>
>> Cheers,
>> Michael
>>
>> On 05/02/2019 17:02, Nick Mathewson wrote:
>>> Filename: 300-walking-onions.txt
>>> Title: Walking Onions: Scaling and Saving Bandwidth
>>> Author: Nick Mathewson
>>> Created: 5-Feb-2019
>>> Status: Draft
>>>
>>> 0. Status
>>>
>>>This proposal describes a mechanism called "Walking Onions" for
>>>scaling the Tor network and reducing the amount of client bandwidth
>>>used to maintain a client's view of the Tor network.
>>>
>>>This is a draft proposal; there are problems left to be solved and
>>>questions left to be answered.  Once those parts are done, we can
>>>fill in section 4 with the final details of the design.
>>>
>>> 1. Introduction
>>>
>>>In the current Tor network design, we assume that every client has a
>>>complete view of all the relays in the network.  To achieve this,
>>>clients download consensus directories at regular intervals, and
>>>download descriptors for every relay listed in the directory.
>>>
>>>The substitution of microdescriptors for regular descriptors
>>>(proposal 158) and the use of consensus diffs (proposal 140) have
>>>lowered the bytes that clients must dedicate to directory operations.
>>>But we still face the problem that, if we force each client to know
>>>about every relay in the network, each client's directory traffic
>>>will grow linearly with the number of relays in the network.
>>>
>>>Another drawback in our current system is that client directory
>>>traffic is front-loaded: clients need to fetch an entire directory
>>>before they begin building circuits.  This places extra delays on
>>>clients, and extra load on the network.
>>>
>>>To anonymize the world, we will need to scale to a much larger number
>>>of relays and clients: requiring clients to know about every relay in
>>>the set simply won't scale, and requiring every new client to download
>>>a large document is also problematic.
>>>
>>>There are obvious responses here, and some other anonymity tools have
>>>taken them.  It's possible to have a client only use a fraction of
>>>the relays in a network--but doing so opens the client to _epistemic
>>>attacks_, in which the difference in clients' views of the
>>>network is used to partition their traffic.  It's also possible to
>>>move the problem of selecting relays from the client to the relays
>>>themselves, and let each relay select the 

Re: [tor-dev] Proposal 300: Walking Onions: Scaling and Saving Bandwidth

2019-02-05 Thread teor


Hi Nick,

Thanks for posting this initial draft. I enjoyed reading more of the details, 
after hearing about it last week.

On February 5, 2019 5:02:50 PM UTC, Nick Mathewson  wrote:
>Filename: 300-walking-onions.txt
>Title: Walking Onions: Scaling and Saving Bandwidth
>Author: Nick Mathewson
>Created: 5-Feb-2019
>Status: Draft
>
>0. Status
>
>   This proposal describes a mechanism called "Walking Onions" for
>   scaling the Tor network and reducing the amount of client bandwidth
>   used to maintain a client's view of the Tor network.

...

>   4. As part of verifying the handshake, the client verifies that the
>  SNIP was signed by enough authorities, that its timestamp
>  is recent enough, and that it actually corresponds to the
>  random index that the client selected.

Let's make sure that we check the signature *first*, before parsing the rest of 
the document. (Maybe that's something we can specify when we write the detailed 
section 4.)

Tor's current directory parsing implementation parses the document, then checks 
the signature. This order makes some parsing bugs easier to trigger, because 
they don't require a valid set of authority signatures.

We could encourage implementers to check the signature first by putting it 
first in the document, or adding a signature offset field to the header. Or we 
could document this issue in a security considerations section, and hope all 
the implementers read it.

T

--
teor
--
___
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev


Re: [tor-dev] Proposal 300: Walking Onions: Scaling and Saving Bandwidth

2019-02-05 Thread Michael Rogers
Argh, I'm really sorry, I thought I'd reached the end of the proposal
but my questions were addressed further down. Sorry for the noise.

Cheers,
Michael

On 05/02/2019 17:42, Michael Rogers wrote:
> I'm very happy to see this proposal! Two quick questions about relay
> selection:
> 
> * Can a client specify that it wants an exit node whose policy allows
> something unusual, e.g. exiting to a port that's not allowed by the
> default policy? If not, does the client need to keep picking exit nodes
> until it gets a SNIP with a suitable policy?
> 
> * Similarly, if a client has restrictions on the guard nodes it can
> connect to (fascist firewall or IPv4/v6 restrictions, for example), does
> it need to keep picking guards via the directory fallback circuit until
> it gets a suitable one?
> 
> In both cases, perhaps a client with unusual requirements could first
> download the consensus, find a relay matching its requirements, then
> send that relay's index in its extend cell, so the relay receiving the
> extend cell wouldn't know whether the index was picked randomly by a
> client with no special requirements, or non-randomly by a client with
> special requirements?
> 
> I think this would allow the majority of clients to save bandwidth by
> not downloading the consensus, without allowing relays to distinguish
> the minority of clients with unusual exit/guard requirements. (The
> presence of the full consensus on disk would indicate that the client
> had unusual exit/guard requirements at some point, however.)
> 
> Cheers,
> Michael
> 
> On 05/02/2019 17:02, Nick Mathewson wrote:
>> Filename: 300-walking-onions.txt
>> Title: Walking Onions: Scaling and Saving Bandwidth
>> Author: Nick Mathewson
>> Created: 5-Feb-2019
>> Status: Draft
>>
>> 0. Status
>>
>>This proposal describes a mechanism called "Walking Onions" for
>>scaling the Tor network and reducing the amount of client bandwidth
>>used to maintain a client's view of the Tor network.
>>
>>This is a draft proposal; there are problems left to be solved and
>>questions left to be answered.  Once those parts are done, we can
>>fill in section 4 with the final details of the design.
>>
>> 1. Introduction
>>
>>In the current Tor network design, we assume that every client has a
>>complete view of all the relays in the network.  To achieve this,
>>clients download consensus directories at regular intervals, and
>>download descriptors for every relay listed in the directory.
>>
>>The substitution of microdescriptors for regular descriptors
>>(proposal 158) and the use of consensus diffs (proposal 140) have
>>lowered the bytes that clients must dedicate to directory operations.
>>But we still face the problem that, if we force each client to know
>>about every relay in the network, each client's directory traffic
>>will grow linearly with the number of relays in the network.
>>
>>Another drawback in our current system is that client directory
>>traffic is front-loaded: clients need to fetch an entire directory
>>before they begin building circuits.  This places extra delays on
>>clients, and extra load on the network.
>>
>>To anonymize the world, we will need to scale to a much larger number
>>of relays and clients: requiring clients to know about every relay in
>>the set simply won't scale, and requiring every new client to download
>>a large document is also problematic.
>>
>>There are obvious responses here, and some other anonymity tools have
>>taken them.  It's possible to have a client only use a fraction of
>>the relays in a network--but doing so opens the client to _epistemic
>>attacks_, in which the difference in clients' views of the
>>network is used to partition their traffic.  It's also possible to
>>move the problem of selecting relays from the client to the relays
>>themselves, and let each relay select the next relay in turn--but
>>this choice opens the client to _route capture attacks_, in which a
>>malicious relay selects only other malicious relays.
>>
>>In this proposal, I'll describe a design for eliminating up-front
>>client directory downloads.  Clients still choose relays at random,
>>but without ever having to hold a list of all the relays. This design
>>does not require clients to trust relays any more than they do today,
>>or open clients to epistemic attacks.
>>
>>I hope to maintain feature parity with the current Tor design; I'll
>>list the places in which I haven't figured out how to do so yet.
>>
>>I'm naming this design "walking onions".  The walking onion (Allium x
>>proliferum) reproduces by growing tiny little bulbs at the
>>end of a long stalk.  When the stalk gets too top-heavy, it flops
>>over, and the little bulbs start growing somewhere new.
>>
>>The rest of this document will run as follows.  In section 2, I'll
>>explain the ideas behind 

Re: [tor-dev] Proposal 300: Walking Onions: Scaling and Saving Bandwidth

2019-02-05 Thread Michael Rogers
I'm very happy to see this proposal! Two quick questions about relay
selection:

* Can a client specify that it wants an exit node whose policy allows
something unusual, e.g. exiting to a port that's not allowed by the
default policy? If not, does the client need to keep picking exit nodes
until it gets a SNIP with a suitable policy?

* Similarly, if a client has restrictions on the guard nodes it can
connect to (fascist firewall or IPv4/v6 restrictions, for example), does
it need to keep picking guards via the directory fallback circuit until
it gets a suitable one?

In both cases, perhaps a client with unusual requirements could first
download the consensus, find a relay matching its requirements, then
send that relay's index in its extend cell, so the relay receiving the
extend cell wouldn't know whether the index was picked randomly by a
client with no special requirements, or non-randomly by a client with
special requirements?

I think this would allow the majority of clients to save bandwidth by
not downloading the consensus, without allowing relays to distinguish
the minority of clients with unusual exit/guard requirements. (The
presence of the full consensus on disk would indicate that the client
had unusual exit/guard requirements at some point, however.)

Cheers,
Michael

On 05/02/2019 17:02, Nick Mathewson wrote:
> Filename: 300-walking-onions.txt
> Title: Walking Onions: Scaling and Saving Bandwidth
> Author: Nick Mathewson
> Created: 5-Feb-2019
> Status: Draft
> 
> 0. Status
> 
>This proposal describes a mechanism called "Walking Onions" for
>scaling the Tor network and reducing the amount of client bandwidth
>used to maintain a client's view of the Tor network.
> 
>This is a draft proposal; there are problems left to be solved and
>questions left to be answered.  Once those parts are done, we can
>fill in section 4 with the final details of the design.
> 
> 1. Introduction
> 
>In the current Tor network design, we assume that every client has a
>complete view of all the relays in the network.  To achieve this,
>clients download consensus directories at regular intervals, and
>download descriptors for every relay listed in the directory.
> 
>The substitution of microdescriptors for regular descriptors
>(proposal 158) and the use of consensus diffs (proposal 140) have
>lowered the bytes that clients must dedicate to directory operations.
>But we still face the problem that, if we force each client to know
>about every relay in the network, each client's directory traffic
>will grow linearly with the number of relays in the network.
> 
>Another drawback in our current system is that client directory
>traffic is front-loaded: clients need to fetch an entire directory
>before they begin building circuits.  This places extra delays on
>clients, and extra load on the network.
> 
>To anonymize the world, we will need to scale to a much larger number
>of relays and clients: requiring clients to know about every relay in
>the set simply won't scale, and requiring every new client to download
>a large document is also problematic.
> 
>There are obvious responses here, and some other anonymity tools have
>taken them.  It's possible to have a client only use a fraction of
>the relays in a network--but doing so opens the client to _epistemic
>attacks_, in which the difference in clients' views of the
>network is used to partition their traffic.  It's also possible to
>move the problem of selecting relays from the client to the relays
>themselves, and let each relay select the next relay in turn--but
>this choice opens the client to _route capture attacks_, in which a
>malicious relay selects only other malicious relays.
> 
>In this proposal, I'll describe a design for eliminating up-front
>client directory downloads.  Clients still choose relays at random,
>but without ever having to hold a list of all the relays. This design
>does not require clients to trust relays any more than they do today,
>or open clients to epistemic attacks.
> 
>I hope to maintain feature parity with the current Tor design; I'll
>list the places in which I haven't figured out how to do so yet.
> 
>I'm naming this design "walking onions".  The walking onion (Allium x
>proliferum) reproduces by growing tiny little bulbs at the
>end of a long stalk.  When the stalk gets too top-heavy, it flops
>over, and the little bulbs start growing somewhere new.
> 
>The rest of this document will run as follows.  In section 2, I'll
>explain the ideas behind the "walking onions" design, and how they
>can eliminate the need for regular directory downloads.  In section 3, I'll
>answer a number of follow-up questions that arise, and explain how to
>keep various features in Tor working.  Section 4 (not yet written)
>will elaborate all the details needed