aboutsummaryrefslogtreecommitdiff
path: root/doc/documentation/chapters/keyconcepts.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/documentation/chapters/keyconcepts.texi')
-rw-r--r--doc/documentation/chapters/keyconcepts.texi308
1 files changed, 308 insertions, 0 deletions
diff --git a/doc/documentation/chapters/keyconcepts.texi b/doc/documentation/chapters/keyconcepts.texi
new file mode 100644
index 000000000..55f79f1c7
--- /dev/null
+++ b/doc/documentation/chapters/keyconcepts.texi
@@ -0,0 +1,308 @@
1
2@cindex Key Concepts
3@node Key Concepts
4@chapter Key Concepts
5
6In this section, the fundamental concepts of GNUnet are explained.
7@c FIXME: Use @uref{https://docs.gnunet.org/bib/, research papers}
8@c once we have the new bibliography + subdomain setup.
9Most of them are also described in our research papers.
10First, some of the concepts used in the GNUnet framework are detailed.
11The second part describes concepts specific to anonymous file-sharing.
12
13@menu
14* Authentication::
15* Accounting to Encourage Resource Sharing::
16* Confidentiality::
17* Anonymity::
18* Deniability::
19* Peer Identities::
20* Zones in the GNU Name System (GNS Zones)::
21* Egos::
22@end menu
23
24@cindex Authentication
25@node Authentication
26@section Authentication
27
28Almost all peer-to-peer communications in GNUnet are between mutually
29authenticated peers. The authentication works by using ECDHE, that is a
30DH (Diffie---Hellman) key exchange using ephemeral elliptic curve
31cryptography. The ephemeral ECC (Elliptic Curve Cryptography) keys are
32signed using ECDSA (@uref{http://en.wikipedia.org/wiki/ECDSA, ECDSA}).
33The shared secret from ECDHE is used to create a pair of session keys
34@c FIXME: Long word for HKDF. More FIXMEs: Explain MITM etc.
35(using HKDF) which are then used to encrypt the communication between the
36two peers using both 256-bit AES (Advanced Encryption Standard)
37and 256-bit Twofish (with independently derived secret keys).
38As only the two participating hosts know the shared secret, this
39authenticates each packet
40without requiring signatures each time. GNUnet uses SHA-512
41(Secure Hash Algorithm) hash codes to verify the integrity of messages.
42
43@c FIXME: A while back I got the feedback that I should try and integrate
44@c explanation boxes in the long-run. So we could explain
45@c "man-in-the-middle" and "man-in-the-middle attacks" and other words
46@c which are not common knowledge. MITM is not common knowledge. To be
47@c selfcontained, we should be able to explain words and concepts used in
48@c a chapter or paragraph without hinting at Wikipedia and other online
49@c sources which might not be available or accessible to everyone.
50@c On the other hand we could write an introductionary chapter or book
51@c that we could then reference in each chapter, which sound like it
52@c could be more reusable.
53In GNUnet, the identity of a host is its public key. For that reason,
54man-in-the-middle attacks will not break the authentication or accounting
55goals. Essentially, for GNUnet, the IP of the host has nothing to do with
56the identity of the host. As the public key is the only thing that truly
57matters, faking an IP, a port or any other property of the underlying
58transport protocol is irrelevant. In fact, GNUnet peers can use
59multiple IPs (IPv4 and IPv6) on multiple ports --- or even not use the
60IP protocol at all (by running directly on layer 2).
61@c FIXME: "IP protocol" feels wrong, but could be what people expect, as
62@c IP is "the number" and "IP protocol" the protocol itself in general
63@c knowledge?
64
65@c NOTE: For consistency we will use @code{HELLO}s throughout this Manual.
66GNUnet uses a special type of message to communicate a binding between
67public (ECC) keys to their current network address. These messages are
68commonly called @code{HELLO}s or @code{peer advertisements}.
69They contain the public key of the peer and its current network
70addresses for various transport services.
71A transport service is a special kind of shared library that
72provides (possibly unreliable, out-of-order) message delivery between
73peers.
74For the UDP and TCP transport services, a network address is an IP and a
75port.
76GNUnet can also use other transports (HTTP, HTTPS, WLAN, etc.) which use
77various other forms of addresses. Note that any node can have many
78different active transport services at the same time,
79and each of these can have a different addresses.
80Binding messages expire after at most a week (the timeout can be
81shorter if the user configures the node appropriately).
82This expiration ensures that the network will eventually get rid of
83outdated advertisements.
84@footnote{Ronaldo A. Ferreira, Christian Grothoff, and Paul Ruth.
85A Transport Layer Abstraction for Peer-to-Peer Networks
86Proceedings of the 3rd International Symposium on Cluster Computing
87and the Grid (GRID 2003), 2003.
88(@uref{https://gnunet.org/git/bibliography.git/plain/docs/transport.pdf, https://gnunet.org/git/bibliography.git/plain/docs/transport.pdf})}
89
90@cindex Accounting to Encourage Resource Sharing
91@node Accounting to Encourage Resource Sharing
92@section Accounting to Encourage Resource Sharing
93
94Most distributed P2P networks suffer from a lack of defenses or
95precautions against attacks in the form of freeloading.
96While the intentions of an attacker and a freeloader are different, their
97effect on the network is the same; they both render it useless.
98Most simple attacks on networks such as @command{Gnutella}
99involve flooding the network with traffic, particularly
100with queries that are, in the worst case, multiplied by the network.
101
102In order to ensure that freeloaders or attackers have a minimal impact
103on the network, GNUnet's file-sharing implementation (@code{FS} tries
104to distinguish good (contributing) nodes from malicious (freeloading)
105nodes. In GNUnet, every file-sharing node keeps track of the behavior
106of every other node it has been in contact with. Many requests
107(depending on the application) are transmitted with a priority (or
108importance) level. That priority is used to establish how important
109the sender believes this request is. If a peer responds to an
110important request, the recipient will increase its trust in the
111responder: the responder contributed resources. If a peer is too busy
112to answer all requests, it needs to prioritize. For that, peers do
113not take the priorities of the requests received at face value.
114First, they check how much they trust the sender, and depending on
115that amount of trust they assign the request a (possibly lower)
116effective priority. Then, they drop the requests with the lowest
117effective priority to satisfy their resource constraints. This way,
118GNUnet's economic model ensures that nodes that are not currently
119considered to have a surplus in contributions will not be served if
120the network load is high.
121@footnote{Christian Grothoff. An Excess-Based Economic Model for Resource
122Allocation in Peer-to-Peer Networks. Wirtschaftsinformatik, June 2003.
123(@uref{https://gnunet.org/git/bibliography.git/plain/docs/ebe.pdf, https://gnunet.org/git/bibliography.git/plain/docs/ebe.pdf})}
124@c 2009?
125
126@cindex Confidentiality
127@node Confidentiality
128@section Confidentiality
129
130Adversaries (malicious, bad actors) outside of GNUnet are not supposed
131to know what kind of actions a peer is involved in. Only the specific
132neighbor of a peer that is the corresponding sender or recipient of a
133message may know its contents, and even then application protocols may
134place further restrictions on that knowledge. In order to ensure
135confidentiality, GNUnet uses link encryption, that is each message
136exchanged between two peers is encrypted using a pair of keys only
137known to these two peers. Encrypting traffic like this makes any kind
138of traffic analysis much harder. Naturally, for some applications, it
139may still be desirable if even neighbors cannot determine the concrete
140contents of a message. In GNUnet, this problem is addressed by the
141specific application-level protocols. See for example the following
142sections @pxref{Anonymity}, @pxref{How file-sharing achieves Anonymity},
143and @pxref{Deniability}.
144
145@cindex Anonymity
146@node Anonymity
147@section Anonymity
148
149@menu
150* How file-sharing achieves Anonymity::
151@end menu
152
153Providing anonymity for users is the central goal for the anonymous
154file-sharing application. Many other design decisions follow in the
155footsteps of this requirement.
156Anonymity is never absolute. While there are various
157scientific metrics@footnote{Claudia Díaz, Stefaan Seys, Joris Claessens,
158and Bart Preneel. Towards measuring anonymity.
1592002.
160(@uref{https://gnunet.org/git/bibliography.git/plain/docs/article-89.pdf, https://gnunet.org/git/bibliography.git/plain/docs/article-89.pdf})}
161that can help quantify the level of anonymity that a given mechanism
162provides, there is no such thing as "complete anonymity".
163GNUnet's file-sharing implementation allows users to select for each
164operation (publish, search, download) the desired level of anonymity.
165The metric used is the amount of cover traffic available to hide the
166request.
167While this metric is not as good as, for example, the theoretical metric
168given in scientific metrics@footnote{likewise},
169it is probably the best metric available to a peer with a purely local
170view of the world that does not rely on unreliable external information.
171The default anonymity level is @code{1}, which uses anonymous routing but
172imposes no minimal requirements on cover traffic. It is possible
173to forego anonymity when this is not required. The anonymity level of
174@code{0} allows GNUnet to use more efficient, non-anonymous routing.
175
176@cindex How file-sharing achieves Anonymity
177@node How file-sharing achieves Anonymity
178@subsection How file-sharing achieves Anonymity
179
180Contrary to other designs, we do not believe that users achieve strong
181anonymity just because their requests are obfuscated by a couple of
182indirections. This is not sufficient if the adversary uses traffic
183analysis.
184The threat model used for anonymous file sharing in GNUnet assumes that
185the adversary is quite powerful.
186In particular, we assume that the adversary can see all the traffic on
187the Internet. And while we assume that the adversary
188can not break our encryption, we assume that the adversary has many
189participating nodes in the network and that it can thus see many of the
190node-to-node interactions since it controls some of the nodes.
191
192The system tries to achieve anonymity based on the idea that users can be
193anonymous if they can hide their actions in the traffic created by other
194users.
195Hiding actions in the traffic of other users requires participating in the
196traffic, bringing back the traditional technique of using indirection and
197source rewriting. Source rewriting is required to gain anonymity since
198otherwise an adversary could tell if a message originated from a host by
199looking at the source address. If all packets look like they originate
200from one node, the adversary can not tell which ones originate from that
201node and which ones were routed.
202Note that in this mindset, any node can decide to break the
203source-rewriting paradigm without violating the protocol, as this
204only reduces the amount of traffic that a node can hide its own traffic
205in.
206
207If we want to hide our actions in the traffic of other nodes, we must make
208our traffic indistinguishable from the traffic that we route for others.
209As our queries must have us as the receiver of the reply
210(otherwise they would be useless), we must put ourselves as the receiver
211of replies that actually go to other hosts; in other words, we must
212indirect replies.
213Unlike other systems, in anonymous file-sharing as implemented on top of
214GNUnet we do not have to indirect the replies if we don't think we need
215more traffic to hide our own actions.
216
217This increases the efficiency of the network as we can indirect less under
218higher load.@footnote{Krista Bennett and Christian Grothoff.
219GAP --- practical anonymous networking. In Proceedings of
220Designing Privacy Enhancing Technologies, 2003.
221(@uref{https://gnunet.org/git/bibliography.git/plain/docs/aff.pdf, https://gnunet.org/git/bibliography.git/plain/docs/aff.pdf})}
222
223@cindex Deniability
224@node Deniability
225@section Deniability
226
227Even if the user that downloads data and the server that provides data are
228anonymous, the intermediaries may still be targets. In particular, if the
229intermediaries can find out which queries or which content they are
230processing, a strong adversary could try to force them to censor
231certain materials.
232
233With the file-encoding used by GNUnet's anonymous file-sharing, this
234problem does not arise.
235The reason is that queries and replies are transmitted in
236an encrypted format such that intermediaries cannot tell what the query
237is for or what the content is about. Mind that this is not the same
238encryption as the link-encryption between the nodes. GNUnet has
239encryption on the network layer (link encryption, confidentiality,
240authentication) and again on the application layer (provided
241by @command{gnunet-publish}, @command{gnunet-download},
242@command{gnunet-search} and @command{gnunet-gtk}).
243@footnote{Christian Grothoff, Krista Grothoff, Tzvetan Horozov,
244and Jussi T. Lindgren.
245An Encoding for Censorship-Resistant Sharing.
2462009.
247(@uref{https://gnunet.org/git/bibliography.git/plain/docs/ecrs.pdf, https://gnunet.org/git/bibliography.git/plain/docs/ecrs.pdf})}
248
249@cindex Peer Identities
250@node Peer Identities
251@section Peer Identities
252
253Peer identities are used to identify peers in the network and are unique
254for each peer. The identity for a peer is simply its public key, which is
255generated along with a private key the peer is started for the first time.
256While the identity is binary data, it is often expressed as ASCII string.
257For example, the following is a peer identity as you might see it in
258various places:
259
260@example
261UAT1S6PMPITLBKSJ2DGV341JI6KF7B66AC4JVCN9811NNEGQLUN0
262@end example
263
264@noindent
265You can find your peer identity by running @command{gnunet-peerinfo -s}.
266
267@cindex Zones in the GNU Name System (GNS Zones)
268@node Zones in the GNU Name System (GNS Zones)
269@section Zones in the GNU Name System (GNS Zones)
270
271@c FIXME: Explain or link to an explanation of the concept of public keys
272@c and private keys.
273@c FIXME: Rewrite for the latest GNS changes.
274GNS@footnote{Matthias Wachs, Martin Schanzenbach, and Christian Grothoff.
275A Censorship-Resistant, Privacy-Enhancing and Fully Decentralized Name
276System. In proceedings of 13th International Conference on Cryptology and
277Network Security (CANS 2014). 2014.
278@uref{https://gnunet.org/git/bibliography.git/plain/docs/gns2014wachs.pdf, https://gnunet.org/git/bibliography.git/plain/docs/gns2014wachs.pdf}}
279zones are similar to those of DNS zones, but instead of a hierarchy of
280authorities to governing their use, GNS zones are controlled by a private
281key.
282When you create a record in a DNS zone, that information is stored in your
283nameserver. Anyone trying to resolve your domain then gets pointed
284(hopefully) by the centralised authority to your nameserver.
285Whereas GNS, being fully decentralized by design, stores that information
286in DHT. The validity of the records is assured cryptographically, by
287signing them with the private key of the respective zone.
288
289Anyone trying to resolve records in a zone of your domain can then verify
290the signature of the records they get from the DHT and be assured that
291they are indeed from the respective zone.
292To make this work, there is a 1:1 correspondence between zones and
293their public-private key pairs.
294So when we talk about the owner of a GNS zone, that's really the owner of
295the private key.
296And a user accessing a zone needs to somehow specify the corresponding
297public key first.
298
299@cindex Egos
300@node Egos
301@section Egos
302
303@c what is the difference between peer identity and egos? It seems
304@c like both are linked to public-private key pair.
305Egos are your "identities" in GNUnet. Any user can assume multiple
306identities, for example to separate their activities online. Egos can
307correspond to "pseudonyms" or "real-world identities". Technically an
308ego is first of all a key pair of a public- and private-key.