aboutsummaryrefslogtreecommitdiff
path: root/doc/documentation/chapters/philosophy.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/documentation/chapters/philosophy.texi')
-rw-r--r--doc/documentation/chapters/philosophy.texi378
1 files changed, 378 insertions, 0 deletions
diff --git a/doc/documentation/chapters/philosophy.texi b/doc/documentation/chapters/philosophy.texi
new file mode 100644
index 000000000..10006ebe1
--- /dev/null
+++ b/doc/documentation/chapters/philosophy.texi
@@ -0,0 +1,378 @@
1@cindex Philosopy
2@node Philosophy
3@chapter Philosophy
4
5The foremost goal of the GNUnet project is to become a widely used,
6reliable, open, non-discriminating, egalitarian, unfettered and
7censorship-resistant system of free information exchange.
8We value free speech above state secrets, law-enforcement or
9intellectual property. GNUnet is supposed to be an anarchistic network,
10where the only limitation for peers is that they must contribute enough
11back to the network such that their resource consumption does not have
12a significant impact on other users. GNUnet should be more than just
13another file-sharing network. The plan is to offer many other services
14and in particular to serve as a development platform for the next
15generation of decentralized Internet protocols.
16
17@menu
18* Design Goals::
19* Security & Privacy::
20* Versatility::
21* Practicality::
22* Key Concepts::
23@end menu
24
25@cindex Design Goals
26@cindex Design Goals
27@node Design Goals
28@section Design Goals
29
30These are the core GNUnet design goals, in order of relative importance:
31
32@itemize
33@item GNUnet must be implemented as free software.
34@item GNUnet must only disclose the minimal amount of information
35necessary.
36@item GNUnet must be decentralised and survive Byzantine failures in any
37position in the network.
38@item GNUnet must make it explicit to the user which entities must be
39trustworthy when establishing secured communications.
40@item GNUnet must use compartmentalization to protect sensitive
41information.
42@item GNUnet must be open and permit new peers to join.
43@item GNUnet must be self-organizing and not depend on administrators.
44@item GNUnet must support a diverse range of applications and devices.
45@item The GNUnet architecture must be cost effective.
46@item GNUnet must provide incentives for peers to contribute more
47resources than they consume.
48@end itemize
49
50
51@cindex Security and Privacy
52@node Security & Privacy
53@section Security & Privacy
54
55GNUnet's primary design goals are to protect the privacy of its users and
56to guard itself against attacks or abuse.
57GNUnet does not have any mechanisms to control, track or censor users.
58Instead, the GNUnet protocols aim to make it as hard as possible to
59find out what is happening on the network or to disrupt operations.
60
61@cindex Versatility
62@node Versatility
63@section Versatility
64
65We call GNUnet a peer-to-peer framework because we want to support many
66different forms of peer-to-peer applications. GNUnet uses a plugin
67architecture to make the system extensible and to encourage code reuse.
68While the first versions of the system only supported anonymous
69file-sharing, other applications are being worked on and more will
70hopefully follow in the future.
71A powerful synergy regarding anonymity services is created by a large
72community utilizing many diverse applications over the same software
73infrastructure. The reason is that link encryption hides the specifics
74of the traffic for non-participating observers. This way, anonymity can
75get stronger with additional (GNUnet) traffic, even if the additional
76traffic is not related to anonymous communication. Increasing anonymity is
77the primary reason why GNUnet is developed to become a peer-to-peer
78framework where many applications share the lower layers of an
79increasingly complex protocol stack.
80If merging traffic to hinder traffic analysis was not important,
81we could have just developed a dozen stand-alone applications
82and a few shared libraries.
83
84@cindex Practicality
85@node Practicality
86@section Practicality
87
88GNUnet allows participants to trade various amounts of security in
89exchange for increased efficiency. However, it is not possible for any
90user's security and efficiency requirements to compromise the security
91and efficiency of any other user.
92
93For GNUnet, efficiency is not paramount. If there is a more secure and
94still practical approach, we would choose to take the more secure
95alternative. @command{telnet} is more efficient than @command{ssh}, yet
96it is obsolete.
97Hardware gets faster, and code can be optimized. Fixing security issues as
98an afterthought is much harder.
99
100While security is paramount, practicability is still a requirement.
101The most secure system is always the one that nobody can use.
102Similarly, any anonymous system that is extremely inefficient will only
103find few users.
104However, good anonymity requires a large and diverse user base. Since
105individual security requirements may vary, the only good solution here is
106to allow individuals to trade-off security and efficiency.
107The primary challenge in allowing this is to ensure that the economic
108incentives work properly.
109In particular, this means that it must be impossible for a user to gain
110security at the expense of other users. Many designs (e.g. anonymity via
111broadcast) fail to give users an incentive to choose a less secure but
112more efficient mode of operation.
113GNUnet should avoid where ever possible to rely on protocols that will
114only work if the participants are benevolent.
115While some designs have had widespread success while relying on parties
116to observe a protocol that may be sub-optimal for the individuals (e.g.
117TCP Nagle), a protocol that ensures that individual goals never conflict
118with the goals of the group is always preferable.
119
120@cindex Key Concepts
121@node Key Concepts
122@section Key Concepts
123
124In this section, the fundamental concepts of GNUnet are explained.
125Most of them are also described in our research papers.
126First, some of the concepts used in the GNUnet framework are detailed.
127The second part describes concepts specific to anonymous file-sharing.
128
129@menu
130* Authentication::
131* Accounting to Encourage Resource Sharing::
132* Confidentiality::
133* Anonymity::
134* Deniability::
135* Peer Identities::
136* Zones in the GNU Name System (GNS Zones)::
137* Egos::
138@end menu
139
140@cindex Authentication
141@node Authentication
142@subsection Authentication
143
144Almost all peer-to-peer communications in GNUnet are between mutually
145authenticated peers. The authentication works by using ECDHE, that is a
146DH key exchange using ephemeral eliptic curve cryptography. The ephemeral
147ECC keys are signed using ECDSA. The shared secret from ECDHE is used to
148create a pair of session keys (using HKDF) which are then used to encrypt
149the communication between the two peers using both 256-bit AES and 256-bit
150Twofish (with independently derived secret keys). As only the two
151participating hosts know the shared secret, this authenticates each packet
152without requiring signatures each time. GNUnet uses SHA-512 hash codes to
153verify the integrity of messages.
154
155In GNUnet, the identity of a host is its public key. For that reason,
156man-in-the-middle attacks will not break the authentication or accounting
157goals. Essentially, for GNUnet, the IP of the host has nothing to do with
158the identity of the host. As the public key is the only thing that truly
159matters, faking an IP, a port or any other property of the underlying
160transport protocol is irrelevant. In fact, GNUnet peers can use
161multiple IPs (IPv4 and IPv6) on multiple ports --- or even not use the
162IP protocol at all (by running directly on layer 2).
163
164GNUnet uses a special type of message to communicate a binding between
165public (ECC) keys to their current network address. These messages are
166commonly called HELLOs or peer advertisements. They contain the public key
167of the peer and its current network addresses for various transport
168services.
169A transport service is a special kind of shared library that
170provides (possibly unreliable, out-of-order) message delivery between
171peers.
172For the UDP and TCP transport services, a network address is an IP and a
173port.
174GNUnet can also use other transports (HTTP, HTTPS, WLAN, etc.) which use
175various other forms of addresses. Note that any node can have many
176different
177active transport services at the same time, and each of these can have a
178different addresses. Binding messages expire after at most a week (the
179timeout can be shorter if the user configures the node appropriately).
180This expiration ensures that the network will eventually get rid of
181outdated advertisements.@footnote{More details can be found in
182@uref{https://gnunet.org/transports, A Transport Layer Abstraction for Peer-to-Peer Networks}}
183
184@cindex Resource Sharing
185@node Accounting to Encourage Resource Sharing
186@subsection Accounting to Encourage Resource Sharing
187
188Most distributed P2P networks suffer from a lack of defenses or
189precautions against attacks in the form of freeloading.
190While the intentions of an attacker and a freeloader are different, their
191effect on the network is the same; they both render it useless.
192Most simple attacks on networks such as Gnutella involve flooding the
193network with traffic, particularly with queries that are, in the worst
194case, multiplied by the network.
195
196In order to ensure that freeloaders or attackers have a minimal impact on
197the network, GNUnet's file-sharing implementation tries to distinguish
198good (contributing) nodes from malicious (freeloading) nodes. In GNUnet,
199every file-sharing node keeps track of the behavior of every other node it
200has been in contact with. Many requests (depending on the application) are
201transmitted with a priority (or importance) level. That priority is used
202to establish how important the sender believes this request is. If a peer
203responds to an important request, the recipient will increase its trust in
204the responder: the responder contributed resources. If a peer is too busy
205to answer all requests, it needs to prioritize. For that, peers to not
206take the priorities of the requests received at face value.
207First, they check how much they trust the sender, and depending on that
208amount of trust they assign the request a (possibly lower) effective
209priority. Then, they drop the requests with the lowest effective priority
210to satisfy their resource constraints. This way, GNUnet's economic model
211ensures that nodes that are not currently considered to have a surplus in
212contributions will not be served if the network load is high.@footnote{Mor
213e details can be found in @uref{https://gnunet.org/ebe, this paper}}
214
215@cindex Confidentiality
216@node Confidentiality
217@subsection Confidentiality
218
219Adversaries outside of GNUnet are not supposed to know what kind of
220actions a peer is involved in. Only the specific neighbor of a peer that
221is the corresponding sender or recipient of a message may know its
222contents, and even then application protocols may place further
223restrictions on that knowledge.
224In order to ensure confidentiality, GNUnet uses link encryption, that is
225each message exchanged between two peers is encrypted using a pair of
226keys only known to these two peers.
227Encrypting traffic like this makes any kind of traffic analysis much
228harder. Naturally, for some applications, it may still be desirable if
229even neighbors cannot determine the concrete contents of a message.
230In GNUnet, this problem is addressed by the specific application-level
231protocols (see for example, deniability and anonymity in anonymous file
232sharing).
233
234@cindex Anonymity
235@node Anonymity
236@subsection Anonymity
237
238@menu
239* How file-sharing achieves Anonymity::
240@end menu
241
242Providing anonymity for users is the central goal for the anonymous
243file-sharing application. Many other design decisions follow in the
244footsteps of this requirement.
245Anonymity is never absolute. While there are various
246@uref{https://gnunet.org/anonymity_metric, scientific metrics} that can
247help quantify the level of anonymity that a given mechanism provides,
248there is no such thing as complete anonymity.
249GNUnet's file-sharing implementation allows users to select for each
250operation (publish, search, download) the desired level of anonymity.
251The metric used is the amount of cover traffic available to hide the
252request.
253While this metric is not as good as, for example, the theoretical metric
254given in @uref{https://gnunet.org/anonymity_metric, scientific metrics},
255it is probably the best metric available to a peer with a purely local
256view of the world that does not rely on unreliable external information.
257The default anonymity level is 1, which uses anonymous routing but
258imposes no minimal requirements on cover traffic. It is possible
259to forego anonymity when this is not required. The anonymity level of 0
260allows GNUnet to use more efficient, non-anonymous routing.
261
262@cindex How file-sharing achieves Anonymity
263@node How file-sharing achieves Anonymity
264@subsubsection How file-sharing achieves Anonymity
265
266Contrary to other designs, we do not believe that users achieve strong
267anonymity just because their requests are obfuscated by a couple of
268indirections. This is not sufficient if the adversary uses traffic
269analysis.
270The threat model used for anonymous file sharing in GNUnet assumes that
271the adversary is quite powerful.
272In particular, we assume that the adversary can see all the traffic on
273the Internet. And while we assume that the adversary
274can not break our encryption, we assume that the adversary has many
275participating nodes in the network and that it can thus see many of the
276node-to-node interactions since it controls some of the nodes.
277
278The system tries to achieve anonymity based on the idea that users can be
279anonymous if they can hide their actions in the traffic created by other
280users.
281Hiding actions in the traffic of other users requires participating in the
282traffic, bringing back the traditional technique of using indirection and
283source rewriting. Source rewriting is required to gain anonymity since
284otherwise an adversary could tell if a message originated from a host by
285looking at the source address. If all packets look like they originate
286from a node, the adversary can not tell which ones originate from that
287node and which ones were routed.
288Note that in this mindset, any node can decide to break the
289source-rewriting paradigm without violating the protocol, as this
290only reduces the amount of traffic that a node can hide its own traffic
291in.
292
293If we want to hide our actions in the traffic of other nodes, we must make
294our traffic indistinguishable from the traffic that we route for others.
295As our queries must have us as the receiver of the reply
296(otherwise they would be useless), we must put ourselves as the receiver
297of replies that actually go to other hosts; in other words, we must
298indirect replies.
299Unlike other systems, in anonymous file-sharing as implemented on top of
300GNUnet we do not have to indirect the replies if we don't think we need
301more traffic to hide our own actions.
302
303This increases the efficiency of the network as we can indirect less under
304higher load.@footnote{More details can be found in
305@uref{https://gnunet.org/gap, this paper}}
306
307@cindex Deniability
308@node Deniability
309@subsection Deniability
310
311Even if the user that downloads data and the server that provides data are
312anonymous, the intermediaries may still be targets. In particular, if the
313intermediaries can find out which queries or which content they are
314processing, a strong adversary could try to force them to censor
315certain materials.
316
317With the file-encoding used by GNUnet's anonymous file-sharing, this
318problem does not arise.
319The reason is that queries and replies are transmitted in
320an encrypted format such that intermediaries cannot tell what the query
321is for or what the content is about. Mind that this is not the same
322encryption as the link-encryption between the nodes. GNUnet has
323encryption on the network layer (link encryption, confidentiality,
324authentication) and again on the application layer (provided
325by @command{gnunet-publish}, @command{gnunet-download},
326@command{gnunet-search} and @command{gnunet-gtk}).@footnote{More details
327can be found @uref{https://gnunet.org/encoding, here}}
328
329@cindex Peer Identities
330@node Peer Identities
331@subsection Peer Identities
332
333Peer identities are used to identify peers in the network and are unique
334for each peer. The identity for a peer is simply its public key, which is
335generated along with a private key the peer is started for the first time.
336While the identity is binary data, it is often expressed as ASCII string.
337For example, the following is a peer identity as you might see it in
338various places:
339
340@example
341UAT1S6PMPITLBKSJ2DGV341JI6KF7B66AC4JVCN9811NNEGQLUN0
342@end example
343
344@noindent
345You can find your peer identity by running @command{gnunet-peerinfo -s}.
346
347@cindex GNS Zones
348@node Zones in the GNU Name System (GNS Zones)
349@subsection Zones in the GNU Name System (GNS Zones)
350
351GNS zones are similar to those of DNS zones, but instead of a hierarchy of
352authorities to governing their use, GNS zones are controlled by a private
353key.
354When you create a record in a DNS zone, that information stored in your
355nameserver. Anyone trying to resolve your domain then gets pointed
356(hopefully) by the centralised authority to your nameserver.
357Whereas GNS, being decentralised by design, stores that information in
358DHT. The validity of the records is assured cryptographically, by
359signing them with the private key of the respective zone.
360
361Anyone trying to resolve records in a zone your domain can then verify the
362signature on the records they get from the DHT and be assured that they
363are indeed from the respective zone. To make this work, there is a 1:1
364correspondence between zones and their public-private key pairs.
365So when we talk about the owner of a GNS zone, that's really the owner of
366the private key.
367And a user accessing a zone needs to somehow specify the corresponding
368public key first.
369
370@cindex Egos
371@node Egos
372@subsection Egos
373
374Egos are your "identities" in GNUnet. Any user can assume multiple
375identities, for example to separate teir activities online. Egos can
376correspond to pseudonyms or real-world identities. Technically, an
377ego is first of all a public-private key pair.
378