summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2024-02-24 11:38:38 +0100
committerMartin Schanzenbach <schanzen@gnunet.org>2024-02-26 13:05:34 +0100
commit2eabac0ae82fe5d92b67c8627235ca68e131a407 (patch)
tree29a02903f5708ae6daa653821132d90b73fb687d
parent900656486fbf2f9bab861aba19ca220f77313abb (diff)
downloadgnunet-handbook-2eabac0ae82fe5d92b67c8627235ca68e131a407.tar.gz
gnunet-handbook-2eabac0ae82fe5d92b67c8627235ca68e131a407.zip
move crypto and move confidentiality
-rw-r--r--about.rst225
1 files changed, 112 insertions, 113 deletions
diff --git a/about.rst b/about.rst
index 5bf2b4b..320b180 100644
--- a/about.rst
+++ b/about.rst
@@ -165,6 +165,118 @@ of them are also described in our research papers. First, some of the
165concepts used in the GNUnet framework are detailed. The second part 165concepts used in the GNUnet framework are detailed. The second part
166describes concepts specific to anonymous file-sharing. 166describes concepts specific to anonymous file-sharing.
167 167
168Cryptography
169------------
170
171Adversaries (malicious, bad actors) outside of GNUnet are not supposed
172to know what kind of actions a peer is involved in. Only the specific
173neighbor of a peer that is the corresponding sender or recipient of a
174message may know its contents, and even then application protocols may
175place further restrictions on that knowledge. In order to ensure
176confidentiality, GNUnet uses link encryption, that is each message
177exchanged between two peers is encrypted using a pair of keys only known
178to these two peers. Encrypting traffic like this makes any kind of
179traffic analysis much harder. Naturally, for some applications, it may
180still be desirable if even neighbors cannot determine the concrete
181contents of a message. In GNUnet, this problem is addressed by the
182specific application-level protocols. See for example the following
183sections: `Anonymity <about.md#anonymity>`__, see `How file-sharing
184achieves Anonymity <about.md#how-file-sharing-achieves-anonymity>`__,
185and see `Deniability <about.md#deniability>`__.
186
187Peer Identities
188~~~~~~~~~~~~~~~
189
190In GNUnet, the identity of a host is its public key called **Peer Identity**.
191For that reason, man-in-the-middle attacks will not break the authentication or
192accounting goals. Essentially, for GNUnet, the IP of the host has
193nothing to do with the identity of the host. As the public key is the
194only thing that truly matters, faking an IP, a port or any other
195property of the underlying transport protocol is irrelevant. In fact,
196GNUnet peers can use multiple IPs (IPv4 and IPv6) on multiple ports — or
197even not use the IP protocol at all (by running directly on layer 2).
198
199Peer identities are used to identify peers in the network and are unique
200for each peer. The identity for a peer is simply its public key, which
201is generated along with a private key when the peer is started for the
202first time. While the identity is binary data, it is often expressed as
203an ASCII string. For example, the following is a peer identity as you
204might see it in various places:
205
206::
207
208 UAT1S6PMPITLBKSJ2DGV341JI6KF7B66AC4JVCN9811NNEGQLUN0
209
210You can find your peer identity by running ``gnunet-core``.
211
212Almost all peer-to-peer communications in GNUnet are between mutually
213authenticated peers. The authentication works by using ECDHE, that is a
214DH (Diffie—Hellman) key exchange using ephemeral elliptic curve
215cryptography. The ephemeral ECC (Elliptic Curve Cryptography) keys are
216signed using **EdDSA**. The shared secret from ECDHE is used to create a
217pair of session keys (using HKDF) which are then used to encrypt the
218communication between the two peers using both **256-bit AES**
219and **256-bit Twofish** (with independently derived
220secret keys). As only the two participating hosts know the shared
221secret, this authenticates each packet without requiring signatures each
222time. GNUnet mostly uses the **SHA-512** hash algorithm.
223
224GNUnet uses a special type of message to communicate a binding between
225public (ECC) keys to their current network address. These messages are
226commonly called **HELLOs** or peer advertisements. They contain the public
227key of the peer and its current network addresses for various transport
228services. A transport service is a special kind of shared library that
229provides (possibly unreliable, out-of-order) message delivery between
230peers. For the UDP and TCP transport services, a network address is an
231IP and a port. GNUnet can also use other transports (HTTP, HTTPS, WLAN,
232etc.) which use various other forms of addresses. Note that any node can
233have many different active transport services at the same time, and each
234of these can have a different addresses. Binding messages expire after
235at most a week (the timeout can be shorter if the user configures the
236node appropriately). This expiration ensures that the network will
237eventually get rid of outdated advertisements.
238
239For more information, refer to the following paper:
240
241Ronaldo A. Ferreira, Christian Grothoff, and Paul Ruth. A Transport
242Layer Abstraction for Peer-to-Peer Networks Proceedings of the 3rd
243International Symposium on Cluster Computing and the Grid (GRID 2003),
2442003. (https://git.gnunet.org/bibliography.git/plain/docs/transport.pdf)
245
246
247Egos
248~~~~
249
250**Egos** are your “identities” in GNUnet. Any user can assume multiple
251identities, for example to separate their activities online. Egos can
252correspond to “pseudonyms” or “real-world identities”. Technically an
253ego is first of all a key pair of a public- and private-key.
254The current primary use for Egos are in the GNU Name System as zone keys.
255
256Zones in the GNU Name System
257""""""""""""""""""""""""""""
258
259Egos are used as **GNS zones**.
260
261GNS zones are similar to those of DNS zones, but instead of a hierarchy
262of authorities to governing their use, GNS zones are controlled by a
263private key. When you create a record in a DNS zone, that information is
264stored in your nameserver. Anyone trying to resolve your domain then
265gets pointed (hopefully) by the centralised authority to your
266nameserver. Whereas GNS, being fully decentralized by design, stores
267that information in DHT. The validity of the records is assured
268cryptographically, by signing them with the private key of the
269respective zone.
270
271Anyone trying to resolve records in a zone of your domain can then
272verify the signature of the records they get from the DHT and be assured
273that they are indeed from the respective zone. To make this work, there
274is a 1:1 correspondence between zones and their public-private key
275pairs. So when we talk about the owner of a GNS zone, that’s really the
276owner of the private key. And a user accessing a zone needs to somehow
277specify the corresponding public key first.
278
279For more information, refer to RFC 9498.
168 280
169Accounting to Encourage Resource Sharing 281Accounting to Encourage Resource Sharing
170---------------------------------------- 282----------------------------------------
@@ -201,24 +313,6 @@ An Excess-Based Economic Model for Resource Allocation in Peer-to-Peer
201Networks. Wirtschaftsinformatik, June 2003. 313Networks. Wirtschaftsinformatik, June 2003.
202(https://git.gnunet.org/bibliography.git/plain/docs/ebe.pdf) 314(https://git.gnunet.org/bibliography.git/plain/docs/ebe.pdf)
203 315
204Confidentiality
205---------------
206
207Adversaries (malicious, bad actors) outside of GNUnet are not supposed
208to know what kind of actions a peer is involved in. Only the specific
209neighbor of a peer that is the corresponding sender or recipient of a
210message may know its contents, and even then application protocols may
211place further restrictions on that knowledge. In order to ensure
212confidentiality, GNUnet uses link encryption, that is each message
213exchanged between two peers is encrypted using a pair of keys only known
214to these two peers. Encrypting traffic like this makes any kind of
215traffic analysis much harder. Naturally, for some applications, it may
216still be desirable if even neighbors cannot determine the concrete
217contents of a message. In GNUnet, this problem is addressed by the
218specific application-level protocols. See for example the following
219sections: `Anonymity <about.md#anonymity>`__, see `How file-sharing
220achieves Anonymity <about.md#how-file-sharing-achieves-anonymity>`__,
221and see `Deniability <about.md#deniability>`__.
222 316
223Anonymity 317Anonymity
224--------- 318---------
@@ -337,99 +431,4 @@ Grothoff, Tzvetan Horozov, and Jussi T. Lindgren. An Encoding for
337Censorship-Resistant Sharing. 2009. 431Censorship-Resistant Sharing. 2009.
338(https://git.gnunet.org/bibliography.git/plain/docs/ecrs.pdf) 432(https://git.gnunet.org/bibliography.git/plain/docs/ecrs.pdf)
339 433
340Cryptography
341------------
342
343Peer Identities
344~~~~~~~~~~~~~~~
345
346In GNUnet, the identity of a host is its public key called **Peer Identity**.
347For that reason, man-in-the-middle attacks will not break the authentication or
348accounting goals. Essentially, for GNUnet, the IP of the host has
349nothing to do with the identity of the host. As the public key is the
350only thing that truly matters, faking an IP, a port or any other
351property of the underlying transport protocol is irrelevant. In fact,
352GNUnet peers can use multiple IPs (IPv4 and IPv6) on multiple ports — or
353even not use the IP protocol at all (by running directly on layer 2).
354
355Peer identities are used to identify peers in the network and are unique
356for each peer. The identity for a peer is simply its public key, which
357is generated along with a private key when the peer is started for the
358first time. While the identity is binary data, it is often expressed as
359an ASCII string. For example, the following is a peer identity as you
360might see it in various places:
361
362::
363
364 UAT1S6PMPITLBKSJ2DGV341JI6KF7B66AC4JVCN9811NNEGQLUN0
365
366You can find your peer identity by running ``gnunet-core``.
367
368Almost all peer-to-peer communications in GNUnet are between mutually
369authenticated peers. The authentication works by using ECDHE, that is a
370DH (Diffie—Hellman) key exchange using ephemeral elliptic curve
371cryptography. The ephemeral ECC (Elliptic Curve Cryptography) keys are
372signed using **EdDSA**. The shared secret from ECDHE is used to create a
373pair of session keys (using HKDF) which are then used to encrypt the
374communication between the two peers using both **256-bit AES**
375and **256-bit Twofish** (with independently derived
376secret keys). As only the two participating hosts know the shared
377secret, this authenticates each packet without requiring signatures each
378time. GNUnet mostly uses the **SHA-512** hash algorithm.
379
380GNUnet uses a special type of message to communicate a binding between
381public (ECC) keys to their current network address. These messages are
382commonly called **HELLOs** or peer advertisements. They contain the public
383key of the peer and its current network addresses for various transport
384services. A transport service is a special kind of shared library that
385provides (possibly unreliable, out-of-order) message delivery between
386peers. For the UDP and TCP transport services, a network address is an
387IP and a port. GNUnet can also use other transports (HTTP, HTTPS, WLAN,
388etc.) which use various other forms of addresses. Note that any node can
389have many different active transport services at the same time, and each
390of these can have a different addresses. Binding messages expire after
391at most a week (the timeout can be shorter if the user configures the
392node appropriately). This expiration ensures that the network will
393eventually get rid of outdated advertisements.
394
395For more information, refer to the following paper:
396
397Ronaldo A. Ferreira, Christian Grothoff, and Paul Ruth. A Transport
398Layer Abstraction for Peer-to-Peer Networks Proceedings of the 3rd
399International Symposium on Cluster Computing and the Grid (GRID 2003),
4002003. (https://git.gnunet.org/bibliography.git/plain/docs/transport.pdf)
401
402 434
403Egos
404~~~~
405
406**Egos** are your “identities” in GNUnet. Any user can assume multiple
407identities, for example to separate their activities online. Egos can
408correspond to “pseudonyms” or “real-world identities”. Technically an
409ego is first of all a key pair of a public- and private-key.
410The current primary use for Egos are in the GNU Name System as zone keys.
411
412Zones in the GNU Name System
413~~~~~~~~~~~~~~~~~~~~~~~~~~~~
414
415Egos are used as **GNS zones**.
416
417GNS zones are similar to those of DNS zones, but instead of a hierarchy
418of authorities to governing their use, GNS zones are controlled by a
419private key. When you create a record in a DNS zone, that information is
420stored in your nameserver. Anyone trying to resolve your domain then
421gets pointed (hopefully) by the centralised authority to your
422nameserver. Whereas GNS, being fully decentralized by design, stores
423that information in DHT. The validity of the records is assured
424cryptographically, by signing them with the private key of the
425respective zone.
426
427Anyone trying to resolve records in a zone of your domain can then
428verify the signature of the records they get from the DHT and be assured
429that they are indeed from the respective zone. To make this work, there
430is a 1:1 correspondence between zones and their public-private key
431pairs. So when we talk about the owner of a GNS zone, that’s really the
432owner of the private key. And a user accessing a zone needs to somehow
433specify the corresponding public key first.
434
435For more information, refer to RFC 9498.