The three basic assumptions that we make are that the user's local computer is
secure, that the cryptographic algorithms are sound, and that the user does not
intentionally expose their identity. For researchers studying anonymity, I2P's
threat model includes everything up through a well funded global active adversary,
and if I2P does its job correctly, the weak link in the chain will be the user.
The rest of this discussion explains what that means in the context of I2P.</p>
<H2>Users</H2>
Some example user scenarios might be illustrative of the scope of I2P's threat model:
<UL>
<li> Someone who <b>chats with his grandmother</b>.</li>
<li> Someone who <b>researches potentially embarassing medical conditions</b>.</li>
<li> Someone who <b>shares copyrighted music online</b> (with or without permission).</li>
<li> Someone who <b>browses alternative news sources</b>.</li>
<li> Someone who <b>publishes subversive information</b>.</li>
<li> Someone who <b>provides services</b> without getting the required permits or paying associated fees or taxes.</li>
<li> Someone who <b>plans and executes politically subversive actions</b>.</li>
</UL>
<H2>Fears</H2>
<p>
Each of the seven user types above have their own set of concerns - reasons
why they want privacy and anonymity. </p>
<UL>
<li><b>Unintended disclosure of data</b> - they need the content of what they say to be available only to whom they say it (though I2P does not address disclosure after delivery to the target destination - they can call up the new york times and tell the story)</li>
<li><b>Exposure that they were looking at something</b> - perhaps simple worries like "if my employer knew I was looking for jobs, they'd fire me".</li>
<li><b>Impersonation of someone trusted</b> - Data sent over I2P is end to end encrypted to the destination specified - I2P does not bind any sort of "user" identity to each destination, so while I2P guarantees that only the intended recipient will get the information, I2P cannot make sure that the user sends it to the right person.</li>
<li><b>Suspicion that they are publishing / distributing something</b> - suspicion can allow an adversary to narrow their focus on the target, allowing them to mount more sophisticated attacks to try to locate, track, or disable the communication.</li>
<li><b>Suspicion that their activities can be linked to their identity</b> - beyond disabling communication, there can be significant repercussions if one has engaged in communication that is prohibited.</li>
</UL>
<H2>Adversaries</H2>
<UL>
<li><b>Normal peer</b> without any nontrivial means of attack</li>
<li><b>Sophisticated peer</b> with extensive technical knowledge and time, but without many resources</li>
<li><b>Entity with access to a single point of presence at an ISP</b>, either legitimately or illegitimately, with or without a court order</li>
<li><b>Entity with access to all points of presence in a country for an ISP</b></li>
<li><b>Entity with access to several points of presence for several ISPs</b></li>
<li><b>Entity with access to all points of presence in a country for all ISPs</b></li>
<li><b>Entity with access to any network connection worldwide</b></li>
</UL>
<p>
Those adversaries could be interested in piercing the anonymity or confidentiality
of the data for mere curiosity, to find out if some particular person was communicating
with anyone else, to find out who those people are, to find out where those people are,
and to confirm or deny whether their suspicions are correct. In addition, they could
be passively gathering the data and storing it away for later analysis, or actively
trying to trip up the network into revealing more than it should. </p>
<H2>Attacks</H2>
<p>
Various adversaries can mount different attacks against users of the network,
but the cost may be significant and may require determined action. </p>
<H3>Greedy user attacks</H3>
<p>
The most plausible attack against the network is simply people behaving like they
do on nearly every other network - greedily. I2P must operate in such a way that
the Nash equilibrium can be found quickly and quite visibly, so that users are
aware that antisocial behavior actually degrades their own performance. In addition,
I2P must build obstacles against excessive use of network resources, while allowing
people with diverse resources to still use the network effectively.</p>
<p>
A large part of how I2P will convince the user that they shouldn't be antisocial
is due to the anonymous nature of the network - when a router receives a request
to provide some service (participate in a tunnel, pass on some garlic routed messages,
handle some network database entries, etc), it has no idea what router it is
being asked to perform this task for, and therefor cannot satisfy the requests of
routers it wants to please and refuse the requests of routers it is not concerned with
gaining the favor of (it would otherwise want to do this since every router keeps a
profile of what its peers agree to, refuse to do, or fail to do after agreeing).</p>
<p>
The network doesn't inherently expose scarce resources that one router would want to
gain from another, but some routers will obviously have significantly varied
capabilities - CPU, latency, and throughput - and all routers will want the "best"
peers to perform services for them. The main way that routers provide better service
to preferred peers is by using more efficient (but scarcer) transports (e.g. keeping
a TCP connection open to them, rather than using UDP or email, or quickly ejecting them
from the connection pool).</p>
<p>
Another aspect of greedy operation can occur when a peer wants to build an
excessive number of tunnels with a large number of participants per tunnel. To
counter this, requests for tunnel participation includes a certificate which may
be filled with some proof of work, or even a token proving payment (intertwined
with the message recipient, message ID, and message expiration date to prevent
reuse). The same mechanism is available for garlic routed messages - each garlic
and each clove has its own certificate attached. (As a side note, all router
identities and destinations also have one of these certificates attached so as
to allow the introduction of increased 'cost' for identity) Currently however,
all of these certificates are of the 'null' type, providing no proof of work.
</p>
<H3>Denial of service attacks</H3>
<p>
In addition to the above greedy user attacks, there are a whole class of denial of
service attacks that can be mounted on the network. At the extreme, nothing can
defend against an attacker who outright disables all means of communication, from
T1 lines through carrier pigeon. Thankfully that attack has been ruled out as too
expensive, but plausible attacks still remain, falling into three camps - attacks
against the entire network, attacks against a specific router, and attacks against
a specific destination. </p>
<p>
The entire network can be attacked by legal means (making the use of the software
illegal), and for those who still wish to use it, there are a few techniques available.
First, with I2P 2.0 people will be able to set up temporary trusted peers (perhaps at
a public net cafe) and have their own router behind that one via restricted routes,
and after a specified amount of time have that temporary router securely delete any
data it has. In addition, with I2P 2.0 people will be able to use alternate transports
that do not expose one's location (such as email, PHTTP, usenet, or even over another
existing network). The router information for all peers in the network can be
gathered without much effort by an attacker by simply mounting a harvesting
attack - running a router and keeping track of all routers it sees passing through
the network database.</p>
<p>
The entire network can also be attacked technically by running a significant
number of malicious routers that perform incorrectly or otherwise refuse to service
its peers. On the other hand, the router's peer profiling and peer selection
algorithms should fairly quickly identify these malicious routers and cease to
use them. In addition, for those who are convinced that these profiles must be
managed centrally, each router can include its own peer rankings in its published
router information data for all to see.</p>
<p>
An attacker can go after specific routers both trivially and successfully, using
known techniques to flood its host. When I2P 2.0 includes alternate transports
that are not subject to such IP level flooding, the attacker can send more valid data than
the router can process. While the router will do what it can to operate
effectively under attack, its likely that a determined adversary will be
successful at disabling a router, and it is for this reason that the I2P client
protocol defines a way for it to notify client applications that the router is
under attack and is essentially useless. At that point, the client would simply
have to migrate the destination to another router and grant a new lease.</p>
<p>
An attacker who wants to go after a specific destination, regardless of what
router it is located on, has a harder time. The I2P network database distributes
the destination's current leases according to the Kademlia algorithm, which by
itself is succeptible to Sybil attacks where an attacker takes over the keyspace
surrounding the target and drops the data. However, I2P has modified the
algorithm to both include a random exploration factor when publishing the data
(so that the attacker cannot compromise all of the hosts with the data), plus
the location within the Kademlia keyspace is modified every day through some
predictable date driven transform against the key, requiring the attacker to
remount the Sybil attack every day. </p>
<p>
An additional way to mount a denial of service attack against a specific
destination is to attempt to make all of its inbound tunnels unusable by looking up
the current leases for that destination and mounting a denial of service
attack against each of the routers serving as gateways (this obviously is
useless against those trying to keep a destination from sending data, since
outbound tunnels aren't published anywhere). To defend against this, the
altered messages along the path, the inability to decrypt messages not addressed to you,
and defense against man-in-the-middle attacks. The network protocol and data structures
support securely padding messages to arbitrary sizes, so messages could be made constant
size or garlic messages could be modified randomly so that some cloves appear to contain
more subcloves than they actually do.</p>
<H3>Development attacks</H3>
<p>
These attacks aren't directly on the network, but instead go after its development and
adoption, either by introducing legal hurdles on anyone contributing to the development
of the software, or by using whatever means are available to get the developers to
subvert the software. Traditional technical measures cannot defeat these attacks, and
if someone threatened the lives of a developer's loved ones (or even just issuing a
court order along with a gag order, under threat of prison), everyone should expect that
the code would be modified. </p>
<p>
However, two techniques help defend against these attacks:
<UL>
<li> All components of the network must be open source to enable inspection, verification, modification, and improvement. If a developer is compromised, once it is noticed the community should demand explanation and cease to accept that developer's work.</li>
<li> Development over the network itself, allowing developers to stay anonymous but still secure the development process. There is currently a destination in I2P pointing at our CVS server, and the rest of the development resources can be accessed through outbound web proxies (e.g. bugzilla, wiki, etc)</li>
</UL>
</p>
<H3>Implementation attacks</H3>
<p>
Try as we might, most nontrivial applications include errors in the design or
implementation, and it is possible that any of them could be exploited to attack the anonymity
or security of the communication running over I2P in unexpected ways. To help withstand
attacks against the design or protocols in use, we are publishing all designs and
documentation in the open and asking for any and all criticism with the hope that many
eyes will improve the system. In addition, the code is being treated the same way,
with little aversion towards reworking or throwing out something that isn't meeting the
needs of the software system (including ease of modification). Documentation for the
design and implementation of the network and the software components are an essential part
of security, as without them it is unlikely that developers would be willing to spend the
time to learn the software enough to identify shortcomings and bugs.</p>