I spent some time trying to clean up proposal 247 based on everyone's
comments, as well as based on my own thoughts. Please have a look if you
commented on the original proposal, and complain if I've not taken your
thoughts into account.
(Aaron: In particular, I made several tradeoffs in favor of performance
and DoS resistance that may be at odds with some of your suggestions,
but I think the end result is still OK after looking into the Sybil
rates and thinking about the adversary model in more detail. You may
disagree).
I've attached my updated version of the proposal inline in this mail,
but the canonical updated proposal is in my remote at:
https://gitweb.torproject.org/user/mikeperry/torspec.git/tree/proposals/247…
Here's a summary of the changes (which are also listed in Git):
* Try to make a coherent threat model and specify its assumptions
* Fold in my comments about using disjoint sets ("buckets") for the
third level guard.
* Make the parameter discussion subsection its own section, and include
tables with far more detail for the Sybil success rates.
* Put the rotation period in a separate subsection from the number of
guards
* Switch to using min(X,X) and max(X,X) for the distribution for the
second and third layer guard lifespans, respectively. Add a
subsection describing this distribution (3.2.3)
* Changed the default parameters based on these tables, and based on my own
intuition about Tor's performance properties.
* Move the load balancing, torrc, and other performance considerations to
their own section (Section 5).
* Move "3.2. Distinguishing new HS circuits from normal HS circuits" to
section 4.1.
* Fold in some of "3.3. Circuit nodes can now be linked to specific hidden
services" into 4.1. Some of it I just removed, though, because I did not
find it credible.
* Added Roger's concerns about guard linkability to Section 4.2.
* Added a denial of service subsection to Section 4.3.
================================
Filename: 247-hs-guard-discovery.txt
Title: Defending Against Guard Discovery Attacks using Vanguards
Author: George Kadianakis
Created: 2015-07-10
Status: Draft
0. Motivation
A guard discovery attack allow attackers to determine the guard
node of a Tor client. The hidden service rendezvous protocol
provides an attack vector for a guard discovery attack since anyone
can force an HS to construct a 3-hop circuit to a relay (#9001).
Following the guard discovery attack with a compromise and/or
coercion of the guard node can lead to the deanonymization of a
hidden service.
1. Overview
This document tries to make the above guard discovery + compromise
attack harder to launch. It introduces an optional configuration
option which makes the hidden service also pin the second and third
hops of its circuits for a longer duration.
With this new path selection, we force the adversary to perform a
Sybil attack and two compromise attacks before succeeding. This is
an improvement over the current state where the Sybil attack is
trivial to pull off, and only a single compromise attack is required.
With this new path selection, an attacker is forced to do a one or
more node compromise attacks before learning the guard node of a hidden
service. This increases the uncertainty of the attacker, since
compromise attacks are costly and potentially detectable, so an
attacker will have to think twice before beginning a chain of node
compromise attacks that he might not be able to complete.
1.1. Visuals
Here is how a hidden service rendezvous circuit currently looks like:
-> middle_1 -> middle_A
-> middle_2 -> middle_B
-> middle_3 -> middle_C
-> middle_4 -> middle_D
HS -> guard -> middle_5 -> middle_E -> Rendezvous Point
-> middle_6 -> middle_F
-> middle_7 -> middle_G
-> middle_8 -> middle_H
-> ... -> ...
-> middle_n -> middle_n
this proposal pins the two middles nodes to a much more restricted
set, as follows:
-> guard_3A_A
-> guard_2_A -> guard_3A_B
-> guard_3A_C -> Rendezvous Point
HS -> guard_1
-> guard_3B_D
-> guard_2_B -> guard_3B_E
-> guard_3B_F -> Rendezvous Point
Note that the third level guards are partitioned into buckets such that
they are only used with one specific second-level guard. In this way,
we ensure that even if an adversary is able to execute a Sybil attack
against the third layer, they only get to learn one of the second-layer
Guards, and not all of them. This prevents the adversary from gaining
the ability to take their pick of the weakest of the second-level
guards for further attack.
2. Design
This feature requires the HiddenServiceGuardDiscovery torrc option
to be enabled.
When a hidden service picks its guard nodes, it also picks two
additional sets of middle nodes `second_guard_set` and
`third_guard_set` of size NUM_SECOND_GUARDS and NUM_THIRD_GUARDS
respectively for each hidden service. These sets are unique to each
hidden service created by a single Tor client, and must be kept separate
and distinct.
When a hidden service needs to establish a circuit to an HSDir,
introduction point or a rendezvous point, it uses nodes from
`second_guard_set` as the second hop of the circuit and nodes from
that second hop's corresponding `third_guard_set` as third hops of
the circuit.
A hidden service rotates nodes from the 'second_guard_set' at a random
time between MIN_SECOND_GUARD_LIFETIME hours and
MAX_SECOND_GUARD_LIFETIME hours.
A hidden service rotates nodes from the 'third_guard_set' at a random
time between MIN_THIRD_GUARD_LIFETIME and MAX_THIRD_GUARD_LIFETIME
hours.
These extra guard nodes should be picked with the same path selection
procedure that is used for regular middle nodes (though see Section
5.1 for performance reasons to restrict this slightly).
Each node's rotation time is tracked independently, to avoid disclosing
the rotation times of the primary and second-level guards.
XXX how should proposal 241 ("Resisting guard-turnover attacks") be
applied here?
2.1. Security parameters
We set NUM_SECOND_GUARDS to 4 nodes and NUM_THIRD_GUARDS to 16 nodes (ie
four sets of four).
XXX: 3 and 12 might be another option here, in which case our rotation
period for the second guard position can be reduced to 15 days.
We set MIN_SECOND_GUARD_LIFETIME to 1 day, and
MAX_SECOND_GUARD_LIFETIME to 33 days, for an average rotation rate of
~11 days, using the min(X,X) distribution specified in Section 3.2.2.
We set MIN_THIRD_GUARD_LIFETIME to 1 hour, and MAX_THIRD_GUARD_LIFETIME
to 18 hours, for an average rotation rate of ~12 hours, using the max(X,X)
distribution specified in Section 3.2.2.
XXX make all the above consensus parameters? Yes. Very yes, especially
if we decide to change the primary guard lifespan.
See Section 3 for more analysis on these constants.
3. Rationale and Security Parameter Selection
3.1. Threat model, Assumptions, and Goals
Consider an adversary with the following powers:
- Can launch a Sybil guard discovery attack against any node of a
rendezvous circuit. The slower the rotation period of the node,
the longer the attack takes. Similarly, the higher the percentage
of the network is compromised, the faster the attack runs.
- Can compromise any node on the network, but this compromise takes
time and potentially even coercive action, and also carries risk
of discovery.
We also make the following assumptions about the types of attacks:
1. A Sybil attack is noisy. It will require either large amounts of traffic,
multiple test circuits, or both.
2. A Sybil attack against the second or first layer Guards will be
more noisy than a Sybil attack against the third layer guard, since the
second and first layer Sybil attack requires a timing side channel in
order to determine success, where as the Sybil success is almost
immediately obvious to third layer guard, since it will now be returned
as a rend point for circuits for the hidden service in question.
3. As soon as the adversary is confident they have won the Sybil attack,
an even more aggressive circuit building attack will allow them to
determine the next node very fast (an hour or less).
4. The adversary is strongly disincentivized from compromising nodes that
may prove useless, as node compromise is even more risky for the
adversary than a Sybil attack in terms of being noticed.
Given this threat model, our security parameters were selected so that
the first two layers of guards should be hard to attack using a Sybil
guard discovery attack and hence require a node compromise attack. Ideally,
we want the node compromise attacks to carry a non-negligible probability of
being useless to the adversary by the time they complete.
On the other hand, the outermost layer of guards should rotate fast enough to
_require_ a Sybil attack.
3.2. Parameter Tuning
3.2.1. Sybil rotation counts for a given number of Guards
The probability of Sybil success for Guard discovery can be modeled as
the probability of choosing 1 or more malicious middle nodes for a
sensitive circuit over some period of time.
P(At least 1 bad middle) = 1 - P(All Good Middles)
= 1 - P(One Good middle)^(num_middles)
= 1 - (1 - c/n)^(num_middles)
c/n is the adversary compromise percentage
In the case of Vanguards, num_middles is the number of Guards you rotate
through in a given time period. This is a function of the number of vanguards
in that position (v), as well as the number of rotations (r).
P(At least one bad middle) = 1 - (1 - c/n)^(v*r)
Here's detailed tables in terms of the number of rotations required for
a given Sybil success rate for certain number of guards.
1.0% Network Compromise:
Sybil Success One Two Three Four Five Six Eight Nine Ten Twelve Sixteen
10% 11 6 4 3 3 2 2 2 2 1 1
15% 17 9 6 5 4 3 3 2 2 2 2
25% 29 15 10 8 6 5 4 4 3 3 2
50% 69 35 23 18 14 12 9 8 7 6 5
60% 92 46 31 23 19 16 12 11 10 8 6
75% 138 69 46 35 28 23 18 16 14 12 9
85% 189 95 63 48 38 32 24 21 19 16 12
90% 230 115 77 58 46 39 29 26 23 20 15
95% 299 150 100 75 60 50 38 34 30 25 19
99% 459 230 153 115 92 77 58 51 46 39 29
5.0% Network Compromise:
Sybil Success One Two Three Four Five Six Eight Nine Ten Twelve Sixteen
10% 3 2 1 1 1 1 1 1 1 1 1
15% 4 2 2 1 1 1 1 1 1 1 1
25% 6 3 2 2 2 1 1 1 1 1 1
50% 14 7 5 4 3 3 2 2 2 2 1
60% 18 9 6 5 4 3 3 2 2 2 2
75% 28 14 10 7 6 5 4 4 3 3 2
85% 37 19 13 10 8 7 5 5 4 4 3
90% 45 23 15 12 9 8 6 5 5 4 3
95% 59 30 20 15 12 10 8 7 6 5 4
99% 90 45 30 23 18 15 12 10 9 8 6
10.0% Network Compromise:
Sybil Success One Two Three Four Five Six Eight Nine Ten Twelve Sixteen
10% 2 1 1 1 1 1 1 1 1 1 1
15% 2 1 1 1 1 1 1 1 1 1 1
25% 3 2 1 1 1 1 1 1 1 1 1
50% 7 4 3 2 2 2 1 1 1 1 1
60% 9 5 3 3 2 2 2 1 1 1 1
75% 14 7 5 4 3 3 2 2 2 2 1
85% 19 10 7 5 4 4 3 3 2 2 2
90% 22 11 8 6 5 4 3 3 3 2 2
95% 29 15 10 8 6 5 4 4 3 3 2
99% 44 22 15 11 9 8 6 5 5 4 3
The rotation counts in these tables were generated with:
def count_rotations(c, v, success):
r = 0
while 1-math.pow((1-c), v*r) < success: r += 1
return r
3.2.2. Rotation Period
As specified in Section 3.1, the primary driving force for the third
layer selection was to ensure that these nodes rotate fast enough that
it is not worth trying to compromise them, because it is unlikely for
compromise to succeed and yield useful information before the nodes stop
being used. For this reason we chose 1 to 18 hours, with a weighted
distribution (Section 3.2.3) causing the expected average to be 12 hours.
From the table in Section 3.2.1, it can be seen that this means that the
Sybil attack will complete with near-certainty (99%) in 29*12 hours
(14.5 days) for the 1% adversary, 3 days for the 5% adversary, and
1.5 days for the 10% adversary.
Since rotation of each node happens independently, the distribution of
when the adversary expects to win this Sybil attack in order to discover
the next node up is uniform. This means that on average, the adversary
should expect that half of the rotation period of the next node is already
over by the time that they win the Sybil.
With this fact, we choose our range and distribution for the second
layer rotation to be short enough to cause the adversary to risk
compromising nodes that are useless, yet long enough to require a
Sybil attack to be noticeable in terms of client activity. For this
reason, we choose a minimum second-layer guard lifetime of 1 day,
since this gives the adversary a minimum expected value of 12 hours for
during which they can compromise a guard before it might be rotated.
If the total expected rotation rate is 11 days, then the adversary can
expect overall to have 5.5 days remaining after completing their Sybil
attack before a second-layer guard rotates away.
3.2.3. Rotation distribution
In order to skew the distribution of the third layer guard towards
higher values, we use max(X,X) for the distribution, where X is a
random variable that takes on values from the uniform distribution.
In order to skew the distribution of the second layer guard towards
low values (to increase the risk of compromising useless nodes) we
skew the distribution towards lower values, using min(X,X).
Here's a table of expectation (arithmetic means) for relevant
ranges of X (sampled from 0..N).
The current choice for second-layer guards is noted with **, and
the current choice for third-layer guards is noted with ***.
Range Min(X,X) Max(X,X)
10 2.85 6.15
11 3.18 6.82
12 3.51 7.49
13 3.85 8.15
14 4.18 8.82
15 4.51 9.49
16 4.84 10.16
17 5.18 10.82***
18 5.51 11.49
19 5.84 12.16
20 6.18 12.82
21 6.51 13.49
22 6.84 14.16
23 7.17 14.83
24 7.51 15.49
25 7.84 16.16
26 8.17 16.83
27 8.51 17.49
28 8.84 18.16
29 9.17 18.83
30 9.51 19.49
31 9.84 20.16
32 10.17** 20.83
33 10.51 21.49
34 10.84 22.16
35 11.17 22.83
36 11.50 23.50
37 11.84 24.16
38 12.17 24.83
39 12.50 25.50
4. Security concerns and mitigations
4.1. Mitigating fingerprinting of new HS circuits
By pinning the middle nodes of rendezvous circuits, we make it
easier for all hops of the circuit to detect that they are part of a
special hidden service circuit with varying degrees of certainty.
The Guard node is able to recognize a Vanguard client with a high
degree of certainty because it will observe a client IP creating the
overwhelming majority of its circuits to just a few middle nodes in
any given 10-18 day time period.
The middle nodes will be able to tell with a variable certainty that
depends on both its traffic volume and upon the popularity of the
service, because they will see a large number of circuits that tend to
pick the same Guard and Exit.
The final nodes will be able to tell with a similar level certainty
that depends on their capacity and the service popularity, because they
will see a lot of rend handshakes that all tend to have the same second
hop.
The most serious of these is the Guard fingerprinting issue. When
proposal xxx-padding-negotiation is implemented, services that enable
this feature should use those padding primitives to create fake circuits
to random middle nodes that are not their guards, in an attempt to look
more like a client.
Additionally, if Tor Browser implements "virtual circuits" based on
SOCKS username+password isolation in order to enforce the re-use of
paths when SOCKS username+passwords are re-used, then the number of
middle nodes in use during a typical user's browsing session will be
proportional to the number of sites they are viewing at any one time.
This is likely to be much lower than one new middle node every ten
minutes, and for some users, may be close to the number of Vanguards
we're considering.
This same reasoning is also an argument for increasing the number of
second-level guards beyond just two, as it will spread the hidden
service's traffic over a wider set of middle nodes, making it both
easier to cover, and behave closer to a client using SOCKS virtual
circuit isolation.
4.2. Hidden service linkability
Multiple hidden services on the same Tor instance should use separate
second and third level guard sets, otherwise an adversary is trivially
able to determine that the two hidden services are co-located by
inspecting their current chosen rend point nodes.
Unfortunately, if the adversary is still able to determine that two or
more hidden services are run on the same Tor instance through some other
means, then they are able to take advantage of this fact to execute a
Sybil attack more effectively, since there will now be an extra set of
guard nodes for each hidden service in use.
For this reason, if Vanguards are enabled, and more than one hidden
service is configured, the user should be advised to ensure that they do
not accidentally leak that the two hidden services are from the same Tor
instance.
4.3. Denial of service
Since it will be fairly trivial for the adversary to enumerate the
current set of rend nodes for a hidden service, denial of service
becomes a serious risk for Vanguard users.
For this reason, it is important to support a large number of
third-level guards, to increase the amount of resources required to
bring a hidden service offline by DoSing just a few Tor nodes.
5. Performance considerations
The switch to a restricted set of nodes will very likely cause
significant performance issues, especially for high-traffic hidden
services. If any of the nodes they select happen to be temporarily
overloaded, performance will suffer dramatically until the next
rotation period.
5.1. Load Balancing
Since the second and third level "guards" are chosen from the set of all
nodes eligible for use in the "middle" hop (as per hidden services
today), this proposal should not significantly affect the long-term load
on various classes of the Tor network, and should not require any
changes to either the node weight equations, or the bandwidth
authorities.
Unfortunately, transient load is another matter, as mentioned
previously. It is very likely that this scheme will increase instances
of transient overload at nodes selected by high-traffic hidden services.
One option to reduce the impact of this transient overload is to
restrict the set of middle nodes that we chose from to some percentage
of the fastest middle-capable relays in the network. This may have
some impact on load balancing, but since the total volume of hidden
service traffic is low, it may be unlikely to matter.
5.2. Circuit build timeout
The adaptive circuit build timeout mechanism in Tor is what corrects
for instances of transient node overload right now.
The timeout will naturally tend to select the current fastest and
least-loaded paths even through this set of restricted routes, but it
may fail to behave correctly if there are a very small set of nodes in
each guard set, as it is based upon assumptions about the current path
selection algorithm, and it may need to be tuned specifically for
Vanguards, especially if the set of possible routes is small.
5.3. OnionBalance
At first glance, it seems that this scheme makes multi-homed hidden
services such as OnionBalance[1] even more important for high-traffic
hidden services.
Unfortunately, if it is equally damaging to the user for any of their
multi-homed hidden service locations to be discovered, then OnionBalance
is strictly equivalent to simply increasing the number of second-level
guard nodes in use, because an active adversary can perform simultaneous
Sybil attacks against all of the rend points offered by the multi-homed
OnionBalance introduction points.
5.4. Default vs optional behavior
We suggest this torrc option to be optional because it changes path
selection in a way that may seriously impact hidden service performance,
especially for high traffic services that happen to pick slow guard
nodes.
However, by having this setting be disabled by default, we make hidden
services who use it stand out a lot. For this reason, we should in fact
enable this feature globally, but only after we verify its viability for
high-traffic hidden services, and ensure that it is free of second-order
load balancing effects.
Even after that point, until Single Onion Services are implemented,
there will likely still be classes of very high traffic hidden services
for whom some degree of location anonymity is desired, but for which
performance is much more important than the benefit of Vanguards, so there
should always remain a way to turn this option off.
6. Future directions
Here are some more ideas for improvements that should be done sooner
or later:
- Maybe we should make the size and rotation period of
secondary/third guard sets to be configurable by the user.
- To make it harder for an adversary, a hidden service MAY extend
the path length of its circuits by an additional static hop. This
forces the adversary to use another coercion attack to walk the
chain up to the hidden service.
7. Acknowledgments
Thanks to Aaron Johnson, John Brooks, Mike Perry and everyone else
who helped with this idea.
1. https://onionbalance.readthedocs.org/en/latest/design.html#overview
--
Mike Perry
I was inspired by onioncat to write a twisted python implementation. Onionvpn doesn't have as many features as onioncat. I've successfully tested that onionvpn and onioncat can talk to each other and play nice. Both onionvpn and onioncat implement a virtual public network. Anyone can send packets to you if they know your onion address or ipv6 address... however injection attacks are unlikely since the attacker cannot know the contents of your traffic without compromising the tor process managing the onion service.
I've also tested with mosh; that is, you can use mosh which only works with ipv4 over an ipv4-to-ipv6 tunnel over onionvpn/onioncat. Like this:
mosh-client -> udp/ipv4 -> ipv6 -> tun device -> tcp-to-tor -> onion service decodes ipv6 to tun device -> ipv6 -> udp/ipv4 -> mosh-server
https://github.com/david415/onionvpn
If an onionvpn/onioncat operator were to NAT the onion ipv6 traffic to the Internet then that host essentially becomes a special IPv6 exit node for the tor network. The same can be done for IPv4. Obviously operating such an exit node might be risky due to the potential for abuse... however don't you just love the idea of being about to use low-level network scanners over tor? I wonder if Open Observatory of Network Interference would be interested in this.
david
Hello,
I am not sure if this has been discussed before or how hard it would be to
implement, but I'm looking for a way to integrate a smartcard with Tor -
essentially, I want to be able to host hidden service keys on the card. I'm
trying to bind the hidden service to a hardware component (the smartcard)
so that it can be securely hosted in a hostile environment as well as
impossible to clone/move without physical access to the smartcard.
I have Tor running on the USBArmory by InversePath (
http://inversepath.com/usbarmory.html ) and have a microSD form factor card
made by Swissbit (
www.swissbit.com/products/security-products/overwiev/security-products-over…
) up and running on it. I am a JavaCard developer myself and I have
developed embedded Linux firmwares before but I have never touched the Tor
source.
Is there anyone that is willing to take on a side project doing this? Would
it be just a matter of configuring OpenSSL to use the card (I haven't tried
that yet)?
Thank you,
Razvan
--
Razvan Dragomirescu
Chief Technology Officer
Cayenne Graphics SRL
Hello,
Thanks for the feedback so far.
[ PEOPLE THAT HAVE BIG SCARY ADVERSARIES IN THEIR THREAT MODEL
STILL SHOULD NOT USE THIS. ]
New version with changes some that add functionality, some code of
quality stuff, hence a version bump to 0.0.2, especially since it'll
probably be a bit before I can focus on tackling the TODO items.
Source: https://git.schwanenlied.me/yawning/cfc
XPI: https://people.torproject.org/~yawning/volatile/cfc-20160327/
Major changes:
* Properly deregister the HTTP event listeners on addon unload.
* Toned down the snark when I rewrite the CloudFlare captcha page,
since I wasn't very nice.
* Additional quality of life/privacy improvements courtesy of Will
Scott, both optional and enabled by default.
* (QoL) Skip useless landing pages (github.com/twitter.com will be
auto-redirected to the "search" pages).
* (Privacy) Kill twitter's outbound link tracking (t.co URLs) by
rewriting the DOM to go to the actual URL when possible. Since
DOM changes made from content scripts are isolated from page
scripts, this shouldn't substantially alter behavior.
* (Code quality) Use a pref listener to handle preference changes.
TODO:
* Try to figure out a way to mitigate the ability for archive.is to
track you. The IFRAME based approach might work here, needs more
investigation.
* Handle custom CloudFlare captcha pages (In general my philosophy is
to minimize false positives, over avoiding false negatives).
Looking at the regexes in dcf's post, disabling the title check may
be all that's needed.
* Handle CloudFlare 503 pages.
* Get samples of other common blanket CDN based Tor blocking/major
sites that block Tor, and implement bypass methods similar to how
CloudFlare is handled.
* Look into adding a "contact site owner" button as suggested by Jeff
Burdges et al (Difficult?).
* Support a user specified "always use archive.is for these sites"
list.
* UI improvements.
* More Quality of Life/Privacy improvements (Come for the Street
Signs, stay for the user scripts).
* I will eventually get annoyed enough at being linked to mobile
wikipedia that I will rewrite URLs to strip out the ".m.".
* Test this on Fennec.
* Maybe throw this up on addons.mozilla.org.
Regards,
--
Yawning Angel
Hi list,
This is a proposal to use quantum-safe hybrid handshake for Tor
communications.
Given NSA's recent announcement on moving towards quantum-safe cryptography,
it would be nice to have a quantum-safe feature for Tor.
The idea of the quantum-safe hybrid handshake is to combine both classical
key
exchange and a key encapsulation mechanism (KEM) instantiated by a quantum
safe encryption algorithm, so that the combination gives both (classical)
authentication and quantum safety. In a bit more details, the client and
the server
agrees on a classic pre-master secret, $c$, using the ntor protocol. In
parallel, client
generates a public/private key pair of the quantum-safe encryption
algorithm, and
send the public key to the server. The server picks a random string, $q$,
encrypts
it with the public key and send the ciphertext back to the client. The
final secret
is the output of KDF(c|q).
This proposal defeats the harvest-then-decrypt attack with a minimum impact
to
the existing ntor protocol. An adversary needs to be able to break the
quantum-safe
encryption algorithm to learn q. On the other hand, if the quantum-safe
encryption
algorithm turns out to be not secure, the protocol is still as secure as
ntor protocol.
In other words, it will at least do no harm to the current security.
In addition, this is a modular design that allows us to use any
quantum-safe
cryptographic primitives. As a proof of concept, we instantiated the
protocol with
NTRUEncrypt lattice-based crypto. We implemented the the protocol with NTRU
parameters that gives 128 bits security. The code is available at
https://github.com/NTRUOpenSourceProject/ntru-tor
Please find the attachment for the request to change the feature. The proof
of the
protocol can be found at: https://eprint.iacr.org/2015/287.pdf
Some known issue:
1. cell size. As far as we know, all quantum-safe encryption algorithms
have
large key and/or ciphertext size that exceeds the cell size ~500. So this
protocol
needs to transmit multiple cells, no matter which quantum-safe encryption
algorithm we chose. This is addressed by "Proposal 249: Allow CREATE cells
with >505 bytes of handshake data".
2. quantum-safe authentication: there is no quantum-safe authentication in
this
protocol. We believe that authentication can wait, as future (quantum)
adversary
cannot come back to present time and break authentication. Hence, we use
ntor
authentication to keep the proposal compact and simple. It will be a future
work
after this proposal.
Thanks for your time, and happy holidays!
Zhenfei Zhang
Security Innovation.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
[Cross-posted to guardian-dev and tor-dev.]
Hey, friends.
I suppose this serves as a project announcement of sorts, and also as
a progress report regarding the current status of this thing.
iObfs is an effort to build obfs4proxy for iOS and to also build out
some techniques for actually making it usable within other
Tor-enabled iOS apps. You may have heard me or n8fr8 discuss the idea
at the dev meeting a few weeks ago. I'm not in love with the name I
gave it (it's a placeholder that stuck around), but such is life. The
repository is currently hosted at [1].
[1]: https://github.com/mtigas/iObfs
The initial sprint is being supported by a small Guardian Project
grant through mid-April. The high-level goals are to:
1) successfully cross-compile obfs4proxy for the iOS environment
2) "library-ify" it and link it into a proof-of-concept iOS app
3) figure out how to get it to work without "managed mode"
4) build out a process for maybe putting it into Onion Browser,
iCepa[2], and other Tor iOS efforts
[2]: https://github.com/iCepa
I've got a bit of work regarding #1. I think I'm close to getting the
binary running, thanks to the existence of the gomobile tools[3].
Using gomobile, you easily get[4] an "obfs4proxy.app" and (given a
properly configured Xcode and iPhone) you can put it on a device. But
it crashes right now because (I believe) the iOS SDK requires apps to
declare some user interface (even if it's blank). So that's close,
but my relative lack of experience with Go and the Go buildchain have
made #1/#2 a bit slow-going.
[3]: https://golang.org/x/mobile/cmd/gomobile
[4]: https://github.com/mtigas/iObfs/blob/master/buildobfs4.sh
This week, I also took the time to figure out how PT "managed mode"
actually works and now have a good idea of how I'd get obfs4proxy to
work in an environment where tor can't fork it as a subprocess. There
were some conversations I had during the dev meeting where we thought
I'd have to use the control port and manually build circuits or
something crazy like that -- but it turns out that the solution is a
lot simpler.[5]
[5]:
https://github.com/mtigas/iObfs/blob/master/notes/obfs4-nonmanaged.md
This essentially solves #3, so the big barrier now is
cross-compiling, "library-ifying", and linking -- rather than the
software implementation bits.
Anyway, that's where things are. Progress will surely ramp up a bit
over the next few weeks. Comments welcome.
Best,
Mike Tigas
@mtigas | https://mike.tig.as/ | 0xA993E7156E0E9923
-----BEGIN PGP SIGNATURE-----
iQEcBAEBCgAGBQJW9wKpAAoJEGQdTjqn+ftyos4IANK+jKe+mdU3IcDGGWp48QnT
34a8DCk4u17MhGnoiPuRVjyF4R380v6+O23lzDsXpDA3bhorBirn1fdkJpnvTsb1
IiS75Q3falq+TPZ5pYCnijFLE0sj0VphdHcZuoiHnn6n8HlYZ13ih9sfZTUg/4pa
nxNGL83H62vpuR2voeLWPgfJi+QRVIJVa9zSOz8xE3nE70sGNhbWpWlTn12UbMvj
f3QmclTPNAuLCXGANyEG1QkTu+k6lHWCCOcJh/wQmwgWHgfhu3fr+PEq6WpjFqMl
4Znhn7SvLlE1lADT8FnAbfz9ND1rT+BVmhITEnQ11eXcb0YHJOLPN8Fmua+G/eM=
=3Daj
-----END PGP SIGNATURE-----
Hello,
so we had a meeting about the future of "Next Generation Hidden Services" aka prop224.
It was a good meeting.
We spent most of the time discussing the topics brought up here:
https://lists.torproject.org/pipermail/tor-dev/2016-March/010534.html
Please read the above mail to get up to speed with the topics of discussion.
So these are basically two topics:
a) Should we try to maintain backwards compatibility with old intro/rend points?
We ended up deciding that it's actually worthwhile keeping backwards
compatibility if we can help it: Our rationale was that coding the logic for
the extra cells that are required to maintain backwards compatibility is
probably less painful than coordinating a perfect bug-free incremental
deployment of prop224 in such a way that the whole network has upgraded
before we enable client support.
So our current plan is to bake backwards compat in the code, and also
introduce a consensus parameter of "Should we connect to prop224 onion
services using legacy IPs/RPs?" which we will switch off when a good
percentage of the network has upgraded to support prop224. At that point, we
will be able to rip out the backwards compat code as well. As an added
point to that, we should implement the backwards compat code in a way that
it's not spagghetied with the normal code, so that it's easy to analyze and
remove when needed. Furthermore, we should look back in prop224 and see if
we can simplify the backwards compat logic even more.
FWIW, prop224 does not have backwards compatibility for HSDirs, so we will
still have to do careful deployment there, and make sure that a good
percentage of HSDirs have upgraded to prop224 before we start using them
(maybe a new consensus parameter is needed here).
b) In prop224, why do intro points need to know the "intro point encryption key"
and also what's the point of UPDATE-KEYS-SUBCMD?
Nick told us that the main point of UPDATE-KEYS-SUBCMD is that so hidden
services can rotate their intro point encryption key periodically, so that
they can reset their replay caches.
That's a fair point. The big question here is, is this worth the complexity
that MAINT_INTRO and UPDATE-KEYS-SUBCMD add to the protocol logic?
Unfortunately we don't know the answer to this yet, because we actually
don't have stats on how our replay caches are doing currently. Here are some
things we need to look into:
i) Speak with facebook or some other big onion hoster, and try to get some
information about their replay cache. Is it ready to bust? How much space
is it occupying?
ii) The above will help us gauge replay caches in terms of normal activity,
but we also need to think of how replay caches should act in cases of a DoS.
iii) Also think about INTRODUCE1 replay attacks in general, and understand
how dangerous they can be, so that we know how robust our replay caches
should be. Is it _that_ dangerous if an attacker manages to sneak in a
replay attack every once in a while?
For example, imagine an attacker who fills up our replay cache on
purpose, so that she can sneak in one replay attack when we reset
it. If an attacker can send legit INTRODUCE2 cells to fill up our
replay cache, what does she need the replays for? What other types of
attacker are there?
After we learn more about the above, we will understand *how much we care*
about onion services being able to rotate intro pint encryption keys on the
fly using UPDATE-KEYS-SUBCMD. Here are some possible scenarios here:
- We end up deciding that INTRODUCE1 replay attacks are *dangerous* and we
need to seriously defend ourselves against them. In this case, having some
sort of UPDATE-KEYS-SUBCMD mechanism sort of makes sense, since onion
services should be able to rotate keys at will and let their clients know,
without them having to fetch a new HS descriptor.
- We end up deciding that INTRODUCE1 are a concern but not something we
should complicate our design considerably for. In this case, we might want
to consider improving the quality of our replay caches, by using more
compact designs (= more space for entries), or by using bloom filters or a
similar tech. A proposal will need to be made if so. Yawning posted the
following relevant paper: https://home.kookmin.ac.kr/~mkyoon/publications/2010TKDE.pdf
- We end up deciding it's no big deal if the attacker sneaks in a replay
attack every once in a while. In this case, we can just go with the most
minimal approach and ditch the UPDATE-KEYS-SUBCMD mechanism for now, and
have intro points be oblivious about encryption keys (which further
simplifies our cell formats, etc.). If we take this approach, and in the
future future we change our minds about the importance of replay attacks,
we can still add some sort of UPDATE-KEYS-SUBCMD mechanism using the
extensions mechanism of ESTABLISH_INTRO cells.
Furthermore on this topic, we discussed some alternate approaches for doing
replay detection that would require less heavy replay caches:
i) Maybe we can have an increasing counter in the HS descriptor, that
clients need to also include in their INTRODUCE1 cell. If an onion
service receives an INTRODUCE1 cell with a counter value different than
the one in the descriptor, it ignores it. Onion services update the
counter and publish a new descriptor when their replay cache is close to
getting filled.
I believe various subtle engineering details are hidden in this scheme,
along with edge cases and race conditions like "What happens if the
client fetches a descriptor with counter value N, right before the onion
service updates the descriptor with a new counter value?".
ii) When an intro point replay cache is almost full, the onion service will
make new encryption keys, tear down the old intro circuit and make a new
one, and also pass a signed "HS moved to another circuit" message to the
intro point. The intro point will forward that message to any clients
that ask for the onion service using its old keys, so that clients know
the right place to ask. Lots of engineering details hidden in this
proposal as well.
In the end we decided that Roger might have some useful feedback for us here :]
More research is required!
Cheers!
I'm looking for ideas of good ways to handle TLS certificates and their
renewal for meek bridges. I want to use Let's Encrypt for this process,
and I hope that someone who knows Let's Encrypt well can contribute some
ideas.
All three of the meek bridges use HTTPS to receive connections from the
CDN, so they need TLS certificates. For example, when you use
meek-azure, your traffic is forwarded to the bridge at
https://meek.bamsoftware.com/. How it works now is I do the usual domain
validation procedure with a CA, receive an email to show that I control
the domain, install the cert and key, and then run the server like this:
meek-server --cert /etc/meek/cert.pem --key /etc/meek/key.pem
When I used Let's Encrypt in the past, using the --webroot option, it
wanted to write a file to the URL path "/.well-known/acme-challenge/{token}".
That won't work for meek-server as it exists today, because meek-server
never serves files from the filesystem. But it could. Perhaps we could
add an option like --acme-webroot that would allow serving files from a
single whitelisted directory.
I notice that there are other ways of proving domain ownership (HTTP,
TLS SNI, DNS). Maybe we could use one of those?
https://ietf-wg-acme.github.io/acme/#identifier-validation-challenges
I also note that there are third-party plugins:
https://github.com/letsencrypt/letsencrypt/wiki/Plugins
Maybe there could be a plugin for meek-server (ideally not requiring new
complicated code in meek-server itself).
Currently you have to restart meek-server in order to make it notice a
changed certificate and key file. It would be better if that were not
necessary--maybe we could periodically stat the files, and re-load them
if they have changed?
This is going to be an issue for Snowflake as well, because we will want
to use WebSocket over TLS for the server component.
Hello tor-dev!
tl;dr; we want to add one more step to Trac ticket work-flow called
'merge_ready' - if you don't want to use it you don't need to
During Tor's Dev Meeting in Valencia, the Network Team discussed a code
review process[1] for the team and we concluded that for us a two stage
review process would make things much better for the team.
In order to organize that on our ticket work-flow on Trac, we decided to
add the step 'merge_ready'[2] that would come after either
'needs_review' or 'needs_revision' steps.
For our team, what that will mean is that we have reviewed the code and
believe is ready for Nick to do a second review and merge. The first
review will remove load from Nick and we want to eventually have more
folks helping Nick on the second review as well. But this change alone
will be already a big step.
What does that means for someone working on a ticket that is not part of
Core Tor development flow? Well, if you don't want to use it in your
team or your project flow, you can just ignore it and keep using Trac as
normal.
We are sending this note to make sure folks knows about it before it
happens and of course, to hear any concerns or feedback.
Cheers,
Isabela
[1]
https://trac.torproject.org/projects/tor/wiki/org/meetings/2016WinterDevMee…
[2]
https://storm.torproject.org/shared/pt9FtdJNG_gB_afqayg9dXTJwdDFncgU0HVXJEq…
--
PM at TorProject.org
gpg fingerprint = 8F2A F9B6 D4A1 4D03 FDF1 B298 3224 4994 1506 4C7B
@isa