aboutsummaryrefslogtreecommitdiff
path: root/doc/documentation
diff options
context:
space:
mode:
Diffstat (limited to 'doc/documentation')
-rw-r--r--doc/documentation/.gitignore7
-rw-r--r--doc/documentation/Makefile.am13
-rw-r--r--doc/documentation/README.txt63
-rw-r--r--doc/documentation/TODO106
-rw-r--r--doc/documentation/agpl-3.0.texi698
-rw-r--r--doc/documentation/chapters/contributing.texi25
-rw-r--r--doc/documentation/chapters/developer.texi616
-rw-r--r--doc/documentation/chapters/installation.texi2355
-rw-r--r--doc/documentation/chapters/keyconcepts.texi308
-rw-r--r--doc/documentation/chapters/philosophy.texi432
-rw-r--r--doc/documentation/chapters/preface.texi171
-rw-r--r--doc/documentation/chapters/terminology.texi23
-rw-r--r--doc/documentation/chapters/user.texi1275
-rw-r--r--doc/documentation/chapters/vocabulary.texi2
-rw-r--r--doc/documentation/gnunet-c-tutorial.texi64
-rw-r--r--doc/documentation/gnunet.texi86
-rw-r--r--doc/documentation/images/gns.dot42
-rw-r--r--doc/documentation/images/gns.eps585
-rw-r--r--doc/documentation/images/gns.jpgbin0 -> 41765 bytes
-rw-r--r--doc/documentation/images/gnunet-gtk-0-10.pngbin72897 -> 0 bytes
-rw-r--r--doc/documentation/tutorial-examples/005.c5
21 files changed, 3516 insertions, 3360 deletions
diff --git a/doc/documentation/.gitignore b/doc/documentation/.gitignore
index 2e914d9c9..f490c3412 100644
--- a/doc/documentation/.gitignore
+++ b/doc/documentation/.gitignore
@@ -1,2 +1,9 @@
1stamp-1 1stamp-1
2version2.texi 2version2.texi
3manual
4*.fn
5*.fns
6*.ky
7*.pg
8*.tp
9*.vr
diff --git a/doc/documentation/Makefile.am b/doc/documentation/Makefile.am
index 991b1926b..b6c666c4d 100644
--- a/doc/documentation/Makefile.am
+++ b/doc/documentation/Makefile.am
@@ -19,7 +19,6 @@ dist_infoimage_DATA = \
19 images/gnunet-0-10-peerinfo.png \ 19 images/gnunet-0-10-peerinfo.png \
20 images/gnunet-gtk-0-10-identity.png \ 20 images/gnunet-gtk-0-10-identity.png \
21 images/gnunet-fs-gtk-0-10-star-tab.png \ 21 images/gnunet-fs-gtk-0-10-star-tab.png \
22 images/gnunet-gtk-0-10.png \
23 images/gnunet-gtk-0-10-download-area.png \ 22 images/gnunet-gtk-0-10-download-area.png \
24 images/gnunet-gtk-0-10-search-selected.png \ 23 images/gnunet-gtk-0-10-search-selected.png \
25 images/gnunet-gtk-0-10-fs-menu.png \ 24 images/gnunet-gtk-0-10-fs-menu.png \
@@ -44,7 +43,8 @@ dist_infoimage_DATA = \
44 images/daemon_lego_block.svg \ 43 images/daemon_lego_block.svg \
45 images/lego_stack.svg \ 44 images/lego_stack.svg \
46 images/service_lego_block.svg \ 45 images/service_lego_block.svg \
47 images/structure.dot 46 images/structure.dot \
47 images/gns.dot
48 48
49# images/$(wildcard *.png) \ 49# images/$(wildcard *.png) \
50# images/$(wildcard *.svg) 50# images/$(wildcard *.svg)
@@ -112,9 +112,9 @@ info_TEXINFOS = \
112 112
113gnunet_TEXINFOS = \ 113gnunet_TEXINFOS = \
114 chapters/developer.texi \ 114 chapters/developer.texi \
115 chapters/terminology.texi \ 115 chapters/preface.texi \
116 chapters/installation.texi \
117 chapters/philosophy.texi \ 116 chapters/philosophy.texi \
117 chapters/installation.texi \
118 chapters/user.texi \ 118 chapters/user.texi \
119 chapters/vocabulary.texi \ 119 chapters/vocabulary.texi \
120 chapters/configuration.texi \ 120 chapters/configuration.texi \
@@ -144,6 +144,7 @@ DISTCLEANFILES = \
144 chapters/terminology.cps \ 144 chapters/terminology.cps \
145 chapters/vocabulary.cps \ 145 chapters/vocabulary.cps \
146 fdl-1.3.cps \ 146 fdl-1.3.cps \
147 agpl-3.0.cps \
147 gpl-3.0.cps 148 gpl-3.0.cps
148 149
149# if HAVE_EXTENDED_DOCUMENTATION_BUILDING 150# if HAVE_EXTENDED_DOCUMENTATION_BUILDING
@@ -166,8 +167,8 @@ lego_stack.png: images/lego_stack.svg
166# echo "@set EDITION $(PACKAGE_VERSION)" >> $@ 167# echo "@set EDITION $(PACKAGE_VERSION)" >> $@
167# echo "@set VERSION $(PACKAGE_VERSION)" >> $@ 168# echo "@set VERSION $(PACKAGE_VERSION)" >> $@
168 169
169# Workaround for makeinfo error. Whcih in turn introduces more 170# Workaround for makeinfo error. Which in turn introduces more
170# date-related 'warnings'. Well. 171# date-related 'warnings' for GNUism. Well.
171version2.texi: 172version2.texi:
172 echo "@set UPDATED $(date +'%d %B %Y')" > $@ 173 echo "@set UPDATED $(date +'%d %B %Y')" > $@
173 echo "@set UPDATED-MONTH $(date +'%B %Y')" >> $@ 174 echo "@set UPDATED-MONTH $(date +'%B %Y')" >> $@
diff --git a/doc/documentation/README.txt b/doc/documentation/README.txt
deleted file mode 100644
index 9e76394c3..000000000
--- a/doc/documentation/README.txt
+++ /dev/null
@@ -1,63 +0,0 @@
1* Completion Levels:
2
3** chapters/philosophy: around 100% fixed after initial export.
4
5* What's left to do
6
7- Which Texlive modules are needed? Decrease the size.
8 - distro specific, or can we set requirements?
9- Update the content of gnunet documentation.
10- XXX: images are only generated for the html documentation
11 with gendoc.sh … FIXME!
12- XXX: png,dot, and svg images MUST be converted to eps by the
13 build system. Right now they aren't, as a result: No images.
14
15* How to use (hack) on this
16
17** with guix
18
19Adjust accordingly, ie read the Guix Documentation:
20setenv GUIX_PACKAGE_PATH "gnunet/contrib/packages/guix/packages"
21guix environment gnunet-doc
22and
23guix build -f contrib/packages/guix/gnunet-doc.scm
24
25** without guix
26
27You need to have Texinfo and Texlive in your path.
28sh bootstrap
29./configure --enable-documentation
30cd doc
31make (format you want)
32
33for example: make html, make info, make pdf
34
35* structure (relations)
36
37** gnunet.texi
38 -> chapters/developer.texi
39 -> chapters/installation.texi
40 -> chapters/philosophy.texi
41 -> chapters/user.texi
42 -> chapters/vocabulary.texi
43 -> images/*
44 -> gpl-3.0.texi
45 -> fdl-1.3.texi
46
47** gnunet-c-tutorial.texi
48 -> figs/Service.pdf
49 -> figs/System.pdf
50 -> tutorial-examples/*.c
51 -> gpl-3.0.texi
52 -> fdl-1.3.texi
53
54- gnunet-c-tutorial-v1.pdf: original LaTeX "gnunet-c-tutorial.pdf".
55- man folder: the man pages.
56- doxygen folder
57- outdated-and-old-installation-instructions.txt: self described within the file.
58
59
60Use `gendocs', add to the manual/ directory of the web site.
61
62 $ cd doc
63 $ gendocs.sh gnunet "GNUnet 0.10.X Reference Manual"
diff --git a/doc/documentation/TODO b/doc/documentation/TODO
new file mode 100644
index 000000000..fa1ce7a23
--- /dev/null
+++ b/doc/documentation/TODO
@@ -0,0 +1,106 @@
1-*- mode: org -*-
2
3TODO - or: the Documentation Masterplan.
4
5To some extent this duplicates the Mantis tickets on this topic.
6
7* Motivation
8My motivation is to read into good documentations and create a self-contained collection of books,
9which can be understood without expecting too much background knowledge in every topic.
10** User Handbook:
11The content of the User book should be mostly concerned with our current and future graphical (gtk
12as well as terminal user interface) applications. After reading Preface and maybe Philosophy, the
13person reading the User Handbook should understand with the least possible strugle the application
14they intend to use. Examples should be given and concepts explained.
15** Installation Handbook:
16As seen with requests on the mailinglist, we will have to pick up people where they are, similar
17to the User Handbook. People already used to compiling and installing should have the chance to
18skip to the end, everyone else should: have step-by-step instructions, which will either already
19include OS specific notes or will be followed by OS specific instructions. It is up for discussion
20if configuring GNUnet is 'User Handbook' or 'Installation Handbook', the current mixture in
21the Installation Handbook is not good.
22** Contributors Handbook:
23This chapter could either be reduced to a couple of sections following the theme of 'contributing
24to GNUnet' or the chapter could be extended. If we extend it, we should explain a range of topics
25that can be useful for contributors. It can be understood as a recommended reading in addition to
26the Developer Handbook then, and the Developer Handbook could simply become a better commented
27reference for the code-base.
28** Developer Handbook:
29As outlined in the last sentences, the Developer Handbook could be reduced to the necessary bits
30with enough comments to be understood without reading into the papers published over the years.
31
32
33* DONE 1. Drupal books export to LaTeX.
34* DONE 2. LaTeX conversion to Texinfo.
35* DONE 3. (initial) Fixup of syntax errors introduced in conversion chain.
36* TODO 4. Update content.
37* TODO 5. Create API Reference or similar
38* TODO 6. Create Concept Index
39* TODO 7. Create Procedure Index
40* TODO 8. Create Type Index
41* TODO 9. Create Functions Index
42* TODO 10. Properly address concerns and criticism people had/have on the old and current documentation.
43* TODO 11. Reorder structure
44* TODO more TODO.
45
46
47* Status Progress / Completion Levels
48
49** chapters/philosophy: around 100% fixed after initial export.
50
51* System Integration Tasks
52
53* Which Texlive modules are needed for every output we generate?
54* Generate the images from their dot sources.
55
56* How to use (hack) on this
57
58This section will find its way into the documentation sooner or later.
59Potentially outdated or inaccurate bits.
60
61** with guix
62
63Adjust accordingly, ie read the Guix Documentation:
64guix environment gnunet-doc
65and
66guix build -f contrib/packages/guix/gnunet-doc.scm
67
68** without guix
69
70You need to have Texinfo and Texlive in your path.
71sh bootstrap
72./configure --enable-documentation
73cd doc
74make (format you want)
75
76for example: make html, make info, make pdf
77
78* structure (relations) (old!)
79
80** gnunet.texi
81 -> chapters/developer.texi
82 -> chapters/installation.texi
83 -> chapters/philosophy.texi
84 -> chapters/user.texi
85 -> chapters/vocabulary.texi
86 -> images/*
87 -> gpl-3.0.texi
88 -> fdl-1.3.texi
89
90** gnunet-c-tutorial.texi
91 -> figs/Service.pdf
92 -> figs/System.pdf
93 -> tutorial-examples/*.c
94 -> gpl-3.0.texi
95 -> fdl-1.3.texi
96
97- gnunet-c-tutorial-v1.pdf: original LaTeX "gnunet-c-tutorial.pdf".
98- man folder: the man pages.
99- doxygen folder
100- outdated-and-old-installation-instructions.txt: self described within the file.
101
102
103Use `gendocs', add to the manual/ directory of the web site.
104
105 $ cd doc
106 $ gendocs.sh gnunet "GNUnet 0.10.X Reference Manual"
diff --git a/doc/documentation/agpl-3.0.texi b/doc/documentation/agpl-3.0.texi
new file mode 100644
index 000000000..eabb0c6df
--- /dev/null
+++ b/doc/documentation/agpl-3.0.texi
@@ -0,0 +1,698 @@
1@c The GNU Affero General Public License.
2@center Version 3, 19 November 2007
3
4@c This file is intended to be included within another document,
5@c hence no sectioning command or @node.
6
7@display
8Copyright @copyright{} 2007 Free Software Foundation, Inc. @url{https://fsf.org/}
9
10Everyone is permitted to copy and distribute verbatim copies of this
11license document, but changing it is not allowed.
12@end display
13
14@heading Preamble
15
16The GNU Affero General Public License is a free, copyleft license
17for software and other kinds of works, specifically designed to ensure
18cooperation with the community in the case of network server software.
19
20The licenses for most software and other practical works are
21designed to take away your freedom to share and change the works. By
22contrast, our General Public Licenses are intended to guarantee your
23freedom to share and change all versions of a program--to make sure it
24remains free software for all its users.
25
26When we speak of free software, we are referring to freedom, not
27price. Our General Public Licenses are designed to make sure that you
28have the freedom to distribute copies of free software (and charge for
29them if you wish), that you receive source code or can get it if you
30want it, that you can change the software or use pieces of it in new
31free programs, and that you know you can do these things.
32
33Developers that use our General Public Licenses protect your rights
34with two steps: (1) assert copyright on the software, and (2) offer
35you this License which gives you legal permission to copy, distribute
36and/or modify the software.
37
38A secondary benefit of defending all users' freedom is that
39improvements made in alternate versions of the program, if they
40receive widespread use, become available for other developers to
41incorporate. Many developers of free software are heartened and
42encouraged by the resulting cooperation. However, in the case of
43software used on network servers, this result may fail to come about.
44The GNU General Public License permits making a modified version and
45letting the public access it on a server without ever releasing its
46source code to the public.
47
48The GNU Affero General Public License is designed specifically to
49ensure that, in such cases, the modified source code becomes available
50to the community. It requires the operator of a network server to
51provide the source code of the modified version running there to the
52users of that server. Therefore, public use of a modified version, on
53a publicly accessible server, gives the public access to the source
54code of the modified version.
55
56An older license, called the Affero General Public License and
57published by Affero, was designed to accomplish similar goals. This is
58a different license, not a version of the Affero GPL, but Affero has
59released a new version of the Affero GPL which permits relicensing under
60this license.
61
62The precise terms and conditions for copying, distribution and
63modification follow.
64
65@heading TERMS AND CONDITIONS
66
67@enumerate 0
68@item Definitions.
69
70``This License'' refers to version 3 of the GNU Affero General Public License.
71
72``Copyright'' also means copyright-like laws that apply to other kinds
73of works, such as semiconductor masks.
74
75``The Program'' refers to any copyrightable work licensed under this
76License. Each licensee is addressed as ``you''. ``Licensees'' and
77``recipients'' may be individuals or organizations.
78
79To ``modify'' a work means to copy from or adapt all or part of the work
80in a fashion requiring copyright permission, other than the making of
81an exact copy. The resulting work is called a ``modified version'' of
82the earlier work or a work ``based on'' the earlier work.
83
84A ``covered work'' means either the unmodified Program or a work based
85on the Program.
86
87To ``propagate'' a work means to do anything with it that, without
88permission, would make you directly or secondarily liable for
89infringement under applicable copyright law, except executing it on a
90computer or modifying a private copy. Propagation includes copying,
91distribution (with or without modification), making available to the
92public, and in some countries other activities as well.
93
94To ``convey'' a work means any kind of propagation that enables other
95parties to make or receive copies. Mere interaction with a user
96through a computer network, with no transfer of a copy, is not
97conveying.
98
99An interactive user interface displays ``Appropriate Legal Notices'' to
100the extent that it includes a convenient and prominently visible
101feature that (1) displays an appropriate copyright notice, and (2)
102tells the user that there is no warranty for the work (except to the
103extent that warranties are provided), that licensees may convey the
104work under this License, and how to view a copy of this License. If
105the interface presents a list of user commands or options, such as a
106menu, a prominent item in the list meets this criterion.
107
108@item Source Code.
109
110The ``source code'' for a work means the preferred form of the work for
111making modifications to it. ``Object code'' means any non-source form
112of a work.
113
114A ``Standard Interface'' means an interface that either is an official
115standard defined by a recognized standards body, or, in the case of
116interfaces specified for a particular programming language, one that
117is widely used among developers working in that language.
118
119The ``System Libraries'' of an executable work include anything, other
120than the work as a whole, that (a) is included in the normal form of
121packaging a Major Component, but which is not part of that Major
122Component, and (b) serves only to enable use of the work with that
123Major Component, or to implement a Standard Interface for which an
124implementation is available to the public in source code form. A
125``Major Component'', in this context, means a major essential component
126(kernel, window system, and so on) of the specific operating system
127(if any) on which the executable work runs, or a compiler used to
128produce the work, or an object code interpreter used to run it.
129
130The ``Corresponding Source'' for a work in object code form means all
131the source code needed to generate, install, and (for an executable
132work) run the object code and to modify the work, including scripts to
133control those activities. However, it does not include the work's
134System Libraries, or general-purpose tools or generally available free
135programs which are used unmodified in performing those activities but
136which are not part of the work. For example, Corresponding Source
137includes interface definition files associated with source files for
138the work, and the source code for shared libraries and dynamically
139linked subprograms that the work is specifically designed to require,
140such as by intimate data communication or control flow between those
141subprograms and other parts of the work.
142
143The Corresponding Source need not include anything that users can
144regenerate automatically from other parts of the Corresponding Source.
145
146The Corresponding Source for a work in source code form is that same
147work.
148
149@item Basic Permissions.
150
151All rights granted under this License are granted for the term of
152copyright on the Program, and are irrevocable provided the stated
153conditions are met. This License explicitly affirms your unlimited
154permission to run the unmodified Program. The output from running a
155covered work is covered by this License only if the output, given its
156content, constitutes a covered work. This License acknowledges your
157rights of fair use or other equivalent, as provided by copyright law.
158
159You may make, run and propagate covered works that you do not convey,
160without conditions so long as your license otherwise remains in force.
161You may convey covered works to others for the sole purpose of having
162them make modifications exclusively for you, or provide you with
163facilities for running those works, provided that you comply with the
164terms of this License in conveying all material for which you do not
165control copyright. Those thus making or running the covered works for
166you must do so exclusively on your behalf, under your direction and
167control, on terms that prohibit them from making any copies of your
168copyrighted material outside their relationship with you.
169
170Conveying under any other circumstances is permitted solely under the
171conditions stated below. Sublicensing is not allowed; section 10
172makes it unnecessary.
173
174@item Protecting Users' Legal Rights From Anti-Circumvention Law.
175
176No covered work shall be deemed part of an effective technological
177measure under any applicable law fulfilling obligations under article
17811 of the WIPO copyright treaty adopted on 20 December 1996, or
179similar laws prohibiting or restricting circumvention of such
180measures.
181
182When you convey a covered work, you waive any legal power to forbid
183circumvention of technological measures to the extent such
184circumvention is effected by exercising rights under this License with
185respect to the covered work, and you disclaim any intention to limit
186operation or modification of the work as a means of enforcing, against
187the work's users, your or third parties' legal rights to forbid
188circumvention of technological measures.
189
190@item Conveying Verbatim Copies.
191
192You may convey verbatim copies of the Program's source code as you
193receive it, in any medium, provided that you conspicuously and
194appropriately publish on each copy an appropriate copyright notice;
195keep intact all notices stating that this License and any
196non-permissive terms added in accord with section 7 apply to the code;
197keep intact all notices of the absence of any warranty; and give all
198recipients a copy of this License along with the Program.
199
200You may charge any price or no price for each copy that you convey,
201and you may offer support or warranty protection for a fee.
202
203@item Conveying Modified Source Versions.
204
205You may convey a work based on the Program, or the modifications to
206produce it from the Program, in the form of source code under the
207terms of section 4, provided that you also meet all of these
208conditions:
209
210@enumerate a
211@item
212The work must carry prominent notices stating that you modified it,
213and giving a relevant date.
214
215@item
216The work must carry prominent notices stating that it is released
217under this License and any conditions added under section 7. This
218requirement modifies the requirement in section 4 to ``keep intact all
219notices''.
220
221@item
222You must license the entire work, as a whole, under this License to
223anyone who comes into possession of a copy. This License will
224therefore apply, along with any applicable section 7 additional terms,
225to the whole of the work, and all its parts, regardless of how they
226are packaged. This License gives no permission to license the work in
227any other way, but it does not invalidate such permission if you have
228separately received it.
229
230@item
231If the work has interactive user interfaces, each must display
232Appropriate Legal Notices; however, if the Program has interactive
233interfaces that do not display Appropriate Legal Notices, your work
234need not make them do so.
235@end enumerate
236
237A compilation of a covered work with other separate and independent
238works, which are not by their nature extensions of the covered work,
239and which are not combined with it such as to form a larger program,
240in or on a volume of a storage or distribution medium, is called an
241``aggregate'' if the compilation and its resulting copyright are not
242used to limit the access or legal rights of the compilation's users
243beyond what the individual works permit. Inclusion of a covered work
244in an aggregate does not cause this License to apply to the other
245parts of the aggregate.
246
247@item Conveying Non-Source Forms.
248
249You may convey a covered work in object code form under the terms of
250sections 4 and 5, provided that you also convey the machine-readable
251Corresponding Source under the terms of this License, in one of these
252ways:
253
254@enumerate a
255@item
256Convey the object code in, or embodied in, a physical product
257(including a physical distribution medium), accompanied by the
258Corresponding Source fixed on a durable physical medium customarily
259used for software interchange.
260
261@item
262Convey the object code in, or embodied in, a physical product
263(including a physical distribution medium), accompanied by a written
264offer, valid for at least three years and valid for as long as you
265offer spare parts or customer support for that product model, to give
266anyone who possesses the object code either (1) a copy of the
267Corresponding Source for all the software in the product that is
268covered by this License, on a durable physical medium customarily used
269for software interchange, for a price no more than your reasonable
270cost of physically performing this conveying of source, or (2) access
271to copy the Corresponding Source from a network server at no charge.
272
273@item
274Convey individual copies of the object code with a copy of the written
275offer to provide the Corresponding Source. This alternative is
276allowed only occasionally and noncommercially, and only if you
277received the object code with such an offer, in accord with subsection
2786b.
279
280@item
281Convey the object code by offering access from a designated place
282(gratis or for a charge), and offer equivalent access to the
283Corresponding Source in the same way through the same place at no
284further charge. You need not require recipients to copy the
285Corresponding Source along with the object code. If the place to copy
286the object code is a network server, the Corresponding Source may be
287on a different server (operated by you or a third party) that supports
288equivalent copying facilities, provided you maintain clear directions
289next to the object code saying where to find the Corresponding Source.
290Regardless of what server hosts the Corresponding Source, you remain
291obligated to ensure that it is available for as long as needed to
292satisfy these requirements.
293
294@item
295Convey the object code using peer-to-peer transmission, provided you
296inform other peers where the object code and Corresponding Source of
297the work are being offered to the general public at no charge under
298subsection 6d.
299
300@end enumerate
301
302A separable portion of the object code, whose source code is excluded
303from the Corresponding Source as a System Library, need not be
304included in conveying the object code work.
305
306A ``User Product'' is either (1) a ``consumer product'', which means any
307tangible personal property which is normally used for personal,
308family, or household purposes, or (2) anything designed or sold for
309incorporation into a dwelling. In determining whether a product is a
310consumer product, doubtful cases shall be resolved in favor of
311coverage. For a particular product received by a particular user,
312``normally used'' refers to a typical or common use of that class of
313product, regardless of the status of the particular user or of the way
314in which the particular user actually uses, or expects or is expected
315to use, the product. A product is a consumer product regardless of
316whether the product has substantial commercial, industrial or
317non-consumer uses, unless such uses represent the only significant
318mode of use of the product.
319
320``Installation Information'' for a User Product means any methods,
321procedures, authorization keys, or other information required to
322install and execute modified versions of a covered work in that User
323Product from a modified version of its Corresponding Source. The
324information must suffice to ensure that the continued functioning of
325the modified object code is in no case prevented or interfered with
326solely because modification has been made.
327
328If you convey an object code work under this section in, or with, or
329specifically for use in, a User Product, and the conveying occurs as
330part of a transaction in which the right of possession and use of the
331User Product is transferred to the recipient in perpetuity or for a
332fixed term (regardless of how the transaction is characterized), the
333Corresponding Source conveyed under this section must be accompanied
334by the Installation Information. But this requirement does not apply
335if neither you nor any third party retains the ability to install
336modified object code on the User Product (for example, the work has
337been installed in ROM).
338
339The requirement to provide Installation Information does not include a
340requirement to continue to provide support service, warranty, or
341updates for a work that has been modified or installed by the
342recipient, or for the User Product in which it has been modified or
343installed. Access to a network may be denied when the modification
344itself materially and adversely affects the operation of the network
345or violates the rules and protocols for communication across the
346network.
347
348Corresponding Source conveyed, and Installation Information provided,
349in accord with this section must be in a format that is publicly
350documented (and with an implementation available to the public in
351source code form), and must require no special password or key for
352unpacking, reading or copying.
353
354@item Additional Terms.
355
356``Additional permissions'' are terms that supplement the terms of this
357License by making exceptions from one or more of its conditions.
358Additional permissions that are applicable to the entire Program shall
359be treated as though they were included in this License, to the extent
360that they are valid under applicable law. If additional permissions
361apply only to part of the Program, that part may be used separately
362under those permissions, but the entire Program remains governed by
363this License without regard to the additional permissions.
364
365When you convey a copy of a covered work, you may at your option
366remove any additional permissions from that copy, or from any part of
367it. (Additional permissions may be written to require their own
368removal in certain cases when you modify the work.) You may place
369additional permissions on material, added by you to a covered work,
370for which you have or can give appropriate copyright permission.
371
372Notwithstanding any other provision of this License, for material you
373add to a covered work, you may (if authorized by the copyright holders
374of that material) supplement the terms of this License with terms:
375
376@enumerate a
377@item
378Disclaiming warranty or limiting liability differently from the terms
379of sections 15 and 16 of this License; or
380
381@item
382Requiring preservation of specified reasonable legal notices or author
383attributions in that material or in the Appropriate Legal Notices
384displayed by works containing it; or
385
386@item
387Prohibiting misrepresentation of the origin of that material, or
388requiring that modified versions of such material be marked in
389reasonable ways as different from the original version; or
390
391@item
392Limiting the use for publicity purposes of names of licensors or
393authors of the material; or
394
395@item
396Declining to grant rights under trademark law for use of some trade
397names, trademarks, or service marks; or
398
399@item
400Requiring indemnification of licensors and authors of that material by
401anyone who conveys the material (or modified versions of it) with
402contractual assumptions of liability to the recipient, for any
403liability that these contractual assumptions directly impose on those
404licensors and authors.
405@end enumerate
406
407All other non-permissive additional terms are considered ``further
408restrictions'' within the meaning of section 10. If the Program as you
409received it, or any part of it, contains a notice stating that it is
410governed by this License along with a term that is a further
411restriction, you may remove that term. If a license document contains
412a further restriction but permits relicensing or conveying under this
413License, you may add to a covered work material governed by the terms
414of that license document, provided that the further restriction does
415not survive such relicensing or conveying.
416
417If you add terms to a covered work in accord with this section, you
418must place, in the relevant source files, a statement of the
419additional terms that apply to those files, or a notice indicating
420where to find the applicable terms.
421
422Additional terms, permissive or non-permissive, may be stated in the
423form of a separately written license, or stated as exceptions; the
424above requirements apply either way.
425
426@item Termination.
427
428You may not propagate or modify a covered work except as expressly
429provided under this License. Any attempt otherwise to propagate or
430modify it is void, and will automatically terminate your rights under
431this License (including any patent licenses granted under the third
432paragraph of section 11).
433
434However, if you cease all violation of this License, then your license
435from a particular copyright holder is reinstated (a) provisionally,
436unless and until the copyright holder explicitly and finally
437terminates your license, and (b) permanently, if the copyright holder
438fails to notify you of the violation by some reasonable means prior to
43960 days after the cessation.
440
441Moreover, your license from a particular copyright holder is
442reinstated permanently if the copyright holder notifies you of the
443violation by some reasonable means, this is the first time you have
444received notice of violation of this License (for any work) from that
445copyright holder, and you cure the violation prior to 30 days after
446your receipt of the notice.
447
448Termination of your rights under this section does not terminate the
449licenses of parties who have received copies or rights from you under
450this License. If your rights have been terminated and not permanently
451reinstated, you do not qualify to receive new licenses for the same
452material under section 10.
453
454@item Acceptance Not Required for Having Copies.
455
456You are not required to accept this License in order to receive or run
457a copy of the Program. Ancillary propagation of a covered work
458occurring solely as a consequence of using peer-to-peer transmission
459to receive a copy likewise does not require acceptance. However,
460nothing other than this License grants you permission to propagate or
461modify any covered work. These actions infringe copyright if you do
462not accept this License. Therefore, by modifying or propagating a
463covered work, you indicate your acceptance of this License to do so.
464
465@item Automatic Licensing of Downstream Recipients.
466
467Each time you convey a covered work, the recipient automatically
468receives a license from the original licensors, to run, modify and
469propagate that work, subject to this License. You are not responsible
470for enforcing compliance by third parties with this License.
471
472An ``entity transaction'' is a transaction transferring control of an
473organization, or substantially all assets of one, or subdividing an
474organization, or merging organizations. If propagation of a covered
475work results from an entity transaction, each party to that
476transaction who receives a copy of the work also receives whatever
477licenses to the work the party's predecessor in interest had or could
478give under the previous paragraph, plus a right to possession of the
479Corresponding Source of the work from the predecessor in interest, if
480the predecessor has it or can get it with reasonable efforts.
481
482You may not impose any further restrictions on the exercise of the
483rights granted or affirmed under this License. For example, you may
484not impose a license fee, royalty, or other charge for exercise of
485rights granted under this License, and you may not initiate litigation
486(including a cross-claim or counterclaim in a lawsuit) alleging that
487any patent claim is infringed by making, using, selling, offering for
488sale, or importing the Program or any portion of it.
489
490@item Patents.
491
492A ``contributor'' is a copyright holder who authorizes use under this
493License of the Program or a work on which the Program is based. The
494work thus licensed is called the contributor's ``contributor version''.
495
496A contributor's ``essential patent claims'' are all patent claims owned
497or controlled by the contributor, whether already acquired or
498hereafter acquired, that would be infringed by some manner, permitted
499by this License, of making, using, or selling its contributor version,
500but do not include claims that would be infringed only as a
501consequence of further modification of the contributor version. For
502purposes of this definition, ``control'' includes the right to grant
503patent sublicenses in a manner consistent with the requirements of
504this License.
505
506Each contributor grants you a non-exclusive, worldwide, royalty-free
507patent license under the contributor's essential patent claims, to
508make, use, sell, offer for sale, import and otherwise run, modify and
509propagate the contents of its contributor version.
510
511In the following three paragraphs, a ``patent license'' is any express
512agreement or commitment, however denominated, not to enforce a patent
513(such as an express permission to practice a patent or covenant not to
514sue for patent infringement). To ``grant'' such a patent license to a
515party means to make such an agreement or commitment not to enforce a
516patent against the party.
517
518If you convey a covered work, knowingly relying on a patent license,
519and the Corresponding Source of the work is not available for anyone
520to copy, free of charge and under the terms of this License, through a
521publicly available network server or other readily accessible means,
522then you must either (1) cause the Corresponding Source to be so
523available, or (2) arrange to deprive yourself of the benefit of the
524patent license for this particular work, or (3) arrange, in a manner
525consistent with the requirements of this License, to extend the patent
526license to downstream recipients. ``Knowingly relying'' means you have
527actual knowledge that, but for the patent license, your conveying the
528covered work in a country, or your recipient's use of the covered work
529in a country, would infringe one or more identifiable patents in that
530country that you have reason to believe are valid.
531
532If, pursuant to or in connection with a single transaction or
533arrangement, you convey, or propagate by procuring conveyance of, a
534covered work, and grant a patent license to some of the parties
535receiving the covered work authorizing them to use, propagate, modify
536or convey a specific copy of the covered work, then the patent license
537you grant is automatically extended to all recipients of the covered
538work and works based on it.
539
540A patent license is ``discriminatory'' if it does not include within the
541scope of its coverage, prohibits the exercise of, or is conditioned on
542the non-exercise of one or more of the rights that are specifically
543granted under this License. You may not convey a covered work if you
544are a party to an arrangement with a third party that is in the
545business of distributing software, under which you make payment to the
546third party based on the extent of your activity of conveying the
547work, and under which the third party grants, to any of the parties
548who would receive the covered work from you, a discriminatory patent
549license (a) in connection with copies of the covered work conveyed by
550you (or copies made from those copies), or (b) primarily for and in
551connection with specific products or compilations that contain the
552covered work, unless you entered into that arrangement, or that patent
553license was granted, prior to 28 March 2007.
554
555Nothing in this License shall be construed as excluding or limiting
556any implied license or other defenses to infringement that may
557otherwise be available to you under applicable patent law.
558
559@item No Surrender of Others' Freedom.
560
561If conditions are imposed on you (whether by court order, agreement or
562otherwise) that contradict the conditions of this License, they do not
563excuse you from the conditions of this License. If you cannot convey
564a covered work so as to satisfy simultaneously your obligations under
565this License and any other pertinent obligations, then as a
566consequence you may not convey it at all. For example, if you agree
567to terms that obligate you to collect a royalty for further conveying
568from those to whom you convey the Program, the only way you could
569satisfy both those terms and this License would be to refrain entirely
570from conveying the Program.
571
572@item Remote Network Interaction; Use with the GNU General Public License.
573
574Notwithstanding any other provision of this License, if you modify the
575Program, your modified version must prominently offer all users interacting
576with it remotely through a computer network (if your version supports such
577interaction) an opportunity to receive the Corresponding Source of your
578version by providing access to the Corresponding Source from a network
579server at no charge, through some standard or customary means of
580facilitating copying of software. This Corresponding Source shall include
581the Corresponding Source for any work covered by version 3 of the GNU
582General Public License that is incorporated pursuant to the following
583paragraph.
584
585Notwithstanding any other provision of this License, you have permission to
586link or combine any covered work with a work licensed under version 3 of
587the GNU General Public License into a single combined work, and to convey
588the resulting work. The terms of this License will continue to apply to
589the part which is the covered work, but the work with which it is combined
590will remain governed by version 3 of the GNU General Public License.
591
592@item Revised Versions of this License.
593
594The Free Software Foundation may publish revised and/or new versions
595of the GNU Affero General Public License from time to time. Such new
596versions will be similar in spirit to the present version, but may
597differ in detail to address new problems or concerns.
598
599Each version is given a distinguishing version number. If the Program
600specifies that a certain numbered version of the GNU Affero General Public
601License ``or any later version'' applies to it, you have the option of
602following the terms and conditions either of that numbered version or
603of any later version published by the Free Software Foundation. If
604the Program does not specify a version number of the GNU Affero General
605Public License, you may choose any version ever published by the Free
606Software Foundation.
607
608If the Program specifies that a proxy can decide which future versions
609of the GNU Affero General Public License can be used, that proxy's public
610statement of acceptance of a version permanently authorizes you to
611choose that version for the Program.
612
613Later license versions may give you additional or different
614permissions. However, no additional obligations are imposed on any
615author or copyright holder as a result of your choosing to follow a
616later version.
617
618@item Disclaimer of Warranty.
619
620THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
621APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
622HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT
623WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
624LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
625A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
626PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
627DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
628CORRECTION.
629
630@item Limitation of Liability.
631
632IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
633WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
634CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
635INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
636ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
637NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
638LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
639TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
640PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
641
642@item Interpretation of Sections 15 and 16.
643
644If the disclaimer of warranty and limitation of liability provided
645above cannot be given local legal effect according to their terms,
646reviewing courts shall apply local law that most closely approximates
647an absolute waiver of all civil liability in connection with the
648Program, unless a warranty or assumption of liability accompanies a
649copy of the Program in return for a fee.
650
651@end enumerate
652
653@heading END OF TERMS AND CONDITIONS
654
655@heading How to Apply These Terms to Your New Programs
656
657If you develop a new program, and you want it to be of the greatest
658possible use to the public, the best way to achieve this is to make it
659free software which everyone can redistribute and change under these
660terms.
661
662To do so, attach the following notices to the program. It is safest
663to attach them to the start of each source file to most effectively
664state the exclusion of warranty; and each file should have at least
665the ``copyright'' line and a pointer to where the full notice is found.
666
667@smallexample
668@var{one line to give the program's name and a brief idea of what it does.}
669Copyright (C) @var{year} @var{name of author}
670
671This program is free software: you can redistribute it and/or modify
672it under the terms of the GNU Affero General Public License as published by
673the Free Software Foundation, either version 3 of the License, or (at
674your option) any later version.
675
676This program is distributed in the hope that it will be useful, but
677WITHOUT ANY WARRANTY; without even the implied warranty of
678MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
679Affero General Public License for more details.
680
681You should have received a copy of the GNU Affero General Public License
682along with this program. If not, see @url{https://www.gnu.org/licenses/}.
683@end smallexample
684
685Also add information on how to contact you by electronic and paper mail.
686
687If your software can interact with users remotely through a computer
688network, you should also make sure that it provides a way for users to
689get its source. For example, if your program is a web application, its
690interface could display a ``Source'' link that leads users to an archive
691of the code. There are many ways you could offer source, and different
692solutions will be better for different programs; see section 13 for the
693specific requirements.
694
695You should also get your employer (if you work as a programmer) or school,
696if any, to sign a ``copyright disclaimer'' for the program, if necessary.
697For more information on this, and how to apply and follow the GNU AGPL, see
698@url{https://www.gnu.org/licenses/}.
diff --git a/doc/documentation/chapters/contributing.texi b/doc/documentation/chapters/contributing.texi
index 745acca77..a92df45c3 100644
--- a/doc/documentation/chapters/contributing.texi
+++ b/doc/documentation/chapters/contributing.texi
@@ -6,17 +6,20 @@
6* Licenses of contributions:: 6* Licenses of contributions::
7* Copyright Assignment:: 7* Copyright Assignment::
8* Contributing to the Reference Manual:: 8* Contributing to the Reference Manual::
9* Contributing testcases::
9@end menu 10@end menu
10 11
11@node Contributing to GNUnet 12@node Contributing to GNUnet
12@section Contributing to GNUnet 13@section Contributing to GNUnet
13 14
15@cindex licenses
16@cindex licenses of contributions
14@node Licenses of contributions 17@node Licenses of contributions
15@section Licenses of contributions 18@section Licenses of contributions
16 19
17GNUnet is a @uref{https://www.gnu.org/, GNU} package. 20GNUnet is a @uref{https://www.gnu.org/, GNU} package.
18All code contributions must thus be put under the 21All code contributions must thus be put under the
19@uref{https://www.gnu.org/copyleft/gpl.html, GNU Public License (GPL)}. 22@uref{https://www.gnu.org/licenses/agpl.html, GNU Affero Public License (AGPL)}.
20All documentation should be put under FSF approved licenses 23All documentation should be put under FSF approved licenses
21(see @uref{https://www.gnu.org/copyleft/fdl.html, fdl}). 24(see @uref{https://www.gnu.org/copyleft/fdl.html, fdl}).
22 25
@@ -40,7 +43,7 @@ rights, and in particular is allowed to dual-license the code. You
40retain non-exclusive rights to your contributions, so you can also 43retain non-exclusive rights to your contributions, so you can also
41share your contributions freely with other projects. 44share your contributions freely with other projects.
42 45
43GNUnet e.V. will publish all accepted contributions under the GPLv3 46GNUnet e.V. will publish all accepted contributions under the AGPLv3
44or any later version. The association may decide to publish 47or any later version. The association may decide to publish
45contributions under additional licenses (dual-licensing). 48contributions under additional licenses (dual-licensing).
46 49
@@ -88,3 +91,21 @@ In a 200+ pages handbook it's better to have footnotes accessible
88without having to skip over to the end. 91without having to skip over to the end.
89 92
90@end itemize 93@end itemize
94
95@node Contributing testcases
96@section Contributing testcases
97
98In the core of gnunet, we restrict new testcases to a small subset
99of languages, in order of preference:
100@enumerate
101@item C
102@item Bash (preferable portable without too much specifics to Bash)
103@item Python (@geq{}3.6)
104@end enumerate
105
106We welcome efforts to remove our existing python-2.7 scripts to
107replace them either with Bash or, at your choice, python-3.6+.
108
109If you contribute new python based testcases, we advise you to
110not repeat our past misfortunes and write the tests in a standard
111test framework like for example pytest.
diff --git a/doc/documentation/chapters/developer.texi b/doc/documentation/chapters/developer.texi
index e95355302..e82e32b59 100644
--- a/doc/documentation/chapters/developer.texi
+++ b/doc/documentation/chapters/developer.texi
@@ -11,7 +11,7 @@ For developers, GNUnet is:
11@itemize @bullet 11@itemize @bullet
12@item developed by a community that believes in the GNU philosophy 12@item developed by a community that believes in the GNU philosophy
13@item Free Software (Free as in Freedom), licensed under the 13@item Free Software (Free as in Freedom), licensed under the
14GNU General Public License@footnote{@uref{https://www.gnu.org/licenses/licenses.html#GPL, https://www.gnu.org/licenses/licenses.html#GPL}} 14GNU Affero General Public License@footnote{@uref{https://www.gnu.org/licenses/licenses.html#AGPL, https://www.gnu.org/licenses/licenses.html#AGPL}}
15@item A set of standards, including coding conventions and 15@item A set of standards, including coding conventions and
16architectural rules 16architectural rules
17@item A set of layered protocols, both specifying the communication 17@item A set of layered protocols, both specifying the communication
@@ -40,6 +40,7 @@ new chapters, sections or insightful comments.
40 40
41@menu 41@menu
42* Developer Introduction:: 42* Developer Introduction::
43* Internal dependencies::
43* Code overview:: 44* Code overview::
44* System Architecture:: 45* System Architecture::
45* Subsystem stability:: 46* Subsystem stability::
@@ -47,6 +48,7 @@ new chapters, sections or insightful comments.
47* Build-system:: 48* Build-system::
48* Developing extensions for GNUnet using the gnunet-ext template:: 49* Developing extensions for GNUnet using the gnunet-ext template::
49* Writing testcases:: 50* Writing testcases::
51* Building GNUnet and its dependencies::
50* TESTING library:: 52* TESTING library::
51* Performance regression analysis with Gauger:: 53* Performance regression analysis with Gauger::
52* TESTBED Subsystem:: 54* TESTBED Subsystem::
@@ -212,9 +214,7 @@ Installation and update tool
212Template for starting 'external' GNUnet projects 214Template for starting 'external' GNUnet projects
213@item @command{gnunet-java} 215@item @command{gnunet-java}
214Java APIs for writing GNUnet services and applications 216Java APIs for writing GNUnet services and applications
215@c ** FIXME: Point to new website repository once we have it: 217@item @command{gnunet-java-ext}
216@c ** @item svn/gnunet-www/ Code and media helping drive the GNUnet
217@c website
218@item @command{eclectic} 218@item @command{eclectic}
219Code to run GNUnet nodes on testbeds for research, development, 219Code to run GNUnet nodes on testbeds for research, development,
220testing and evaluation 220testing and evaluation
@@ -225,6 +225,8 @@ Qt-based GNUnet GUI (is it deprecated?)
225cocoa-based GNUnet GUI (is it deprecated?) 225cocoa-based GNUnet GUI (is it deprecated?)
226@item @command{gnunet-guile} 226@item @command{gnunet-guile}
227Guile bindings for GNUnet 227Guile bindings for GNUnet
228@item @command{gnunet-python}
229Python bindings for GNUnet
228 230
229@end table 231@end table
230 232
@@ -244,6 +246,13 @@ Tool for automated debugging of distributed systems
244Library for accessing satellite connection quality reports 246Library for accessing satellite connection quality reports
245@item @command{libgnurl} 247@item @command{libgnurl}
246gnURL (feature-restricted variant of cURL/libcurl) 248gnURL (feature-restricted variant of cURL/libcurl)
249@item @command{www}
250work in progress of the new gnunet.org website (Jinja2 framework based to
251replace our current Drupal website)
252@item @command{bibliography}
253Our collected bibliography, papers, references, and so forth
254@item @command{gnunet-videos-}
255Videos about and around gnunet activities
247@end table 256@end table
248 257
249Finally, there are various external projects (see links for a list of 258Finally, there are various external projects (see links for a list of
@@ -251,6 +260,77 @@ those that have a public website) which build on top of the GNUnet
251framework. 260framework.
252 261
253@c *********************************************************************** 262@c ***********************************************************************
263@node Internal dependencies
264@section Internal dependencies
265
266This section tries to give an overview of what processes a typical GNUnet
267peer running a particular application would consist of. All of the
268processes listed here should be automatically started by
269@command{gnunet-arm -s}.
270The list is given as a rough first guide to users for failure diagnostics.
271Ideally, end-users should never have to worry about these internal
272dependencies.
273
274In terms of internal dependencies, a minimum file-sharing system consists
275of the following GNUnet processes (in order of dependency):
276
277@itemize @bullet
278@item gnunet-service-arm
279@item gnunet-service-resolver (required by all)
280@item gnunet-service-statistics (required by all)
281@item gnunet-service-peerinfo
282@item gnunet-service-transport (requires peerinfo)
283@item gnunet-service-core (requires transport)
284@item gnunet-daemon-hostlist (requires core)
285@item gnunet-daemon-topology (requires hostlist, peerinfo)
286@item gnunet-service-datastore
287@item gnunet-service-dht (requires core)
288@item gnunet-service-identity
289@item gnunet-service-fs (requires identity, mesh, dht, datastore, core)
290@end itemize
291
292@noindent
293A minimum VPN system consists of the following GNUnet processes (in
294order of dependency):
295
296@itemize @bullet
297@item gnunet-service-arm
298@item gnunet-service-resolver (required by all)
299@item gnunet-service-statistics (required by all)
300@item gnunet-service-peerinfo
301@item gnunet-service-transport (requires peerinfo)
302@item gnunet-service-core (requires transport)
303@item gnunet-daemon-hostlist (requires core)
304@item gnunet-service-dht (requires core)
305@item gnunet-service-mesh (requires dht, core)
306@item gnunet-service-dns (requires dht)
307@item gnunet-service-regex (requires dht)
308@item gnunet-service-vpn (requires regex, dns, mesh, dht)
309@end itemize
310
311@noindent
312A minimum GNS system consists of the following GNUnet processes (in
313order of dependency):
314
315@itemize @bullet
316@item gnunet-service-arm
317@item gnunet-service-resolver (required by all)
318@item gnunet-service-statistics (required by all)
319@item gnunet-service-peerinfo
320@item gnunet-service-transport (requires peerinfo)
321@item gnunet-service-core (requires transport)
322@item gnunet-daemon-hostlist (requires core)
323@item gnunet-service-dht (requires core)
324@item gnunet-service-mesh (requires dht, core)
325@item gnunet-service-dns (requires dht)
326@item gnunet-service-regex (requires dht)
327@item gnunet-service-vpn (requires regex, dns, mesh, dht)
328@item gnunet-service-identity
329@item gnunet-service-namestore (requires identity)
330@item gnunet-service-gns (requires vpn, dns, dht, namestore, identity)
331@end itemize
332
333@c ***********************************************************************
254@node Code overview 334@node Code overview
255@section Code overview 335@section Code overview
256 336
@@ -279,7 +359,7 @@ The DHT and other components of GNUnet
279store information in units called 'blocks'. Each block has a type and the 359store information in units called 'blocks'. Each block has a type and the
280type defines a particular format and how that binary format is to be 360type defines a particular format and how that binary format is to be
281linked to a hash code (the key for the DHT and for databases). The block 361linked to a hash code (the key for the DHT and for databases). The block
282library is a wapper around block plugins which provide the necessary 362library is a wrapper around block plugins which provide the necessary
283functions for each block type. 363functions for each block type.
284@item @file{statistics/} --- statistics service 364@item @file{statistics/} --- statistics service
285The statistics service enables associating 365The statistics service enables associating
@@ -327,7 +407,7 @@ external service to test the local configuration.
327Some transports (UDP and WLAN, mostly) have restrictions on the maximum 407Some transports (UDP and WLAN, mostly) have restrictions on the maximum
328transfer unit (MTU) for packets. The fragmentation library can be used to 408transfer unit (MTU) for packets. The fragmentation library can be used to
329break larger packets into chunks of at most 1k and transmit the resulting 409break larger packets into chunks of at most 1k and transmit the resulting
330fragments reliabily (with acknowledgement, retransmission, timeouts, 410fragments reliably (with acknowledgment, retransmission, timeouts,
331etc.). 411etc.).
332@item @file{transport/} --- transport service 412@item @file{transport/} --- transport service
333The transport service is responsible for managing the 413The transport service is responsible for managing the
@@ -352,8 +432,8 @@ the foundation for the testbed service
352@item @file{testbed/} --- testbed service 432@item @file{testbed/} --- testbed service
353The testbed service is used for creating small or large scale deployments 433The testbed service is used for creating small or large scale deployments
354of GNUnet peers for evaluation of protocols. 434of GNUnet peers for evaluation of protocols.
355It facilitates peer depolyments on multiple 435It facilitates peer deployments on multiple
356hosts (for example, in a cluster) and establishing varous network 436hosts (for example, in a cluster) and establishing various network
357topologies (both underlay and overlay). 437topologies (both underlay and overlay).
358@item @file{nse/} --- Network Size Estimation 438@item @file{nse/} --- Network Size Estimation
359The network size estimation (NSE) service 439The network size estimation (NSE) service
@@ -965,7 +1045,7 @@ if (0 == bar && x != y)
965@end example 1045@end example
966 1046
967@noindent 1047@noindent
968Note that splitting the @code{if} statement above is debateable as the 1048Note that splitting the @code{if} statement above is debatable as the
969@code{return x} is a very trivial statement. However, once the logic after 1049@code{return x} is a very trivial statement. However, once the logic after
970the branch becomes more complicated (and is still identical), the "or" 1050the branch becomes more complicated (and is still identical), the "or"
971formulation should be used for sure. 1051formulation should be used for sure.
@@ -1089,6 +1169,313 @@ typically necessary to run @code{make install} before running any
1089testcases. Thus the canonical command @code{make check install} has to be 1169testcases. Thus the canonical command @code{make check install} has to be
1090changed to @code{make install check} for GNUnet. 1170changed to @code{make install check} for GNUnet.
1091 1171
1172@c ***********************************************************************
1173@cindex Building GNUnet
1174@node Building GNUnet and its dependencies
1175@section Building GNUnet and its dependencies
1176
1177In the following section we will outline how to build GNUnet and
1178some of its dependencies. We will assume a fair amount of knowledge
1179for building applications under UNIX-like systems. Furthermore we
1180assume that the build environment is sane and that you are aware of
1181any implications actions in this process could have.
1182Instructions here can be seen as notes for developers (an extension to
1183the 'HACKING' section in README) as well as package maintainers.
1184@b{Users should rely on the available binary packages.}
1185We will use Debian as an example Operating System environment. Substitute
1186accordingly with your own Operating System environment.
1187
1188For the full list of dependencies, consult the appropriate, up-to-date
1189section in the @file{README} file.
1190
1191First, we need to build or install (depending on your OS) the following
1192packages. If you build them from source, build them in this exact order:
1193
1194@example
1195libgpgerror, libgcrypt, libnettle, libunbound, GnuTLS (with libunbound
1196support)
1197@end example
1198
1199After we have build and installed those packages, we continue with
1200packages closer to GNUnet in this step: libgnurl (our libcurl fork),
1201GNU libmicrohttpd, and GNU libextractor. Again, if your package manager
1202provides one of these packages, use the packages provided from it
1203unless you have good reasons (package version too old, conflicts, etc).
1204We advise against compiling widely used packages such as GnuTLS
1205yourself if your OS provides a variant already unless you take care
1206of maintenance of the packages then.
1207
1208In the optimistic case, this command will give you all the dependencies:
1209
1210@example
1211sudo apt-get install libgnurl libmicrohttpd libextractor
1212@end example
1213
1214From experience we know that at the very least libgnurl is not
1215available in some environments. You could substitute libgnurl
1216with libcurl, but we recommend to install libgnurl, as it gives
1217you a predefined libcurl with the small set GNUnet requires. In
1218the past namespaces of libcurl and libgnurl were shared, which
1219caused problems when you wanted to integrate both of them in one
1220Operating System. This has been resolved, and they can be installed
1221side by side now.
1222
1223@cindex libgnurl
1224@cindex compiling libgnurl
1225GNUnet and some of its function depend on a limited subset of cURL/libcurl.
1226Rather than trying to enforce a certain configuration on the world, we
1227opted to maintain a microfork of it that ensures we can link against the
1228right set of features. We called this specialized set of libcurl
1229``libgnurl''. It is fully ABI compatible with libcurl and currently used
1230by GNUnet and some of its dependencies.
1231
1232We download libgnurl and its digital signature from the GNU fileserver,
1233assuming @env{TMPDIR} exists@footnote{It might be @file{/tmp}, @env{TMPDIR}, @env{TMP} or any other location. For consistency we assume @env{TMPDIR} points to @file{/tmp} for the remainder of this section.}
1234
1235@example
1236cd \$TMPDIR
1237wget https://ftp.gnu.org/gnu/gnunet/gnurl-7.60.0.tar.Z
1238wget https://ftp.gnu.org/gnu/gnunet/gnurl-7.60.0.tar.Z.sig
1239@end example
1240
1241Next, verify the digital signature of the file:
1242
1243@example
1244gpg --verify gnurl-7.60.0.tar.Z.sig
1245@end example
1246
1247If gpg fails, you might try with @command{gpg2} on your OS. If the error
1248states that ``the key can not be found'' or it is unknown, you have to
1249retrieve the key (A88C8ADD129828D7EAC02E52E22F9BBFEE348588) from a
1250keyserver first:
1251
1252@example
1253gpg --keyserver pgp.mit.edu --recv-keys A88C8ADD129828D7EAC02E52E22F9BBFEE348588
1254@end example
1255
1256and rerun the verification command.
1257
1258libgnurl will require the following packages to be present at runtime:
1259gnutls (with DANE support / libunbound), libidn, zlib and at compile time:
1260libtool, groff, perl, pkg-config, and python 2.7.
1261
1262Once you have verified that all the required packages are present on your
1263system, we can proceed to compile libgnurl:
1264
1265@example
1266tar -xvf gnurl-7.60.0.tar.Z
1267cd gnurl-7.60.0
1268sh configure --disable-ntlm-wb
1269make
1270make -C tests test
1271sudo make install
1272@end example
1273
1274After you've compiled and installed libgnurl, we can proceed to building
1275GNUnet.
1276
1277
1278
1279
1280First, in addition to the GNUnet sources you might require downloading the
1281latest version of various dependencies, depending on how recent the
1282software versions in your distribution of GNU/Linux are.
1283Most distributions do not include sufficiently recent versions of these
1284dependencies.
1285Thus, a typically installation on a "modern" GNU/Linux distribution
1286requires you to install the following dependencies (ideally in this
1287order):
1288
1289@itemize @bullet
1290@item libgpgerror and libgcrypt
1291@item libnettle and libunbound (possibly from distribution), GnuTLS
1292@item libgnurl (read the README)
1293@item GNU libmicrohttpd
1294@item GNU libextractor
1295@end itemize
1296
1297Make sure to first install the various mandatory and optional
1298dependencies including development headers from your distribution.
1299
1300Other dependencies that you should strongly consider to install is a
1301database (MySQL, sqlite or Postgres).
1302The following instructions will assume that you installed at least sqlite.
1303For most distributions you should be able to find pre-build packages for
1304the database. Again, make sure to install the client libraries @b{and} the
1305respective development headers (if they are packaged separately) as well.
1306
1307You can find specific, detailed instructions for installing of the
1308dependencies (and possibly the rest of the GNUnet installation) in the
1309platform-specific descriptions, which can be found in the Index.
1310Please consult them now.
1311If your distribution is not listed, please study the build
1312instructions for Debian stable, carefully as you try to install the
1313dependencies for your own distribution.
1314Contributing additional instructions for further platforms is always
1315appreciated.
1316Please take in mind that operating system development tends to move at
1317a rather fast speed. Due to this you should be aware that some of
1318the instructions could be outdated by the time you are reading this.
1319If you find a mistake, please tell us about it (or even better: send
1320a patch to the documentation to fix it!).
1321
1322Before proceeding further, please double-check the dependency list.
1323Note that in addition to satisfying the dependencies, you might have to
1324make sure that development headers for the various libraries are also
1325installed.
1326There maybe files for other distributions, or you might be able to find
1327equivalent packages for your distribution.
1328
1329While it is possible to build and install GNUnet without having root
1330access, we will assume that you have full control over your system in
1331these instructions.
1332First, you should create a system user @emph{gnunet} and an additional
1333group @emph{gnunetdns}. On the GNU/Linux distributions Debian and Ubuntu,
1334type:
1335
1336@example
1337sudo adduser --system --home /var/lib/gnunet --group \
1338--disabled-password gnunet
1339sudo addgroup --system gnunetdns
1340@end example
1341
1342@noindent
1343On other Unixes and GNU systems, this should have the same effect:
1344
1345@example
1346sudo useradd --system --groups gnunet --home-dir /var/lib/gnunet
1347sudo addgroup --system gnunetdns
1348@end example
1349
1350Now compile and install GNUnet using:
1351
1352@example
1353tar xvf gnunet-@value{VERSION}.tar.gz
1354cd gnunet-@value{VERSION}
1355./configure --with-sudo=sudo --with-nssdir=/lib
1356make
1357sudo make install
1358@end example
1359
1360If you want to be able to enable DEBUG-level log messages, add
1361@code{--enable-logging=verbose} to the end of the
1362@command{./configure} command.
1363@code{DEBUG}-level log messages are in English only and
1364should only be useful for developers (or for filing
1365really detailed bug reports).
1366
1367@noindent
1368Next, edit the file @file{/etc/gnunet.conf} to contain the following:
1369
1370@example
1371[arm]
1372START_SYSTEM_SERVICES = YES
1373START_USER_SERVICES = NO
1374@end example
1375
1376@noindent
1377You may need to update your @code{ld.so} cache to include
1378files installed in @file{/usr/local/lib}:
1379
1380@example
1381# ldconfig
1382@end example
1383
1384@noindent
1385Then, switch from user @code{root} to user @code{gnunet} to start
1386the peer:
1387
1388@example
1389# su -s /bin/sh - gnunet
1390$ gnunet-arm -c /etc/gnunet.conf -s
1391@end example
1392
1393You may also want to add the last line in the gnunet user's @file{crontab}
1394prefixed with @code{@@reboot} so that it is executed whenever the system
1395is booted:
1396
1397@example
1398@@reboot /usr/local/bin/gnunet-arm -c /etc/gnunet.conf -s
1399@end example
1400
1401@noindent
1402This will only start the system-wide GNUnet services.
1403Type @command{exit} to get back your root shell.
1404Now, you need to configure the per-user part. For each
1405user that should get access to GNUnet on the system, run
1406(replace alice with your username):
1407
1408@example
1409sudo adduser alice gnunet
1410@end example
1411
1412@noindent
1413to allow them to access the system-wide GNUnet services. Then, each
1414user should create a configuration file @file{~/.config/gnunet.conf}
1415with the lines:
1416
1417@example
1418[arm]
1419START_SYSTEM_SERVICES = NO
1420START_USER_SERVICES = YES
1421DEFAULTSERVICES = gns
1422@end example
1423
1424@noindent
1425and start the per-user services using
1426
1427@example
1428$ gnunet-arm -c ~/.config/gnunet.conf -s
1429@end example
1430
1431@noindent
1432Again, adding a @code{crontab} entry to autostart the peer is advised:
1433
1434@example
1435@@reboot /usr/local/bin/gnunet-arm -c $HOME/.config/gnunet.conf -s
1436@end example
1437
1438@noindent
1439Note that some GNUnet services (such as SOCKS5 proxies) may need a
1440system-wide TCP port for each user.
1441For those services, systems with more than one user may require each user
1442to specify a different port number in their personal configuration file.
1443
1444Finally, the user should perform the basic initial setup for the GNU Name
1445System (GNS) certificate authority. This is done by running:
1446
1447@example
1448$ gnunet-gns-proxy-setup-ca
1449@end example
1450
1451@noindent
1452The first generates the default zones, whereas the second setups the GNS
1453Certificate Authority with the user's browser. Now, to activate GNS in the
1454normal DNS resolution process, you need to edit your
1455@file{/etc/nsswitch.conf} where you should find a line like this:
1456
1457@example
1458hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
1459@end example
1460
1461@noindent
1462The exact details may differ a bit, which is fine. Add the text
1463@emph{"gns [NOTFOUND=return]"} after @emph{"files"}.
1464Keep in mind that we included a backslash ("\") here just for
1465markup reasons. You should write the text below on @b{one line}
1466and @b{without} the "\":
1467
1468@example
1469hosts: files gns [NOTFOUND=return] mdns4_minimal \
1470[NOTFOUND=return] dns mdns4
1471@end example
1472
1473@c FIXME: Document new behavior.
1474You might want to make sure that @file{/lib/libnss_gns.so.2} exists on
1475your system, it should have been created during the installation.
1476
1477
1478@c **********************************************************************
1092@cindex TESTING library 1479@cindex TESTING library
1093@node TESTING library 1480@node TESTING library
1094@section TESTING library 1481@section TESTING library
@@ -1156,7 +1543,7 @@ This range can be customised with the function
1156similar to @code{GNUNET_TESTING_system_create()} except that it take 2 1543similar to @code{GNUNET_TESTING_system_create()} except that it take 2
1157additional parameters --- the start and end of the port range to use. 1544additional parameters --- the start and end of the port range to use.
1158 1545
1159A TESTING system is destroyed with the funciton 1546A TESTING system is destroyed with the function
1160@code{GNUNET_TESTING_system_destory()}. This function takes the handle of 1547@code{GNUNET_TESTING_system_destory()}. This function takes the handle of
1161the system and a flag to remove the files created in the directory used 1548the system and a flag to remove the files created in the directory used
1162to generate configurations. 1549to generate configurations.
@@ -1165,7 +1552,7 @@ A peer is created with the function
1165@code{GNUNET_TESTING_peer_configure()}. This functions takes the system 1552@code{GNUNET_TESTING_peer_configure()}. This functions takes the system
1166handle, a configuration template from which the configuration for the peer 1553handle, a configuration template from which the configuration for the peer
1167is auto-generated and the index from where the hostkey for the peer has to 1554is auto-generated and the index from where the hostkey for the peer has to
1168be copied from. When successfull, this function returs a handle to the 1555be copied from. When successful, this function returns a handle to the
1169peer which can be used to start and stop it and to obtain the identity of 1556peer which can be used to start and stop it and to obtain the identity of
1170the peer. If unsuccessful, a NULL pointer is returned with an error 1557the peer. If unsuccessful, a NULL pointer is returned with an error
1171message. This function handles the generated configuration to have 1558message. This function handles the generated configuration to have
@@ -1199,7 +1586,7 @@ to the handle to the peer to stop. The callback function is called with
1199the given closure when the peer is stopped. Using this function 1586the given closure when the peer is stopped. Using this function
1200eliminates blocking while waiting for the peer to terminate. 1587eliminates blocking while waiting for the peer to terminate.
1201 1588
1202An asynchronous peer stop can be cancelled by calling the function 1589An asynchronous peer stop can be canceled by calling the function
1203@code{GNUNET_TESTING_peer_stop_async_cancel()}. Note that calling this 1590@code{GNUNET_TESTING_peer_stop_async_cancel()}. Note that calling this
1204function does not prevent the peer from terminating if the termination 1591function does not prevent the peer from terminating if the termination
1205signal has already been sent to it. It does, however, cancels the 1592signal has already been sent to it. It does, however, cancels the
@@ -1280,12 +1667,12 @@ simply load the plugin directly.
1280To help avoid performance regressions, GNUnet uses Gauger. Gauger is a 1667To help avoid performance regressions, GNUnet uses Gauger. Gauger is a
1281simple logging tool that allows remote hosts to send performance data to 1668simple logging tool that allows remote hosts to send performance data to
1282a central server, where this data can be analyzed and visualized. Gauger 1669a central server, where this data can be analyzed and visualized. Gauger
1283shows graphs of the repository revisions and the performace data recorded 1670shows graphs of the repository revisions and the performance data recorded
1284for each revision, so sudden performance peaks or drops can be identified 1671for each revision, so sudden performance peaks or drops can be identified
1285and linked to a specific revision number. 1672and linked to a specific revision number.
1286 1673
1287In the case of GNUnet, the buildbots log the performance data obtained 1674In the case of GNUnet, the buildbots log the performance data obtained
1288during the tests after each build. The data can be accesed on GNUnet's 1675during the tests after each build. The data can be accessed on GNUnet's
1289Gauger page. 1676Gauger page.
1290 1677
1291The menu on the left allows to select either the results of just one 1678The menu on the left allows to select either the results of just one
@@ -1298,7 +1685,7 @@ performance evolution across all hosts.
1298Using Gauger in GNUnet and having the performance of a module tracked over 1685Using Gauger in GNUnet and having the performance of a module tracked over
1299time is very easy. First of course, the testcase must generate some 1686time is very easy. First of course, the testcase must generate some
1300consistent metric, which makes sense to have logged. Highly volatile or 1687consistent metric, which makes sense to have logged. Highly volatile or
1301random dependant metrics probably are not ideal candidates for meaningful 1688random dependent metrics probably are not ideal candidates for meaningful
1302regression detection. 1689regression detection.
1303 1690
1304To start logging any value, just include @code{gauger.h} in your testcase 1691To start logging any value, just include @code{gauger.h} in your testcase
@@ -1510,7 +1897,7 @@ random links are to be given
1510 1897
1511@item @code{GNUNET_TESTBED_TOPOLOGY_SCALE_FREE}: Connects peers in a 1898@item @code{GNUNET_TESTBED_TOPOLOGY_SCALE_FREE}: Connects peers in a
1512topology where peer connectivity follows power law - new peers are 1899topology where peer connectivity follows power law - new peers are
1513connected with high probabililty to well connected peers. 1900connected with high probability to well connected peers.
1514@footnote{See Emergence of Scaling in Random Networks. Science 286, 1901@footnote{See Emergence of Scaling in Random Networks. Science 286,
1515509-512, 1999 1902509-512, 1999
1516(@uref{https://gnunet.org/git/bibliography.git/plain/docs/emergence_of_scaling_in_random_networks__barabasi_albert_science_286__1999.pdf, pdf})} 1903(@uref{https://gnunet.org/git/bibliography.git/plain/docs/emergence_of_scaling_in_random_networks__barabasi_albert_science_286__1999.pdf, pdf})}
@@ -1551,7 +1938,7 @@ ignored for the rest of the topologies.
1551Topology @code{SCALE_FREE} requires the options 1938Topology @code{SCALE_FREE} requires the options
1552@code{SCALE_FREE_TOPOLOGY_CAP} to be set to the maximum number of peers 1939@code{SCALE_FREE_TOPOLOGY_CAP} to be set to the maximum number of peers
1553which can connect to a peer and @code{SCALE_FREE_TOPOLOGY_M} to be set to 1940which can connect to a peer and @code{SCALE_FREE_TOPOLOGY_M} to be set to
1554how many peers a peer should be atleast connected to. 1941how many peers a peer should be at least connected to.
1555 1942
1556Similarly, the topology @code{FROM_FILE} requires the option 1943Similarly, the topology @code{FROM_FILE} requires the option
1557@code{OVERLAY_TOPOLOGY_FILE} to contain the path of the file containing 1944@code{OVERLAY_TOPOLOGY_FILE} to contain the path of the file containing
@@ -1597,7 +1984,7 @@ A topology file describes how peers are to be connected. It should adhere
1597to the following format for testbed to parse it correctly. 1984to the following format for testbed to parse it correctly.
1598 1985
1599Each line should begin with the target peer id. This should be followed by 1986Each line should begin with the target peer id. This should be followed by
1600a colon(`:') and origin peer ids seperated by `|'. All spaces except for 1987a colon(`:') and origin peer ids separated by `|'. All spaces except for
1601newline characters are ignored. The API will then try to connect each 1988newline characters are ignored. The API will then try to connect each
1602origin peer to the target peer. 1989origin peer to the target peer.
1603 1990
@@ -1623,9 +2010,9 @@ deemed as crossed after all the peers waiting on it are notified.
1623The barriers API provides the following functions: 2010The barriers API provides the following functions:
1624@itemize @bullet 2011@itemize @bullet
1625@item @strong{@code{GNUNET_TESTBED_barrier_init()}:} function to 2012@item @strong{@code{GNUNET_TESTBED_barrier_init()}:} function to
1626initialse a barrier in the experiment 2013initialize a barrier in the experiment
1627@item @strong{@code{GNUNET_TESTBED_barrier_cancel()}:} function to cancel 2014@item @strong{@code{GNUNET_TESTBED_barrier_cancel()}:} function to cancel
1628a barrier which has been initialised before 2015a barrier which has been initialized before
1629@item @strong{@code{GNUNET_TESTBED_barrier_wait()}:} function to signal 2016@item @strong{@code{GNUNET_TESTBED_barrier_wait()}:} function to signal
1630barrier service that the caller has reached a barrier and is waiting for 2017barrier service that the caller has reached a barrier and is waiting for
1631it to be crossed 2018it to be crossed
@@ -1742,7 +2129,7 @@ the large-scale deployment. We provide you a set of scripts you can use
1742to deploy GNUnet on a set of nodes and manage your installation. 2129to deploy GNUnet on a set of nodes and manage your installation.
1743 2130
1744Please also check @uref{https://gnunet.org/installation-fedora8-svn} and 2131Please also check @uref{https://gnunet.org/installation-fedora8-svn} and
1745@uref{https://gnunet.org/installation-fedora12-svn} to find detailled 2132@uref{https://gnunet.org/installation-fedora12-svn} to find detailed
1746instructions how to install GNUnet on a PlanetLab node. 2133instructions how to install GNUnet on a PlanetLab node.
1747 2134
1748 2135
@@ -1768,7 +2155,7 @@ image, installing the buildslave software is quite some pain. For our
1768PlanetLab testbed we figured out how to install the buildslave software 2155PlanetLab testbed we figured out how to install the buildslave software
1769best. 2156best.
1770 2157
1771@c This is a vvery terrible way to suggest installing software. 2158@c This is a very terrible way to suggest installing software.
1772@c FIXME: Is there an official, safer way instead of blind-piping a 2159@c FIXME: Is there an official, safer way instead of blind-piping a
1773@c script? 2160@c script?
1774@c FIXME: Use newer pypi URLs below. 2161@c FIXME: Use newer pypi URLs below.
@@ -1917,15 +2304,15 @@ is to set
1917 2304
1918@example 2305@example
1919[core] 2306[core]
1920FORCESTART = YES 2307IMMEDIATE_START = YES
1921@end example 2308@end example
1922 2309
1923@noindent 2310@noindent
1924in the configuration file. 2311in the configuration file.
1925Alternatively, having any service that directly or indirectly depends on 2312Alternatively, having any service that directly or indirectly depends on
1926@code{CORE} being started with @code{FORCESTART} will also do. 2313@code{CORE} being started with @code{IMMEDIATE_START} will also do.
1927This issue largely arises if users try to over-optimize by not 2314This issue largely arises if users try to over-optimize by not
1928starting any services with @code{FORCESTART}. 2315starting any services with @code{IMMEDIATE_START}.
1929 2316
1930@c *********************************************************************** 2317@c ***********************************************************************
1931@node ATS must want the connections 2318@node ATS must want the connections
@@ -1974,7 +2361,7 @@ for new developers):
1974@item CPS-style scheduling (scheduler.c) 2361@item CPS-style scheduling (scheduler.c)
1975@item Program initialization (program.c) 2362@item Program initialization (program.c)
1976@item Networking (network.c, client.c, server*.c, service.c) 2363@item Networking (network.c, client.c, server*.c, service.c)
1977@item message queueing (mq.c) 2364@item message queuing (mq.c)
1978@item bandwidth calculations (bandwidth.c) 2365@item bandwidth calculations (bandwidth.c)
1979@item Other OS-related (os*.c, plugin.c, signal.c) 2366@item Other OS-related (os*.c, plugin.c, signal.c)
1980@item Pseudonym management (pseudonym.c) 2367@item Pseudonym management (pseudonym.c)
@@ -2045,7 +2432,7 @@ level to "loglevel". Thus it is possible to run some processes
2045with -L DEBUG, for example, and others with -L ERROR to enable specific 2432with -L DEBUG, for example, and others with -L ERROR to enable specific
2046settings to diagnose problems with a particular process. 2433settings to diagnose problems with a particular process.
2047@item Configuration files. Because GNUnet 2434@item Configuration files. Because GNUnet
2048service and deamon processes are usually launched by gnunet-arm, it is not 2435service and daemon processes are usually launched by gnunet-arm, it is not
2049possible to pass different custom command line options directly to every 2436possible to pass different custom command line options directly to every
2050one of them. The options passed to @code{gnunet-arm} only affect 2437one of them. The options passed to @code{gnunet-arm} only affect
2051gnunet-arm and not the rest of GNUnet. However, one can specify a 2438gnunet-arm and not the rest of GNUnet. However, one can specify a
@@ -2337,7 +2724,7 @@ will have
2337no effect. Other messages (ERROR, WARNING, INFO, etc) will be included. 2724no effect. Other messages (ERROR, WARNING, INFO, etc) will be included.
2338@item If @code{--enable-logging} is set to @code{verbose}, or 2725@item If @code{--enable-logging} is set to @code{verbose}, or
2339@code{veryverbose} the binary will contain DEBUG messages (still, it will 2726@code{veryverbose} the binary will contain DEBUG messages (still, it will
2340be neccessary to run with @command{-L DEBUG} or set the DEBUG config option 2727be necessary to run with @command{-L DEBUG} or set the DEBUG config option
2341to show 2728to show
2342them). 2729them).
2343@end itemize 2730@end itemize
@@ -2348,7 +2735,7 @@ If you are a developer:
2348@item please make sure that you @code{./configure 2735@item please make sure that you @code{./configure
2349--enable-logging=@{verbose,veryverbose@}}, so you can see DEBUG messages. 2736--enable-logging=@{verbose,veryverbose@}}, so you can see DEBUG messages.
2350@item please remove the @code{#if} statements around @code{GNUNET_log 2737@item please remove the @code{#if} statements around @code{GNUNET_log
2351(GNUNET_ERROR_TYPE_DEBUG, ...)} lines, to improve the readibility of your 2738(GNUNET_ERROR_TYPE_DEBUG, ...)} lines, to improve the readability of your
2352code. 2739code.
2353@end itemize 2740@end itemize
2354 2741
@@ -2361,7 +2748,7 @@ A suitable configuration could be:
2361$ export GNUNET_FORCE_LOG="^YOUR_SUBSYSTEM$;;;;DEBUG/;;;;WARNING" 2748$ export GNUNET_FORCE_LOG="^YOUR_SUBSYSTEM$;;;;DEBUG/;;;;WARNING"
2362@end example 2749@end example
2363 2750
2364Which will behave almost like enabling DEBUG in that subsytem before the 2751Which will behave almost like enabling DEBUG in that subsystem before the
2365change. Of course you can adapt it to your particular needs, this is only 2752change. Of course you can adapt it to your particular needs, this is only
2366a quick example. 2753a quick example.
2367 2754
@@ -2572,7 +2959,7 @@ function, which is set to @code{NULL} in most cases, and the last
2572parameter is the expected size of the message of this type, usually we 2959parameter is the expected size of the message of this type, usually we
2573set it to 0 to accept variable size, for special cases the exact size of 2960set it to 0 to accept variable size, for special cases the exact size of
2574the specified message also can be set. In addition, the terminator sign 2961the specified message also can be set. In addition, the terminator sign
2575depicted as @code{@{NULL, NULL, 0, 0@}} is set in the last aera. 2962depicted as @code{@{NULL, NULL, 0, 0@}} is set in the last area.
2576 2963
2577@c *********************************************************************** 2964@c ***********************************************************************
2578@node Server - Process request message 2965@node Server - Process request message
@@ -2622,7 +3009,7 @@ understand the request message, and the processing of this request would
2622be terminated. 3009be terminated.
2623 3010
2624In comparison to the aforementioned situation, when the argument is equal 3011In comparison to the aforementioned situation, when the argument is equal
2625to @code{GNUNET_OK}, the service would continue to process the requst 3012to @code{GNUNET_OK}, the service would continue to process the request
2626message. 3013message.
2627 3014
2628@c *********************************************************************** 3015@c ***********************************************************************
@@ -2771,7 +3158,7 @@ GNUnet uses SHA-512 for computing one-way hash codes. The API provides
2771functions to compute a hash over a block in memory or over a file on disk. 3158functions to compute a hash over a block in memory or over a file on disk.
2772 3159
2773The crypto API also provides functions for randomizing a block of memory, 3160The crypto API also provides functions for randomizing a block of memory,
2774obtaining a single random number and for generating a permuation of the 3161obtaining a single random number and for generating a permutation of the
2775numbers 0 to n-1. Random number generation distinguishes between WEAK and 3162numbers 0 to n-1. Random number generation distinguishes between WEAK and
2776STRONG random number quality; WEAK random numbers are pseudo-random 3163STRONG random number quality; WEAK random numbers are pseudo-random
2777whereas STRONG random numbers use entropy gathered from the operating 3164whereas STRONG random numbers use entropy gathered from the operating
@@ -2850,7 +3237,7 @@ message.
2850 3237
2851Consider the following simple message, with the body consisting of a 3238Consider the following simple message, with the body consisting of a
2852single number value. 3239single number value.
2853@c why the empy code function? 3240@c why the empty code function?
2854@code{} 3241@code{}
2855 3242
2856@example 3243@example
@@ -3125,7 +3512,7 @@ or in some other transient data structure and thus having the hash map
3125keep a pointer to @code{key} would not work. Only the key inside of 3512keep a pointer to @code{key} would not work. Only the key inside of
3126@code{val} has the same lifetime as the entry in the map (this must of 3513@code{val} has the same lifetime as the entry in the map (this must of
3127course be checked as well). Naturally, @code{val->key} must be 3514course be checked as well). Naturally, @code{val->key} must be
3128intiialized before the @code{put} call. Once all @code{put} calls have 3515initialized before the @code{put} call. Once all @code{put} calls have
3129been converted and double-checked, you can change the call to create the 3516been converted and double-checked, you can change the call to create the
3130hash map from 3517hash map from
3131 3518
@@ -3322,10 +3709,10 @@ running a service with "valgrind" or "gdb"
3322 3709
3323@item DEBUG Run in debug mode (much verbosity). 3710@item DEBUG Run in debug mode (much verbosity).
3324 3711
3325@item AUTOSTART ARM will listen to UNIX domain socket and/or TCP port of 3712@item START_ON_DEMAND ARM will listen to UNIX domain socket and/or TCP port of
3326the service and start the service on-demand. 3713the service and start the service on-demand.
3327 3714
3328@item FORCESTART ARM will always start this service when the peer 3715@item IMMEDIATE_START ARM will always start this service when the peer
3329is started. 3716is started.
3330 3717
3331@item ACCEPT_FROM IPv4 addresses the service accepts connections from. 3718@item ACCEPT_FROM IPv4 addresses the service accepts connections from.
@@ -3336,7 +3723,7 @@ is started.
3336 3723
3337 3724
3338Options that impact the operation of ARM overall are in the "[arm]" 3725Options that impact the operation of ARM overall are in the "[arm]"
3339section. ARM is a normal service and has (except for AUTOSTART) all of the 3726section. ARM is a normal service and has (except for START_ON_DEMAND) all of the
3340options that other services do. In addition, ARM has the 3727options that other services do. In addition, ARM has the
3341following options: 3728following options:
3342 3729
@@ -3513,7 +3900,7 @@ The goal of transport-level address validation is to minimize the chances
3513of a successful man-in-the-middle attack against GNUnet peers on the 3900of a successful man-in-the-middle attack against GNUnet peers on the
3514transport level. Such an attack would not allow the adversary to decrypt 3901transport level. Such an attack would not allow the adversary to decrypt
3515the P2P transmissions, but a successful attacker could at least measure 3902the P2P transmissions, but a successful attacker could at least measure
3516traffic volumes and latencies (raising the adversaries capablities by 3903traffic volumes and latencies (raising the adversaries capabilities by
3517those of a global passive adversary in the worst case). The scenarios we 3904those of a global passive adversary in the worst case). The scenarios we
3518are concerned about is an attacker, Mallory, giving a @code{HELLO} to 3905are concerned about is an attacker, Mallory, giving a @code{HELLO} to
3519Alice that claims to be for Bob, but contains Mallory's IP address 3906Alice that claims to be for Bob, but contains Mallory's IP address
@@ -3639,7 +4026,7 @@ connected peers, but they are sent about other knowns peers within the
3639to each other about their appropriate other neighbors. They also gossip 4026to each other about their appropriate other neighbors. They also gossip
3640about the newly connected peer to previously 4027about the newly connected peer to previously
3641connected neighbors. In order to keep the routing tables up to date, 4028connected neighbors. In order to keep the routing tables up to date,
3642disconnect notifications are propogated as gossip as well (because 4029disconnect notifications are propagated as gossip as well (because
3643disconnects may not be sent/received, timeouts are also used remove 4030disconnects may not be sent/received, timeouts are also used remove
3644stagnant routing table entries). 4031stagnant routing table entries).
3645 4032
@@ -3830,7 +4217,7 @@ to send and receive messages.
3830 4217
3831We have measured the performance of the UDP, TCP and SMTP transport layer 4218We have measured the performance of the UDP, TCP and SMTP transport layer
3832directly and when used from an application using the GNUnet core. 4219directly and when used from an application using the GNUnet core.
3833Measureing just the transport layer gives the better view of the actual 4220Measuring just the transport layer gives the better view of the actual
3834overhead of the protocol, whereas evaluating the transport from the 4221overhead of the protocol, whereas evaluating the transport from the
3835application puts the overhead into perspective from a practical point of 4222application puts the overhead into perspective from a practical point of
3836view. 4223view.
@@ -3850,7 +4237,7 @@ wire have no impact on the timings. n messages were sent sequentially over
3850the transport layer, sending message i+1 after the i-th message was 4237the transport layer, sending message i+1 after the i-th message was
3851received. All messages were sent over the same connection and the time to 4238received. All messages were sent over the same connection and the time to
3852establish the connection was not taken into account since this overhead is 4239establish the connection was not taken into account since this overhead is
3853miniscule in practice --- as long as a connection is used for a 4240minuscule in practice --- as long as a connection is used for a
3854significant number of messages. 4241significant number of messages.
3855 4242
3856@multitable @columnfractions .20 .15 .15 .15 .15 .15 4243@multitable @columnfractions .20 .15 .15 .15 .15 .15
@@ -3881,9 +4268,9 @@ given time-bounds. For this benchmark we report the message loss after
3881allowing t time for sending m messages. If messages were not sent (or 4268allowing t time for sending m messages. If messages were not sent (or
3882received) after an overall timeout of t, they were considered lost. The 4269received) after an overall timeout of t, they were considered lost. The
3883benchmark was performed using two Xeon 2 GHZ machines running RedHat 8.0 4270benchmark was performed using two Xeon 2 GHZ machines running RedHat 8.0
3884with sendmail. The machines were connected with a direct 100 MBit ethernet 4271with sendmail. The machines were connected with a direct 100 MBit Ethernet
3885connection.@ Figures udp1200, tcp1200 and smtp-MTUs show that the 4272connection.@ Figures udp1200, tcp1200 and smtp-MTUs show that the
3886throughput for messages of size 1,200 octects is 2,343 kbps, 3,310 kbps 4273throughput for messages of size 1,200 octets is 2,343 kbps, 3,310 kbps
3887and 6 kbps for UDP, TCP and SMTP respectively. The high per-message 4274and 6 kbps for UDP, TCP and SMTP respectively. The high per-message
3888overhead of SMTP can be improved by increasing the MTU, for example, an 4275overhead of SMTP can be improved by increasing the MTU, for example, an
3889MTU of 12,000 octets improves the throughput to 13 kbps as figure 4276MTU of 12,000 octets improves the throughput to 13 kbps as figure
@@ -3928,7 +4315,7 @@ installed).
3928For instructions about how to install the libraries you should 4315For instructions about how to install the libraries you should
3929check out the BlueZ site 4316check out the BlueZ site
3930(@uref{http://www.bluez.org/, http://www.bluez.org}). If you don't know if 4317(@uref{http://www.bluez.org/, http://www.bluez.org}). If you don't know if
3931you have the necesarry libraries, don't worry, just run the GNUnet 4318you have the necessary libraries, don't worry, just run the GNUnet
3932configure script and you will be able to see a notification at the end 4319configure script and you will be able to see a notification at the end
3933which will warn you if you don't have the necessary libraries. 4320which will warn you if you don't have the necessary libraries.
3934 4321
@@ -3956,7 +4343,7 @@ helper binary used on GNU/Linux:
3956 4343
3957@itemize @bullet 4344@itemize @bullet
3958@item it verifies if the name corresponds to a Bluetooth interface name 4345@item it verifies if the name corresponds to a Bluetooth interface name
3959@item it verifies if the iterface is up (if it is not, it tries to bring 4346@item it verifies if the interface is up (if it is not, it tries to bring
3960it up) 4347it up)
3961@item it tries to enable the page and inquiry scan in order to make the 4348@item it tries to enable the page and inquiry scan in order to make the
3962device discoverable and to accept incoming connection requests 4349device discoverable and to accept incoming connection requests
@@ -3997,12 +4384,12 @@ Bluetooth address has the form 00:00:00:00:00:00 it means that there is
3997something wrong with the D-Bus daemon or with the Bluetooth daemon. Use 4384something wrong with the D-Bus daemon or with the Bluetooth daemon. Use
3998@code{bluetoothd} tool to see the logs 4385@code{bluetoothd} tool to see the logs
3999 4386
4000@item @code{sdptool} can be used to control and interogate SDP servers. 4387@item @code{sdptool} can be used to control and interrogate SDP servers.
4001If you encounter problems regarding the SDP server (like the SDP server is 4388If you encounter problems regarding the SDP server (like the SDP server is
4002down) you should check out if the D-Bus daemon is running correctly and to 4389down) you should check out if the D-Bus daemon is running correctly and to
4003see if the Bluetooth daemon started correctly(use @code{bluetoothd} tool). 4390see if the Bluetooth daemon started correctly(use @code{bluetoothd} tool).
4004Also, sometimes the SDP service could work but somehow the device couldn't 4391Also, sometimes the SDP service could work but somehow the device couldn't
4005register his service. Use @code{sdptool browse [dev-address]} to see if 4392register its service. Use @code{sdptool browse [dev-address]} to see if
4006the service is registered. There should be a service with the name of the 4393the service is registered. There should be a service with the name of the
4007interface and GNUnet as provider. 4394interface and GNUnet as provider.
4008 4395
@@ -4084,11 +4471,11 @@ then start sending data for benchmarking.
4084On Windows you cannot test the plugin functionality using two Bluetooth 4471On Windows you cannot test the plugin functionality using two Bluetooth
4085devices from the same machine because after you install the drivers there 4472devices from the same machine because after you install the drivers there
4086will occur some conflicts between the Bluetooth stacks. (At least that is 4473will occur some conflicts between the Bluetooth stacks. (At least that is
4087what happend on my machine : I wasn't able to use the Bluesoleil stack and 4474what happened on my machine : I wasn't able to use the Bluesoleil stack and
4088the WINDCOMM one in the same time). 4475the WINDCOMM one in the same time).
4089 4476
4090If you have two different machines and your configuration files are good 4477If you have two different machines and your configuration files are good
4091you can use the same scenario presented on the begining of this section. 4478you can use the same scenario presented on the beginning of this section.
4092 4479
4093Another way to test the plugin functionality is to create your own 4480Another way to test the plugin functionality is to create your own
4094application which will use the GNUnet framework with the Bluetooth 4481application which will use the GNUnet framework with the Bluetooth
@@ -4103,8 +4490,8 @@ This page describes the implementation of the Bluetooth transport plugin.
4103First I want to remind you that the Bluetooth transport plugin uses 4490First I want to remind you that the Bluetooth transport plugin uses
4104virtually the same code as the WLAN plugin and only the helper binary is 4491virtually the same code as the WLAN plugin and only the helper binary is
4105different. Also the scope of the helper binary from the Bluetooth 4492different. Also the scope of the helper binary from the Bluetooth
4106transport plugin is the same as the one used for the wlan transport 4493transport plugin is the same as the one used for the WLAN transport
4107plugin: it acceses the interface and then it forwards traffic in both 4494plugin: it accesses the interface and then it forwards traffic in both
4108directions between the Bluetooth interface and stdin/stdout of the 4495directions between the Bluetooth interface and stdin/stdout of the
4109process involved. 4496process involved.
4110 4497
@@ -4145,8 +4532,8 @@ Bluetooth interface) and is separated in two stages:
4145@subsubsection THE INITIALIZATION 4532@subsubsection THE INITIALIZATION
4146 4533
4147@itemize @bullet 4534@itemize @bullet
4148@item first, it checks if we have root privilegies 4535@item first, it checks if we have root privileges
4149(@emph{Remember that we need to have root privilegies in order to be able 4536(@emph{Remember that we need to have root privileges in order to be able
4150to bring the interface up if it is down or to change its state.}). 4537to bring the interface up if it is down or to change its state.}).
4151 4538
4152@item second, it verifies if the interface with the given name exists. 4539@item second, it verifies if the interface with the given name exists.
@@ -4171,7 +4558,7 @@ discoverable
4171devices to get the port on which this device is listening on) 4558devices to get the port on which this device is listening on)
4172@end itemize 4559@end itemize
4173 4560
4174@item drops the root privilegies 4561@item drops the root privileges
4175 4562
4176@strong{If the interface is not a Bluetooth interface the helper exits 4563@strong{If the interface is not a Bluetooth interface the helper exits
4177with a suitable error} 4564with a suitable error}
@@ -4216,7 +4603,7 @@ the STDOUT file descriptor, then we write to STDOUT the message from the
4216@emph{write_std} buffer. 4603@emph{write_std} buffer.
4217 4604
4218To find out on which port a device is listening on we connect to the local 4605To find out on which port a device is listening on we connect to the local
4219SDP server and searche the registered service for that device. 4606SDP server and search the registered service for that device.
4220 4607
4221@emph{You should be aware of the fact that if the device fails to connect 4608@emph{You should be aware of the fact that if the device fails to connect
4222to another one when trying to send a message it will attempt one more 4609to another one when trying to send a message it will attempt one more
@@ -4279,17 +4666,17 @@ For Windows I decided to use the Microsoft Bluetooth stack which has the
4279advantage of coming standard from Windows XP SP2. The main disadvantage is 4666advantage of coming standard from Windows XP SP2. The main disadvantage is
4280that it only supports the RFCOMM protocol so we will not be able to have 4667that it only supports the RFCOMM protocol so we will not be able to have
4281a low level control over the Bluetooth device. Therefore it is the user 4668a low level control over the Bluetooth device. Therefore it is the user
4282responsability to check if the device is up and in the discoverable mode. 4669responsibility to check if the device is up and in the discoverable mode.
4283Also there are no tools which could be used for debugging in order to read 4670Also there are no tools which could be used for debugging in order to read
4284the data coming from and going to a Bluetooth device, which obviously 4671the data coming from and going to a Bluetooth device, which obviously
4285hindered my work. Another thing that slowed down the implementation of the 4672hindered my work. Another thing that slowed down the implementation of the
4286plugin (besides that I wasn't too accomodated with the win32 API) was that 4673plugin (besides that I wasn't too accommodated with the win32 API) was that
4287there were some bugs on MinGW regarding the Bluetooth. Now they are solved 4674there were some bugs on MinGW regarding the Bluetooth. Now they are solved
4288but you should keep in mind that you should have the latest updates 4675but you should keep in mind that you should have the latest updates
4289(especially the @emph{ws2bth} header). 4676(especially the @emph{ws2bth} header).
4290 4677
4291Besides the fact that it uses the Windows Sockets, the Windows 4678Besides the fact that it uses the Windows Sockets, the Windows
4292implemenation follows the same principles as the GNU/Linux one: 4679implementation follows the same principles as the GNU/Linux one:
4293 4680
4294@itemize @bullet 4681@itemize @bullet
4295@item It has a initalization part where it initializes the 4682@item It has a initalization part where it initializes the
@@ -4334,7 +4721,7 @@ broadcast messages. When it receives a broadcast message it will skip it.
4334@item Implement the broadcast functionality on Windows @emph{(currently 4721@item Implement the broadcast functionality on Windows @emph{(currently
4335working on)} 4722working on)}
4336@item Implement a testcase for the helper :@ @emph{The testcase 4723@item Implement a testcase for the helper :@ @emph{The testcase
4337consists of a program which emaluates the plugin and uses the helper. It 4724consists of a program which emulates the plugin and uses the helper. It
4338will simulate connections, disconnections and data transfers.} 4725will simulate connections, disconnections and data transfers.}
4339@end itemize 4726@end itemize
4340 4727
@@ -4522,7 +4909,7 @@ peers connecting, peers disconnecting and incoming messages) and send
4522messages to connected peers using 4909messages to connected peers using
4523@code{GNUNET_CORE_notify_transmit_ready}. Note that applications must 4910@code{GNUNET_CORE_notify_transmit_ready}. Note that applications must
4524cancel pending transmission requests if they receive a disconnect event 4911cancel pending transmission requests if they receive a disconnect event
4525for a peer that had a transmission pending; furthermore, queueing more 4912for a peer that had a transmission pending; furthermore, queuing more
4526than one transmission request per peer per application using the 4913than one transmission request per peer per application using the
4527service is not permitted. 4914service is not permitted.
4528 4915
@@ -4817,11 +5204,11 @@ The API is heavily base on the CORE API.
4817CADET delivers messages to other peers in "channels". 5204CADET delivers messages to other peers in "channels".
4818A channel is a permanent connection defined by a destination peer 5205A channel is a permanent connection defined by a destination peer
4819(identified by its public key) and a port number. 5206(identified by its public key) and a port number.
4820Internally, CADET tunnels all channels towards a destiantion peer 5207Internally, CADET tunnels all channels towards a destination peer
4821using one session key and relays the data on multiple "connections", 5208using one session key and relays the data on multiple "connections",
4822independent from the channels. 5209independent from the channels.
4823 5210
4824Each channel has optional paramenters, the most important being the 5211Each channel has optional parameters, the most important being the
4825reliability flag. 5212reliability flag.
4826Should a message get lost on TRANSPORT/CORE level, if a channel is 5213Should a message get lost on TRANSPORT/CORE level, if a channel is
4827created with as reliable, CADET will retransmit the lost message and 5214created with as reliable, CADET will retransmit the lost message and
@@ -4862,15 +5249,15 @@ case. To be alerted when a channel is online, a client can call
4862@code{GNUNET_CADET_notify_transmit_ready} immediately after 5249@code{GNUNET_CADET_notify_transmit_ready} immediately after
4863@code{GNUNET_CADET_create_channel}. When the callback is activated, it 5250@code{GNUNET_CADET_create_channel}. When the callback is activated, it
4864means that the channel is online. The callback can give 0 bytes to CADET 5251means that the channel is online. The callback can give 0 bytes to CADET
4865if no message is to be sent, this is ok. 5252if no message is to be sent, this is OK.
4866 5253
4867If a transmission was requested but before the callback fires it is no 5254If a transmission was requested but before the callback fires it is no
4868longer needed, it can be cancelled with 5255longer needed, it can be canceled with
4869@code{GNUNET_CADET_notify_transmit_ready_cancel}, which uses the handle 5256@code{GNUNET_CADET_notify_transmit_ready_cancel}, which uses the handle
4870given back by @code{GNUNET_CADET_notify_transmit_ready}. 5257given back by @code{GNUNET_CADET_notify_transmit_ready}.
4871As in the case of CORE, only one message can be requested at a time: a 5258As in the case of CORE, only one message can be requested at a time: a
4872client must not call @code{GNUNET_CADET_notify_transmit_ready} again until 5259client must not call @code{GNUNET_CADET_notify_transmit_ready} again until
4873the callback is called or the request is cancelled. 5260the callback is called or the request is canceled.
4874 5261
4875When a channel is no longer needed, a client can call 5262When a channel is no longer needed, a client can call
4876@code{GNUNET_CADET_channel_destroy} to get rid of it. 5263@code{GNUNET_CADET_channel_destroy} to get rid of it.
@@ -4918,10 +5305,10 @@ all of the details can be found in this technical report.
4918@subsection Motivation 5305@subsection Motivation
4919 5306
4920 5307
4921Some subsytems, like DHT, need to know the size of the GNUnet network to 5308Some subsystems, like DHT, need to know the size of the GNUnet network to
4922optimize some parameters of their own protocol. The decentralized nature 5309optimize some parameters of their own protocol. The decentralized nature
4923of GNUnet makes efficient and securely counting the exact number of peers 5310of GNUnet makes efficient and securely counting the exact number of peers
4924infeasable. Although there are several decentralized algorithms to count 5311infeasible. Although there are several decentralized algorithms to count
4925the number of peers in a system, so far there is none to do so securely. 5312the number of peers in a system, so far there is none to do so securely.
4926Other protocols may allow any malicious peer to manipulate the final 5313Other protocols may allow any malicious peer to manipulate the final
4927result or to take advantage of the system to perform 5314result or to take advantage of the system to perform
@@ -4943,7 +5330,7 @@ GNUnet's NSE protocol avoids these drawbacks.
4943The NSE subsystem is designed to be resilient against these attacks. 5330The NSE subsystem is designed to be resilient against these attacks.
4944It uses @uref{http://en.wikipedia.org/wiki/Proof-of-work_system, proofs of work} 5331It uses @uref{http://en.wikipedia.org/wiki/Proof-of-work_system, proofs of work}
4945to prevent one peer from impersonating a large number of participants, 5332to prevent one peer from impersonating a large number of participants,
4946which would otherwise allow an adversary to artifically inflate the 5333which would otherwise allow an adversary to artificially inflate the
4947estimate. 5334estimate.
4948The DoS protection comes from the time-based nature of the protocol: 5335The DoS protection comes from the time-based nature of the protocol:
4949the estimates are calculated periodically and out-of-time traffic is 5336the estimates are calculated periodically and out-of-time traffic is
@@ -5005,7 +5392,7 @@ to all the other peers, who will calculate the estimate from it.
5005The target value itself is generated by hashing the current time, rounded 5392The target value itself is generated by hashing the current time, rounded
5006down to an agreed value. If the rounding amount is 1h (default) and the 5393down to an agreed value. If the rounding amount is 1h (default) and the
5007time is 12:34:56, the time to hash would be 12:00:00. The process is 5394time is 12:34:56, the time to hash would be 12:00:00. The process is
5008repeated each rouning amount (in this example would be every hour). 5395repeated each rounding amount (in this example would be every hour).
5009Every repetition is called a round. 5396Every repetition is called a round.
5010 5397
5011@node Timing 5398@node Timing
@@ -5017,12 +5404,12 @@ its ID all at one. Once each peer has the target random value, it
5017compares its own ID to the target and calculates the hypothetical size of 5404compares its own ID to the target and calculates the hypothetical size of
5018the network if that peer were to be the closest. 5405the network if that peer were to be the closest.
5019Then it compares the hypothetical size with the estimate from the previous 5406Then it compares the hypothetical size with the estimate from the previous
5020rounds. For each value there is an assiciated point in the period, 5407rounds. For each value there is an associated point in the period,
5021let's call it "broadcast time". If its own hypothetical estimate 5408let's call it "broadcast time". If its own hypothetical estimate
5022is the same as the previous global estimate, its "broadcast time" will be 5409is the same as the previous global estimate, its "broadcast time" will be
5023in the middle of the round. If its bigger it will be earlier and if its 5410in the middle of the round. If its bigger it will be earlier and if its
5024smaller (the most likely case) it will be later. This ensures that the 5411smaller (the most likely case) it will be later. This ensures that the
5025peers closests to the target value start broadcasting their ID the first. 5412peers closest to the target value start broadcasting their ID the first.
5026 5413
5027@node Controlled Flooding 5414@node Controlled Flooding
5028@subsubsection Controlled Flooding 5415@subsubsection Controlled Flooding
@@ -5035,7 +5422,7 @@ with a message containing the better value. Then it checks a proof of
5035work that must be included in the incoming message, to ensure that the 5422work that must be included in the incoming message, to ensure that the
5036other peer's ID is not made up (otherwise a malicious peer could claim to 5423other peer's ID is not made up (otherwise a malicious peer could claim to
5037have an ID of exactly the target value every round). Once validated, it 5424have an ID of exactly the target value every round). Once validated, it
5038compares the brodcast time of the received value with the current time 5425compares the broadcast time of the received value with the current time
5039and if it's not too early, sends the received value to its neighbors. 5426and if it's not too early, sends the received value to its neighbors.
5040Otherwise it stores the value until the correct broadcast time comes. 5427Otherwise it stores the value until the correct broadcast time comes.
5041This prevents unnecessary traffic of sub-optimal values, since a better 5428This prevents unnecessary traffic of sub-optimal values, since a better
@@ -5049,7 +5436,7 @@ to the neighbors.
5049@c %**end of header 5436@c %**end of header
5050 5437
5051Once the closest ID has been spread across the network each peer gets the 5438Once the closest ID has been spread across the network each peer gets the
5052exact distance betweed this ID and the target value of the round and 5439exact distance between this ID and the target value of the round and
5053calculates the estimate with a mathematical formula described in the tech 5440calculates the estimate with a mathematical formula described in the tech
5054report. The estimate generated with this method for a single round is not 5441report. The estimate generated with this method for a single round is not
5055very precise. Remember the case of the example, where the only peer is the 5442very precise. Remember the case of the example, where the only peer is the
@@ -5073,7 +5460,7 @@ calls: @code{GNUNET_NSE_connect} and @code{GNUNET_NSE_disconnect}.
5073The connect call gets a callback function as a parameter and this function 5460The connect call gets a callback function as a parameter and this function
5074is called each time the network agrees on an estimate. This usually is 5461is called each time the network agrees on an estimate. This usually is
5075once per round, with some exceptions: if the closest peer has a late 5462once per round, with some exceptions: if the closest peer has a late
5076local clock and starts spreading his ID after everyone else agreed on a 5463local clock and starts spreading its ID after everyone else agreed on a
5077value, the callback might be activated twice in a round, the second value 5464value, the callback might be activated twice in a round, the second value
5078being always bigger than the first. The default round time is set to 5465being always bigger than the first. The default round time is set to
50791 hour. 54661 hour.
@@ -5123,7 +5510,7 @@ size is between one third and three times the estimate. This can of
5123course vary with network conditions. 5510course vary with network conditions.
5124Thus, applications may want to also consider the provided standard 5511Thus, applications may want to also consider the provided standard
5125deviation value, not only the average (in particular, if the standard 5512deviation value, not only the average (in particular, if the standard
5126veriation is very high, the average maybe meaningless: the network size is 5513variation is very high, the average maybe meaningless: the network size is
5127changing rapidly). 5514changing rapidly).
5128 5515
5129@node libgnunetnse - Examples 5516@node libgnunetnse - Examples
@@ -5199,12 +5586,12 @@ is what we are flooding the network with right now.
5199At the beginning of each round the peer does the following: 5586At the beginning of each round the peer does the following:
5200 5587
5201@itemize @bullet 5588@itemize @bullet
5202@item calculates his own distance to the target value 5589@item calculates its own distance to the target value
5203@item creates, signs and stores the message for the current round (unless 5590@item creates, signs and stores the message for the current round (unless
5204it has a better message in the "next round" slot which came early in the 5591it has a better message in the "next round" slot which came early in the
5205previous round) 5592previous round)
5206@item calculates, based on the stored round message (own or received) when 5593@item calculates, based on the stored round message (own or received) when
5207to stard flooding it to its neighbors 5594to start flooding it to its neighbors
5208@end itemize 5595@end itemize
5209 5596
5210Upon receiving a message the peer checks the validity of the message 5597Upon receiving a message the peer checks the validity of the message
@@ -5705,7 +6092,7 @@ convenience API to do just that. Use @code{GNUNET_IDENTITY_ego_lookup} to
5705lookup a single ego by name. Note that this is the user's name for the 6092lookup a single ego by name. Note that this is the user's name for the
5706ego, not the service function. The resulting ego will be returned via a 6093ego, not the service function. The resulting ego will be returned via a
5707callback and will only be valid during that callback. The operation can 6094callback and will only be valid during that callback. The operation can
5708be cancelled via @code{GNUNET_IDENTITY_ego_lookup_cancel} 6095be canceled via @code{GNUNET_IDENTITY_ego_lookup_cancel}
5709(cancellation is only legal before the callback is invoked). 6096(cancellation is only legal before the callback is invoked).
5710 6097
5711@node Associating egos with service functions 6098@node Associating egos with service functions
@@ -5835,8 +6222,8 @@ So a client has first to retrieve records, merge with existing records
5835and then store the result. 6222and then store the result.
5836 6223
5837To perform a lookup operation, the client uses the 6224To perform a lookup operation, the client uses the
5838@code{GNUNET_NAMESTORE_records_store} function. Here he has to pass the 6225@code{GNUNET_NAMESTORE_records_store} function. Here it has to pass the
5839namestore handle, the private key of the zone and the label. He also has 6226namestore handle, the private key of the zone and the label. It also has
5840to provide a callback function which will be called with the result of 6227to provide a callback function which will be called with the result of
5841the lookup operation: 6228the lookup operation:
5842the zone for the records, the label, and the records including the 6229the zone for the records, the label, and the records including the
@@ -5859,7 +6246,7 @@ by NAMESTORE.
5859Here a client uses the @code{GNUNET_NAMESTORE_zone_iteration_start} 6246Here a client uses the @code{GNUNET_NAMESTORE_zone_iteration_start}
5860function and passes the namestore handle, the zone to iterate over and a 6247function and passes the namestore handle, the zone to iterate over and a
5861callback function to call with the result. 6248callback function to call with the result.
5862If the client wants to iterate over all the, he passes NULL for the zone. 6249If the client wants to iterate over all the WHAT!? FIXME, it passes NULL for the zone.
5863A @code{GNUNET_NAMESTORE_ZoneIterator} handle is returned to be used to 6250A @code{GNUNET_NAMESTORE_ZoneIterator} handle is returned to be used to
5864continue iteration. 6251continue iteration.
5865 6252
@@ -6278,7 +6665,7 @@ The size of an element's data is limited to around 62 KB.
6278 6665
6279Sets created by a local client can be modified and reused for multiple 6666Sets created by a local client can be modified and reused for multiple
6280operations. As each set operation requires potentially expensive special 6667operations. As each set operation requires potentially expensive special
6281auxilliary data to be computed for each element of a set, a set can only 6668auxiliary data to be computed for each element of a set, a set can only
6282participate in one type of set operation (i.e. union or intersection). 6669participate in one type of set operation (i.e. union or intersection).
6283The type of a set is determined upon its creation. 6670The type of a set is determined upon its creation.
6284If a the elements of a set are needed for an operation of a different 6671If a the elements of a set are needed for an operation of a different
@@ -6398,7 +6785,7 @@ until the client calls @code{GNUNET_SET_commit}
6398@c %**end of header 6785@c %**end of header
6399 6786
6400To create symmetry between the two ways of starting a set operation 6787To create symmetry between the two ways of starting a set operation
6401(accepting and nitiating it), the operation handles returned by 6788(accepting and initiating it), the operation handles returned by
6402@code{GNUNET_SET_accept} and @code{GNUNET_SET_prepare} do not yet have a 6789@code{GNUNET_SET_accept} and @code{GNUNET_SET_prepare} do not yet have a
6403set to operate on, thus they can not do any work yet. 6790set to operate on, thus they can not do any work yet.
6404 6791
@@ -6555,10 +6942,10 @@ number of iterations).
6555The receiver of the message removes all elements from its local set that 6942The receiver of the message removes all elements from its local set that
6556do not pass the Bloom filter test. 6943do not pass the Bloom filter test.
6557It then checks if the set size of the sender and the XOR over the keys 6944It then checks if the set size of the sender and the XOR over the keys
6558match what is left of his own set. If they do, he sends a 6945match what is left of its own set. If they do, it sends a
6559@code{GNUNET_MESSAGE_TYPE_SET_INTERSECTION_P2P_DONE} back to indicate 6946@code{GNUNET_MESSAGE_TYPE_SET_INTERSECTION_P2P_DONE} back to indicate
6560that the latest set is the final result. 6947that the latest set is the final result.
6561Otherwise, the receiver starts another Bloom fitler exchange, except 6948Otherwise, the receiver starts another Bloom filter exchange, except
6562this time as the sender. 6949this time as the sender.
6563 6950
6564@node Salt 6951@node Salt
@@ -6566,7 +6953,7 @@ this time as the sender.
6566 6953
6567@c %**end of header 6954@c %**end of header
6568 6955
6569Bloomfilter operations are probablistic: With some non-zero probability 6956Bloomfilter operations are probabilistic: With some non-zero probability
6570the test may incorrectly say an element is in the set, even though it is 6957the test may incorrectly say an element is in the set, even though it is
6571not. 6958not.
6572 6959
@@ -6619,7 +7006,7 @@ message. If the IBF fully decodes, the peer responds with a
6619GNUNET_MESSAGE_TYPE_SET_UNION_P2P_DONE message instead of another 7006GNUNET_MESSAGE_TYPE_SET_UNION_P2P_DONE message instead of another
6620GNUNET_MESSAGE_TYPE_SET_UNION_P2P_IBF. 7007GNUNET_MESSAGE_TYPE_SET_UNION_P2P_IBF.
6621 7008
6622All Bloom filter operations use a salt to mingle keys before hasing them 7009All Bloom filter operations use a salt to mingle keys before hashing them
6623into buckets, such that future iterations have a fresh chance of 7010into buckets, such that future iterations have a fresh chance of
6624succeeding if they failed due to collisions before. 7011succeeding if they failed due to collisions before.
6625 7012
@@ -7177,7 +7564,7 @@ already knows more than about a thousand blocks may need to send
7177several of these messages. Naturally, the client should transmit these 7564several of these messages. Naturally, the client should transmit these
7178messages as quickly as possible after the original GET request such that 7565messages as quickly as possible after the original GET request such that
7179the DHT can filter those results in the network early on. Naturally, as 7566the DHT can filter those results in the network early on. Naturally, as
7180these messages are sent after the original request, it is conceivalbe 7567these messages are sent after the original request, it is conceivable
7181that the DHT service may return blocks that match those already known 7568that the DHT service may return blocks that match those already known
7182to the client anyway. 7569to the client anyway.
7183 7570
@@ -7290,7 +7677,7 @@ duplicate results) and when they obtain a matching, non-filtered response
7290a @code{struct PeerResultMessage} of type 7677a @code{struct PeerResultMessage} of type
7291@code{GNUNET_MESSAGE_TYPE_DHT_P2P_RESULT} is forwarded to the previous 7678@code{GNUNET_MESSAGE_TYPE_DHT_P2P_RESULT} is forwarded to the previous
7292hop. 7679hop.
7293Whenver a result is forwarded, the block plugin is used to update the 7680Whenever a result is forwarded, the block plugin is used to update the
7294Bloom filter accordingly, to ensure that the same result is never 7681Bloom filter accordingly, to ensure that the same result is never
7295forwarded more than once. 7682forwarded more than once.
7296The DHT service may also cache forwarded results locally if the 7683The DHT service may also cache forwarded results locally if the
@@ -7357,7 +7744,7 @@ record types.
7357 7744
7358@c %**end of header 7745@c %**end of header
7359 7746
7360The GNS API itself is extremely simple. Clients first connec to the 7747The GNS API itself is extremely simple. Clients first connect to the
7361GNS service using @code{GNUNET_GNS_connect}. 7748GNS service using @code{GNUNET_GNS_connect}.
7362They can then perform lookups using @code{GNUNET_GNS_lookup} or cancel 7749They can then perform lookups using @code{GNUNET_GNS_lookup} or cancel
7363pending lookups using @code{GNUNET_GNS_lookup_cancel}. 7750pending lookups using @code{GNUNET_GNS_lookup_cancel}.
@@ -7406,9 +7793,9 @@ their respective zones can automatically be learned and added to the
7406the shorten zone. If NULL is passed, shortening is disabled. 7793the shorten zone. If NULL is passed, shortening is disabled.
7407@item proc This argument identifies 7794@item proc This argument identifies
7408the function to call with the result. It is given proc_cls, the number of 7795the function to call with the result. It is given proc_cls, the number of
7409records found (possilby zero) and the array of the records as arguments. 7796records found (possibly zero) and the array of the records as arguments.
7410proc will only be called once. After proc,> has been called, the lookup 7797proc will only be called once. After proc,> has been called, the lookup
7411must no longer be cancelled. 7798must no longer be canceled.
7412@item proc_cls The closure for proc. 7799@item proc_cls The closure for proc.
7413@end table 7800@end table
7414 7801
@@ -7563,7 +7950,7 @@ This is merely one method for how we can obtain GNS queries.
7563It is also possible to change @code{resolv.conf} to point to a machine 7950It is also possible to change @code{resolv.conf} to point to a machine
7564running @code{gnunet-dns2gns} or to modify libc's name system switch 7951running @code{gnunet-dns2gns} or to modify libc's name system switch
7565(NSS) configuration to include a GNS resolution plugin. 7952(NSS) configuration to include a GNS resolution plugin.
7566The method described in this chaper is more of a last-ditch catch-all 7953The method described in this chapter is more of a last-ditch catch-all
7567approach. 7954approach.
7568 7955
7569@code{gnunet-service-dns} enables intercepting DNS traffic using policy 7956@code{gnunet-service-dns} enables intercepting DNS traffic using policy
@@ -7731,8 +8118,8 @@ This returns the handle required for all other operations on the
7731NAMECACHE. Using @code{GNUNET_NAMECACHE_block_cache} clients can insert a 8118NAMECACHE. Using @code{GNUNET_NAMECACHE_block_cache} clients can insert a
7732block into the cache. 8119block into the cache.
7733@code{GNUNET_NAMECACHE_lookup_block} can be used to lookup blocks that 8120@code{GNUNET_NAMECACHE_lookup_block} can be used to lookup blocks that
7734were stored in the NAMECACHE. Both operations can be cancelled using 8121were stored in the NAMECACHE. Both operations can be canceled using
7735@code{GNUNET_NAMECACHE_cancel}. Note that cancelling a 8122@code{GNUNET_NAMECACHE_cancel}. Note that canceling a
7736@code{GNUNET_NAMECACHE_block_cache} operation can result in the block 8123@code{GNUNET_NAMECACHE_block_cache} operation can result in the block
7737being stored in the NAMECACHE --- or not. Cancellation primarily ensures 8124being stored in the NAMECACHE --- or not. Cancellation primarily ensures
7738that the continuation function with the result of the operation will no 8125that the continuation function with the result of the operation will no
@@ -7859,7 +8246,7 @@ When a revocation is performed, the revocation is first of all
7859disseminated by flooding the overlay network. 8246disseminated by flooding the overlay network.
7860The goal is to reach every peer, so that when a peer needs to check if a 8247The goal is to reach every peer, so that when a peer needs to check if a
7861key has been revoked, this will be purely a local operation where the 8248key has been revoked, this will be purely a local operation where the
7862peer looks at his local revocation list. Flooding the network is also the 8249peer looks at its local revocation list. Flooding the network is also the
7863most robust form of key revocation --- an adversary would have to control 8250most robust form of key revocation --- an adversary would have to control
7864a separator of the overlay graph to restrict the propagation of the 8251a separator of the overlay graph to restrict the propagation of the
7865revocation message. Flooding is also very easy to implement --- peers that 8252revocation message. Flooding is also very easy to implement --- peers that
@@ -7919,7 +8306,7 @@ revocations.
7919@code{GNUNET_REVOCATION_query} is used to check if a given ECDSA public 8306@code{GNUNET_REVOCATION_query} is used to check if a given ECDSA public
7920key has been revoked. 8307key has been revoked.
7921The given callback will be invoked with the result of the check. 8308The given callback will be invoked with the result of the check.
7922The query can be cancelled using @code{GNUNET_REVOCATION_query_cancel} on 8309The query can be canceled using @code{GNUNET_REVOCATION_query_cancel} on
7923the return value. 8310the return value.
7924 8311
7925@node Preparing revocations 8312@node Preparing revocations
@@ -8097,7 +8484,7 @@ metadata describing the content of the namespace.
8097Instead of the name of the identifier for a potential update, it contains 8484Instead of the name of the identifier for a potential update, it contains
8098the identifier for the root of the namespace. 8485the identifier for the root of the namespace.
8099The URI should always be empty. The @code{SBlock} is signed with the 8486The URI should always be empty. The @code{SBlock} is signed with the
8100content provder's RSA private key (just like any other SBlock). Peers 8487content provider's RSA private key (just like any other SBlock). Peers
8101can search for @code{SBlock}s in order to find out more about a namespace. 8488can search for @code{SBlock}s in order to find out more about a namespace.
8102 8489
8103@node KSBlocks 8490@node KSBlocks
@@ -8262,11 +8649,11 @@ In the following paragraph the important details are highlighted.
8262 8649
8263Announcing of the regular expressions is done by the 8650Announcing of the regular expressions is done by the
8264gnunet-daemon-regexprofiler, therefore you have to make sure it is 8651gnunet-daemon-regexprofiler, therefore you have to make sure it is
8265started, by adding it to the AUTOSTART set of ARM: 8652started, by adding it to the START_ON_DEMAND set of ARM:
8266 8653
8267@example 8654@example
8268[regexprofiler] 8655[regexprofiler]
8269AUTOSTART = YES 8656START_ON_DEMAND = YES
8270@end example 8657@end example
8271 8658
8272@noindent 8659@noindent
@@ -8381,7 +8768,7 @@ The REST service will automatically load all REST plugins on startup.
8381 8768
8382@strong{Configuration} 8769@strong{Configuration}
8383 8770
8384The rest service can be configured in various ways. 8771The REST service can be configured in various ways.
8385The reference config file can be found in 8772The reference config file can be found in
8386@file{src/rest/rest.conf}: 8773@file{src/rest/rest.conf}:
8387@example 8774@example
@@ -8392,8 +8779,11 @@ REST_ALLOW_ORIGIN=*
8392REST_ALLOW_CREDENTIALS=true 8779REST_ALLOW_CREDENTIALS=true
8393@end example 8780@end example
8394 8781
8395The port as well as Cross-origin resource sharing (CORS) headers that 8782The port as well as
8396are supposed to be advertised by the rest service are configurable. 8783@deffn{cross-origin resource sharing} (CORS)
8784@end deffn
8785headers that are supposed to be advertised by the rest service are
8786configurable.
8397 8787
8398@menu 8788@menu
8399* Namespace considerations:: 8789* Namespace considerations::
@@ -8403,19 +8793,19 @@ are supposed to be advertised by the rest service are configurable.
8403@node Namespace considerations 8793@node Namespace considerations
8404@subsection Namespace considerations 8794@subsection Namespace considerations
8405 8795
8406The gnunet-rest-service will load all plugins that are installed. 8796The @command{gnunet-rest-service} will load all plugins that are installed.
8407As such it is important that the endpoint namespaces do not clash. 8797As such it is important that the endpoint namespaces do not clash.
8408For example, plugin X might expose the endpoint ``/xxx'' while plugin Y exposes 8798
8409endpoint ``/xxx/yyy''. 8799For example, plugin X might expose the endpoint ``/xxx'' while plugin Y
8410This is a problem if plugins X is also supposed to handle a call to 8800exposes endpoint ``/xxx/yyy''.
8411``/xxx/yyy''. 8801This is a problem if plugin X is also supposed to handle a call
8412Currently, the REST service will not complain or warn about such clashes so 8802to ``/xxx/yyy''.
8413please make sure that endpoints are unambiguous. 8803Currently the REST service will not complain or warn about such clashes,
8804so please make sure that endpoints are unambiguous.
8414 8805
8415@node Endpoint documentation 8806@node Endpoint documentation
8416@subsection Endpoint documentation 8807@subsection Endpoint documentation
8417 8808
8418This is WIP. Endpoints should be documented appropriately. 8809This is WIP. Endpoints should be documented appropriately.
8419Perferably using annotations. 8810Preferably using annotations.
8420
8421 8811
diff --git a/doc/documentation/chapters/installation.texi b/doc/documentation/chapters/installation.texi
index 3a76fb162..559a97f96 100644
--- a/doc/documentation/chapters/installation.texi
+++ b/doc/documentation/chapters/installation.texi
@@ -1,2185 +1,317 @@
1@node GNUnet Installation Handbook 1@node Installing GNUnet
2@chapter GNUnet Installation Handbook 2@chapter Installing GNUnet
3 3
4This handbook describes how to install (build, setup, compile) and 4This guide is intended for those who want to install Gnunet from
5setup (configure, start) GNUnet @value{VERSION}. After following these 5source. For instructions on how to install GNUnet as a binary package
6instructions you should be able to install and then start user-interfaces 6please refer to the official documentation of your operating system or
7to interact with the network. 7package manager.
8
9Note: This manual is far from complete, and we welcome contributions, be
10it in the form of new chapters or insightful comments.
11
12@menu
13* Dependencies::
14* Pre-installation notes::
15* Generic installation instructions::
16* Build instructions for Ubuntu 12.04 using Git::
17* Build instructions for software builds from source::
18* Build Instructions for Microsoft Windows Platforms::
19* Build instructions for Debian 7.5::
20* Installing GNUnet from Git on Ubuntu 14.4::
21* Build instructions for Debian 8::
22@c * Build instructions for OpenBSD 6.2::
23* Outdated build instructions for previous revisions::
24@c * Portable GNUnet::
25* The graphical configuration interface::
26* How to start and stop a GNUnet peer::
27@end menu
28
29@node Dependencies
30@section Dependencies
31@c %**end of header
32
33This section lists the various known dependencies for
34GNUnet @value{EDITION}.
35Suggestions for missing dependencies or wrong version numbers are welcome.
36 8
37@menu 9@menu
38* External dependencies:: 10* Installing dependencies::
39* Optional dependencies:: 11* Getting the Source Code::
40* Internal dependencies:: 12* Create @code{gnunet} user and group::
13* Preparing and Compiling the Source Code::
14* Installation::
15* MOVED FROM USER Checking the Installation::
16* MOVED FROM USER The graphical configuration interface::
17* MOVED FROM USER Config Leftovers::
41@end menu 18@end menu
42 19
43@node External dependencies 20@c -----------------------------------------------------------------------
44@subsection External dependencies 21@node Installing dependencies
45@c %**end of header 22@section Installing dependencies
46 23GNUnet needs few libraries and applications for being able to run and
47These packages must be installed before a typical GNUnet installation 24another few optional ones for using certain features. Preferably they
48can be performed: 25should be installed with a package manager. Just in case we include a
26link to the project websites.
49 27
28The mandatory libraries and applications are
50@itemize @bullet 29@itemize @bullet
51@item autoconf 30@item libtool
52@item automake 31@item autoconf @geq{}2.59
32@item automake @geq{}1.11.1
53@item pkg-config 33@item pkg-config
54@item libltdl 34@item libgcrypt @geq{}1.6
55@item gstreamer 35@item libextractor
56@item gst-plugins-base 36@item libidn
57@item perl 37@item libmicrohttpd @geq{}0.9.52
58@item python (only 2.7 supported)@footnote{tests and gnunet-qr} 38@item libnss
59@item jansson 39@item libunistring
60@item nss
61@item glib
62@item gmp
63@item bluez
64@item miniupnpc
65@item gettext 40@item gettext
66@item which 41@item glibc
67@item texinfo @geq{} 5.2 42@item libgmp
68@item GNU libmicrohttpd @geq{} 0.9.30 @footnote{We recommend to build it 43@item gnutls
69with a GnuTLS version that was configured with libunbound} 44@item libcurl (has to be linked to GnuTLS) or libgnurl
70@item GNU libextractor @geq{} 1.0
71@item GNU libtool @geq{} 2.2
72@item GNU libunistring @geq{} 0.9.1.1
73@item GNU libidn @geq{} 1.0.0
74@item @uref{https://gnupg.org/software/libgcrypt/, GNU libgcrypt} @geq{}
75@uref{https://gnupg.org/ftp/gcrypt/libgcrypt/, 1.6.0}
76@item @uref{https://gnutls.org/, GnuTLS} @geq{} 3.2.7
77@footnote{We recommend to compile with libunbound for DANE support;
78GnuTLS also requires GNU nettle 2.7 (update: GnuTLS 3.2.7 appears NOT
79to work against GNU nettle > 2.7, due to some API updatings done by
80nettle. Thus it should be compiled against nettle 2.7
81and, in case you get some error on the reference to `rpl_strerror' being
82undefined, follow the instructions on
83@uref{http://lists.gnupg.org/pipermail/gnutls-devel/2013-November/006588.html, this}
84post (and the link inside it)).}
85@item @uref{https://gnunet.org/gnurl, gnURL} libgnurl @geq{} 7.34.0
86@footnote{must be compiled after @code{GnuTLS}}
87@item libglpk @geq{} 4.45
88@item @uref{http://www.openssl.org/, OpenSSL} @geq{} 1.0
89@item TeX Live @geq{} 2012, optional (for gnunet-bcd)
90@item Texinfo @geq{} 5.2 (for documentation)
91@item libsqlite @geq{} 3.8.0 @footnote{(note that the code will
92compile and often work with lower version numbers, but you may get subtle
93bugs with respect to quota management in certain rare cases);
94alternatively, MySQL or Postgres can also be installed, but those
95databases will require more complex configurations (not
96recommended for first-time users)}
97@item zlib 45@item zlib
98@end itemize 46@end itemize
99 47
100@node Optional dependencies 48In addition GNUnet needs one of of these three databases
101@subsection Optional dependencies
102
103These applications must be installed for various experimental or otherwise
104optional features such as @command{gnunet-conversation},
105and @command{gnunet-gtk} (most of these features are only build if you
106configure GNUnet with @command{--enable-experimental}):
107
108@itemize @bullet
109@item libpulse @geq{} 2.0,
110optional (for @command{gnunet-conversation})
111@item libopus @geq{} 1.0.1,
112optional (for @command{gnunet-conversation})
113@item libogg @geq{} 1.3.0,
114optional (for @command{gnunet-conversation})
115@item libnss contained @command{certool} binary,
116optional for convenient installation of
117the GNS proxy.
118@item python-zbar @geq{} 0.10,
119optional (for @command{gnunet-qr})
120@item Gtk+ @geq{} 3.0,
121optional (for @command{gnunet-gtk})
122@item libgladeui (must match Gtk+ version),
123optional (for @command{gnunet-gtk})
124@item libqrencode @geq{} 3.0,
125optional (for @command{gnunet-namestore-gtk})
126@item libpbc @geq{} 0.5.14, optional for Attribute-Based Encryption and Identity Provider functionality
127@item libgabe (https://github.com/schanzen/libgabe), optional for Attribute-Based Encryption and Identity Provider functionality
128@end itemize
129
130@node Internal dependencies
131@subsection Internal dependencies
132
133This section tries to give an overview of what processes a typical GNUnet
134peer running a particular application would consist of. All of the
135processes listed here should be automatically started by
136@command{gnunet-arm -s}.
137The list is given as a rough first guide to users for failure diagnostics.
138Ideally, end-users should never have to worry about these internal
139dependencies.
140
141In terms of internal dependencies, a minimum file-sharing system consists
142of the following GNUnet processes (in order of dependency):
143
144@itemize @bullet
145@item gnunet-service-arm
146@item gnunet-service-resolver (required by all)
147@item gnunet-service-statistics (required by all)
148@item gnunet-service-peerinfo
149@item gnunet-service-transport (requires peerinfo)
150@item gnunet-service-core (requires transport)
151@item gnunet-daemon-hostlist (requires core)
152@item gnunet-daemon-topology (requires hostlist, peerinfo)
153@item gnunet-service-datastore
154@item gnunet-service-dht (requires core)
155@item gnunet-service-identity
156@item gnunet-service-fs (requires identity, mesh, dht, datastore, core)
157@end itemize
158
159@noindent
160A minimum VPN system consists of the following GNUnet processes (in
161order of dependency):
162
163@itemize @bullet
164@item gnunet-service-arm
165@item gnunet-service-resolver (required by all)
166@item gnunet-service-statistics (required by all)
167@item gnunet-service-peerinfo
168@item gnunet-service-transport (requires peerinfo)
169@item gnunet-service-core (requires transport)
170@item gnunet-daemon-hostlist (requires core)
171@item gnunet-service-dht (requires core)
172@item gnunet-service-mesh (requires dht, core)
173@item gnunet-service-dns (requires dht)
174@item gnunet-service-regex (requires dht)
175@item gnunet-service-vpn (requires regex, dns, mesh, dht)
176@end itemize
177
178@noindent
179A minimum GNS system consists of the following GNUnet processes (in
180order of dependency):
181
182@itemize @bullet
183@item gnunet-service-arm
184@item gnunet-service-resolver (required by all)
185@item gnunet-service-statistics (required by all)
186@item gnunet-service-peerinfo
187@item gnunet-service-transport (requires peerinfo)
188@item gnunet-service-core (requires transport)
189@item gnunet-daemon-hostlist (requires core)
190@item gnunet-service-dht (requires core)
191@item gnunet-service-mesh (requires dht, core)
192@item gnunet-service-dns (requires dht)
193@item gnunet-service-regex (requires dht)
194@item gnunet-service-vpn (requires regex, dns, mesh, dht)
195@item gnunet-service-identity
196@item gnunet-service-namestore (requires identity)
197@item gnunet-service-gns (requires vpn, dns, dht, namestore, identity)
198@end itemize
199
200@node Pre-installation notes
201@section Pre-installation notes
202
203Please note that in the code instructions for the installation,
204@emph{#} indicates commands run as privileged root user and
205@emph{$} shows commands run as unprivileged ("normal") system user.
206
207
208@node Generic installation instructions
209@section Generic installation instructions
210
211First, in addition to the GNUnet sources you might require downloading the
212latest version of various dependencies, depending on how recent the
213software versions in your distribution of GNU/Linux are.
214Most distributions do not include sufficiently recent versions of these
215dependencies.
216Thus, a typically installation on a "modern" GNU/Linux distribution
217requires you to install the following dependencies (ideally in this
218order):
219
220@itemize @bullet
221@item libgpgerror and libgcrypt
222@item libnettle and libunbound (possibly from distribution), GnuTLS
223@item libgnurl (read the README)
224@item GNU libmicrohttpd
225@item GNU libextractor
226@end itemize
227
228Make sure to first install the various mandatory and optional
229dependencies including development headers from your distribution.
230
231Other dependencies that you should strongly consider to install is a
232database (MySQL, sqlite or Postgres).
233The following instructions will assume that you installed at least sqlite.
234For most distributions you should be able to find pre-build packages for
235the database. Again, make sure to install the client libraries @b{and} the
236respective development headers (if they are packaged separately) as well.
237
238You can find specific, detailed instructions for installing of the
239dependencies (and possibly the rest of the GNUnet installation) in the
240platform-specific descriptions, which can be found in the Index.
241Please consult them now.
242If your distribution is not listed, please study
243@ref{Build instructions for Debian 8}, the build instructions for
244Debian stable, carefully as you try to install the dependencies for your
245own distribution.
246Contributing additional instructions for further platforms is always
247appreciated.
248Please take in mind that operating system development tends to move at
249a rather fast speed. Due to this you should be aware that some of
250the instructions could be outdated by the time you are reading this.
251If you find a mistake, please tell us about it (or even better: send
252a patch to the documentation to fix it!).
253
254Before proceeding further, please double-check the dependency list.
255Note that in addition to satisfying the dependencies, you might have to
256make sure that development headers for the various libraries are also
257installed.
258There maybe files for other distributions, or you might be able to find
259equivalent packages for your distribution.
260
261While it is possible to build and install GNUnet without having root
262access, we will assume that you have full control over your system in
263these instructions.
264First, you should create a system user @emph{gnunet} and an additional
265group @emph{gnunetdns}. On the GNU/Linux distributions Debian and Ubuntu,
266type:
267
268@example
269# adduser --system --home /var/lib/gnunet --group \
270--disabled-password gnunet
271# addgroup --system gnunetdns
272@end example
273
274@noindent
275On other Unixes and GNU systems, this should have the same effect:
276
277@example
278# useradd --system --groups gnunet --home-dir /var/lib/gnunet
279# addgroup --system gnunetdns
280@end example
281
282Now compile and install GNUnet using:
283
284@example
285$ tar xvf gnunet-@value{VERSION}.tar.gz
286$ cd gnunet-@value{VERSION}
287$ ./configure --with-sudo=sudo --with-nssdir=/lib
288$ make
289$ sudo make install
290@end example
291
292If you want to be able to enable DEBUG-level log messages, add
293@code{--enable-logging=verbose} to the end of the
294@command{./configure} command.
295@code{DEBUG}-level log messages are in English only and
296should only be useful for developers (or for filing
297really detailed bug reports).
298
299Finally, you probably want to compile @command{gnunet-gtk}, which
300includes @command{gnunet-setup} (a graphical tool for
301GNUnet configuration) and @command{gnunet-fs-gtk} (a graphical tool for
302GNUnet file-sharing):
303
304@example
305$ tar xvf gnunet-gtk-@value{VERSION}.tar.gz
306$ cd gnunet-gtk-@value{VERSION}
307$ ./configure --with-gnunet=/usr/local/
308$ make
309$ sudo make install
310$ cd ..
311# just to be safe run this:
312$ sudo ldconfig
313@end example
314
315@noindent
316Next, edit the file @file{/etc/gnunet.conf} to contain the following:
317
318@example
319[arm]
320SYSTEM_ONLY = YES
321USER_ONLY = NO
322@end example
323
324@noindent
325You may need to update your @code{ld.so} cache to include
326files installed in @file{/usr/local/lib}:
327
328@example
329# ldconfig
330@end example
331
332@noindent
333Then, switch from user @code{root} to user @code{gnunet} to start
334the peer:
335
336@example
337# su -s /bin/sh - gnunet
338$ gnunet-arm -c /etc/gnunet.conf -s
339@end example
340
341You may also want to add the last line in the gnunet user's @file{crontab}
342prefixed with @code{@@reboot} so that it is executed whenever the system
343is booted:
344
345@example
346@@reboot /usr/local/bin/gnunet-arm -c /etc/gnunet.conf -s
347@end example
348
349@noindent
350This will only start the system-wide GNUnet services.
351Type exit to get back your root shell.
352Now, you need to configure the per-user part. For each
353$USER that should get access to GNUnet on the system, run:
354
355@example
356# adduser $USER gnunet
357@end example
358
359@noindent
360to allow them to access the system-wide GNUnet services. Then, each
361user should create a configuration file @file{~/.config/gnunet.conf}
362with the lines:
363
364@example
365[arm]
366SYSTEM_ONLY = NO
367USER_ONLY = YES
368DEFAULTSERVICES = gns
369@end example
370
371@noindent
372and start the per-user services using
373
374@example
375$ gnunet-arm -c ~/.config/gnunet.conf -s
376@end example
377
378@noindent
379Again, adding a @code{crontab} entry to autostart the peer is advised:
380
381@example
382@@reboot /usr/local/bin/gnunet-arm -c $HOME/.config/gnunet.conf -s
383@end example
384
385@noindent
386Note that some GNUnet services (such as SOCKS5 proxies) may need a
387system-wide TCP port for each user.
388For those services, systems with more than one user may require each user
389to specify a different port number in their personal configuration file.
390
391Finally, the user should perform the basic initial setup for the GNU Name
392System (GNS) certificate authority. This is done by running:
393
394@example
395$ gnunet-gns-proxy-setup-ca
396@end example
397
398@noindent
399The first generates the default zones, wheras the second setups the GNS
400Certificate Authority with the user's browser. Now, to activate GNS in the
401normal DNS resolution process, you need to edit your
402@file{/etc/nsswitch.conf} where you should find a line like this:
403
404@example
405hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
406@end example
407
408@noindent
409The exact details may differ a bit, which is fine. Add the text
410@emph{"gns [NOTFOUND=return]"} after @emph{"files"}.
411Keep in mind that we included a backslash ("\") here just for
412markup reasons. You should write the text below on @b{one line}
413and @b{without} the "\":
414
415@example
416hosts: files gns [NOTFOUND=return] mdns4_minimal \
417[NOTFOUND=return] dns mdns4
418@end example
419
420@c FIXME: Document new behavior.
421You might want to make sure that @file{/lib/libnss_gns.so.2} exists on
422your system, it should have been created during the installation.
423
424@node Build instructions for Ubuntu 12.04 using Git
425@section Build instructions for Ubuntu 12.04 using Git
426
427@menu
428* Install the required build tools::
429* Install libgcrypt 1.6 and libgpg-error::
430* Install gnutls with DANE support::
431* Install libgnurl::
432* Install libmicrohttpd from Git::
433* Install libextractor from Git::
434* Install GNUnet dependencies::
435* Build GNUnet::
436* Install the GNUnet-gtk user interface from Git::
437@end menu
438
439@node Install the required build tools
440@subsection Install the required build tools
441
442First, make sure Git is installed on your system:
443
444@example
445$ sudo apt-get install git
446@end example
447
448Install the essential buildtools:
449
450@example
451$ sudo apt-get install automake autopoint autoconf libtool
452@end example
453
454@node Install libgcrypt 1.6 and libgpg-error
455@subsection Install libgcrypt 1.6 and libgpg-error
456
457@ref{generic source installation - libgpg-error}
458
459@node Install gnutls with DANE support
460@subsection Install gnutls with DANE support
461
462@itemize @bullet
463@item @ref{generic source installation - nettle}
464@item @ref{generic source installation - ldns}
465@item @ref{generic source installation - libunbound/unbound}
466@item @ref{generic source installation - gnutls}
467@item @ref{generic source installation - libgcrypt}
468@end itemize
469
470@node Install libgnurl
471@subsection Install libgnurl
472
473Follow the @ref{generic source installation - libgnurl}.
474
475@node Install libmicrohttpd from Git
476@subsection Install libmicrohttpd from Git
477
478@example
479$ git clone https://gnunet.org/git/libmicrohttpd
480$ cd libmicrohttpd/
481$ ./bootstrap
482$ ./configure
483$ sudo make install ; cd ..
484@end example
485
486@node Install libextractor from Git
487@subsection Install libextractor from Git
488
489Install libextractor dependencies:
490
491@example
492$ sudo apt-get install zlib1g-dev libgsf-1-dev libmpeg2-4-dev \
493 libpoppler-dev libvorbis-dev libexiv2-dev libjpeg-dev \
494 libtiff-dev libgif-dev libvorbis-dev libflac-dev libsmf-dev \
495 g++
496@end example
497
498Build libextractor:
499
500@example
501$ git clone https://gnunet.org/git/libextractor
502$ cd libextractor
503$ ./bootstrap
504$ ./configure
505$ sudo make install ; cd ..
506@end example
507
508@node Install GNUnet dependencies
509@subsection Install GNUnet dependencies
510
511@example
512$ sudo apt-get install libidn11-dev libunistring-dev libglpk-dev \
513 libpulse-dev libbluetooth-dev libsqlite-dev
514@end example
515
516Install libopus:
517
518@example
519$ wget http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz
520$ tar xf opus-1.1.tar.gz
521$ cd opus-1.1/
522$ ./configure
523$ sudo make install ; cd ..
524@end example
525
526Choose one or more database backends:
527
528SQLite3:
529@example
530$ sudo apt-get install libsqlite3-dev
531@end example
532MySQL:
533@example
534$ sudo apt-get install libmysqlclient-dev
535@end example
536PostgreSQL:
537@example
538$ sudo apt-get install libpq-dev postgresql
539@end example
540
541
542
543@node Build GNUnet
544@subsection Build GNUnet
545
546
547
548@menu
549* Configuring the installation path::
550* Configuring the system::
551* Installing components requiring sudo permission::
552* Build::
553@end menu
554
555@node Configuring the installation path
556@subsubsection Configuring the installation path
557
558You can specify the location of the GNUnet installation by setting the
559prefix when calling the configure script with @code{--prefix=DIRECTORY}
560
561@example
562$ export PATH=$PATH:DIRECTORY/bin
563@end example
564
565@node Configuring the system
566@subsubsection Configuring the system
567
568Please make sure NOW that you have created a user and group 'gnunet'
569and additionally a group 'gnunetdns':
570
571@example
572$ sudo addgroup gnunet
573$ sudo addgroup gnunetdns
574$ sudo adduser gnunet
575@end example
576
577Each GNUnet user should be added to the 'gnunet' group (may
578require fresh login to come into effect):
579
580@example
581$ sudo useradd -G gnunet
582@end example
583
584@node Installing components requiring sudo permission
585@subsubsection Installing components requiring sudo permission
586
587Some components, like the nss plugin required for GNS, may require root
588permissions. To allow these few components to be installed use:
589
590@example
591$ ./configure --with-sudo
592@end example
593
594@node Build
595@subsubsection Build
596
597@example
598$ git clone https://gnunet.org/git/gnunet/
599$ cd gnunet/
600$ ./bootstrap
601@end example
602
603Use the required configure call including the optional installation prefix
604@code{PREFIX} or the sudo permissions:
605
606@example
607$ ./configure [ --with-sudo | --with-prefix=PREFIX ]
608@end example
609
610@example
611$ make; sudo make install
612@end example
613
614After installing it, you need to create an empty configuration file:
615
616@example
617mkdir ~/.gnunet; touch ~/.gnunet/gnunet.conf
618@end example
619
620And finally you can start GNUnet with:
621
622@example
623$ gnunet-arm -s
624@end example
625
626@node Install the GNUnet-gtk user interface from Git
627@subsection Install the GNUnet-gtk user interface from Git
628
629
630Install depencies:
631
632@example
633$ sudo apt-get install libgtk-3-dev libunique-3.0-dev libgladeui-dev \
634 libqrencode-dev
635@end example
636
637Build GNUnet (with an optional prefix) and execute:
638
639@example
640$ git clone https://gnunet.org/git/gnunet-gtk/
641$ cd gnunet-gtk/
642$ ./bootstrap
643$ ./configure [--prefix=PREFIX] --with-gnunet=DIRECTORY
644$ make; sudo make install
645@end example
646
647@node Build instructions for software builds from source
648@section Build instructions for software builds from source
649
650This section describes software builds in case your operating
651system lacks binary substitutes / binary builds for some dependencies
652of GNUnet.
653It is assumed that you have installed common build dependencies
654and that these instructions are treated as generic without any
655debugging help.
656It is furthermore assumed that you use the release tarballs of
657the software, installation from the respective version control
658sources might differ in ways that are only minimal different
659(for example a dependency on autotools etc).
660
661@menu
662* generic source installation - nettle::
663* generic source installation - ldns::
664* generic source installation - libunbound/unbound::
665* generic source installation - libav::
666* generic source installation - libextractor::
667* generic source installation - libgpg-error::
668* generic source installation - libgcrypt::
669* generic source installation - gnutls::
670* generic source installation - libmicrohttpd::
671* generic source installation - libgnurl::
672@end menu
673
674@node generic source installation - nettle
675@subsection generic source installation - nettle
676
677@example
678$ wget http://www.lysator.liu.se/~nisse/archive/nettle-2.7.1.tar.gz
679$ tar xf nettle-2.7.1.tar.gz
680$ cd nettle-2.7.1
681$ ./configure
682$ sudo make install ; cd ..
683@end example
684
685@node generic source installation - ldns
686@subsection generic source installation - ldns
687
688@example
689$ wget https://www.nlnetlabs.nl/downloads/ldns/ldns-1.6.16.tar.gz
690$ tar xf ldns-1.6.16.tar.gz
691$ cd ldns-1.6.16
692$ ./configure
693$ sudo make install ; cd ..
694@end example
695
696@node generic source installation - libunbound/unbound
697@subsection generic source installation - libunbound/unbound
698
699@example
700$ wget https://unbound.net/downloads/unbound-1.4.21.tar.gz
701$ tar xf unbound-1.4.21.tar.gz
702$ cd unbound-1.4.21
703$ ./configure
704$ sudo make install ; cd ..
705@end example
706
707@node generic source installation - libav
708@subsection generic source installation - libav
709
710@example
711$ wget https://libav.org/releases/libav-9.10.tar.xz
712$ cd libav-0.9 ; ./configure --enable-shared;
713$ make; sudo make install; cd ..
714@end example
715
716@node generic source installation - libextractor
717@subsection generic source installation - libextractor
718
719@example
720$ wget https://ftp.gnu.org/gnu/libextractor/libextractor-1.3.tar.gz
721$ tar xvf libextractor-1.3.tar.gz
722$ cd libextractor-1.3 ; ./configure;
723$ make ; sudo make install; cd ..
724@end example
725
726@node generic source installation - libgpg-error
727@subsection generic source installation - libgpg-error
728
729@example
730$ wget https://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.12.tar.bz2
731$ tar xvf libgpg-error-1.12.tar.bz2
732$ cd libgpg-error-1.12; ./configure;
733$ make ; sudo make install; cd ..
734@end example
735
736@node generic source installation - libgcrypt
737@subsection generic source installation - libgcrypt
738@example
739$ wget https://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.6.0.tar.bz2
740$ tar xvf libgcrypt-1.6.0.tar.bz2
741$ cd libgcrypt-1.6.0; ./configure --with-gpg-error-prefix=/usr/local;
742$ make ; sudo make install ; cd ..
743@end example
744
745@node generic source installation - gnutls
746@subsection generic source installation - gnutls
747
748@example
749$ wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.2/gnutls-3.2.7.tar.xz
750$ tar xvf gnutls-3.2.7.tar.xz
751$ cd gnutls-3.2.7
752@end example
753
754@noindent
755If you want a GnuTLS with DANE functionality (recommended for GNUnet),
756you have to compile it against libunbound. Assuming that libunbound
757is installed on your system:
758
759@example
760$ ./configure --enable-libdane
761@end example
762
763@noindent
764Note that the build system of GnuTLS should pick up libunbound without
765the explicit mention of @code{--enable-libdane}.
766If you don't want libdane support you should pass @code{--disable-libdane}
767instead.
768
769@example
770$ ./configure
771$ make ; sudo make install ; cd ..
772@end example
773
774@node generic source installation - libmicrohttpd
775@subsection generic source installation - libmicrohttpd
776
777@example
778$ wget https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.33.tar.gz
779$ tar xvf libmicrohttpd-0.9.33.tar.gz
780$ cd libmicrohttpd-0.9.33; ./configure;
781$ make ; sudo make install ; cd ..
782@end example
783
784@node generic source installation - libgnurl
785@subsection generic source installation - libgnurl
786
787Example installation of libgnurl version 7.57.0 from source.
788
789@example
790$ wget https://ftp.gnu.org/gnu/gnunet/gnurl-7.57.0.tar.xz
791$ wget https://ftp.gnu.org/gnu/gnunet/gnurl-7.57.0.tar.xz.sig
792$ gpg --verify gnurl-7.57.0.tar.xz.sig
793@end example
794
795@noindent
796If that command fails because you do not have the required public key,
797then run this command to import it:
798
799@example
800$ gpg --keyserver pgp.mit.edu --recv-keys A88C8ADD129828D7EAC02E52E22F9BBFEE348588
801@end example
802
803@noindent
804and rerun the gpg --verify command.
805
806@example
807$ tar xvf gnurl-7.57.0.tar.xz
808$ cd gnurl-7.57.0
809$ ./configure --disable-ntlm-wb
810$ make ; sudo make install; cd ..
811@end example
812
813You have now build and installed libgnurl from source.
814
815@menu
816* Fixing libgnurl build issues::
817@end menu
818
819@node Fixing libgnurl build issues
820@subsubsection Fixing libgnurl build issues
821
822@c FIXME: Obviously this subsection should be evaluated and
823@c if still necessary moved into gnURL itself (README) or
824@c into a separate section which deals with gnURL.
825If you have to compile libgnurl from source (for example if the version
826included in your distribution is too old or it's not included at all)
827you perhaps might get an error message while running the
828@command{configure} script:
829
830@example
831$ configure
832...
833checking for 64-bit curl_off_t data type... unknown
834checking for 32-bit curl_off_t data type... unknown
835checking for 16-bit curl_off_t data type... unknown
836configure: error: cannot find data type for curl_off_t.
837@end example
838
839@noindent
840Solution:
841
842Before running the @command{configure} script, set:
843
844@example
845CFLAGS="-I. -I$BUILD_ROOT/include"
846@end example
847
848@node Build Instructions for Microsoft Windows Platforms
849@section Build Instructions for Microsoft Windows Platforms
850
851@menu
852* Introduction to building on MS Windows::
853* Requirements::
854* Dependencies & Initial Setup::
855* GNUnet Installation::
856* Adjusting Windows for running and testing GNUnet::
857* Building the GNUnet Installer::
858* Using GNUnet with Netbeans on Windows::
859@end menu
860
861@node Introduction to building on MS Windows
862@subsection Introduction to building on MS Windows
863
864
865This document is a guide to building GNUnet and its dependencies on
866Windows platforms. GNUnet development is mostly done under GNU/Linux and
867especially git checkouts may not build out of the box.
868We regret any inconvenience, and if you have problems, please report
869them.
870
871@node Requirements
872@subsection Requirements
873
874The Howto is based upon a @strong{Windows Server 2008 32bit}
875@strong{Installation}, @strong{sbuild} and thus a
876@uref{http://www.mingw.org/wiki/MSYS, MSYS+MinGW}
877(W32-GCC-Compiler-Suite + Unix-like Userland) installation. sbuild
878is a convenient set of scripts which creates a working msys/mingw
879installation and installs most dependencies required for GNUnet.
880
881As of the point of the creation of these instructions,
882GNUnet @strong{requires} a Windows @strong{Server} 2003 or
883newer for full feature support.
884Windows Vista and later will also work, but
885@strong{non-server version can not run a VPN-Exit-Node} as the NAT
886features have been removed as of Windows Vista.
887
888@c TODO: We should document Windows 10!
889@c It seems like the situation hasn't changed with W10
890
891@node Dependencies & Initial Setup
892@subsection Dependencies & Initial Setup
893
894
895@itemize @bullet
896
897@item
898Install a fresh version of @strong{Python 2.x}, even if you are using a
899x64-OS, install a 32-bit version for use with sbuild.
900Python 3.0 is currently incompatible.
901
902@item
903Install your favorite @uref{http://code.google.com/p/tortoisegit/, git} &
904@uref{http://tortoisesvn.net/, subversion}-clients.
905
906@item
907You will also need some archive-manager like
908@uref{http://www.7-zip.org/, 7zip}.
909
910@item
911Pull a copy of sbuild to a directory of your choice, which will be used
912in the remainder of this guide. For now, we will use
913@file{c:\gnunet\sbuild\}
914
915@item
916in @file{sbuild\src\mingw\mingw32-buildall.sh}, comment out the packages
917@strong{gnunet-svn} and @strong{gnunet-gtk-svn}, as we don't want sbuild
918to compile/install those for us.
919
920@item
921Follow LRN's sbuild installation instructions.-
922@end itemize
923
924Please note that sbuild may (or will most likely) fail during
925installation, thus you really HAVE to @strong{check the logfiles} created
926during the installation process.
927Certain packages may fail to build initially due to missing dependencies,
928thus you may have to
929@strong{substitute those with binary-versions initially}. Later on once
930dependencies are satisfied you can re-build the newer package versions.
931
932@strong{It is normal that you may have to repeat this step multiple times
933and there is no uniform way to fix all compile-time issues, as the
934build-process of many of the dependencies installed are rather unstable
935on win32 and certain releases may not even compile at all.}
936
937Most dependencies for GNUnet have been set up by sbuild, thus we now
938should add the @file{bin/} directories in your new msys and mingw
939installations to PATH. You will want to create a backup of your finished
940msys-environment by now.
941
942@node GNUnet Installation
943@subsection GNUnet Installation
944
945First, we need to launch our msys-shell, you can do this via
946
947@file{C:\gnunet\sbuild\msys\msys.bat}
948
949You might wish to take a look at this file and adjust some
950login-parameters to your msys environment.
951
952Also, sbuild added two pointpoints to your msys-environment, though those
953might remain invisible:
954
955@itemize @bullet 49@itemize @bullet
956 50@item sqlite + libsqlite (the default, requires no further configuration)
957@item 51@item postgres + libpq
958/mingw, which will mount your mingw-directory from sbuild/mingw and the 52@item mysql + libmysqlclient
959other one is
960
961@item
962/src which contains all the installation sources sbuild just compiled.
963@end itemize 53@end itemize
964 54
965Check out the current GNUnet sources (git HEAD) from the 55These are the dependencies only required for certain features
966GNUnet repository "gnunet.git", we will do this in your home directory:
967
968@code{git clone https://gnunet.org/git/gnunet/ ~/gnunet}
969
970Now, we will first need to bootstrap the checked out installation and then
971configure it accordingly.
972
973@example
974cd ~/gnunet
975./bootstrap
976STRIP=true CPPFLAGS="-DUSE_IPV6=1 -DW32_VEH" CFLAGS="$CFLAGS -g -O2" \
977./configure --prefix=/ --docdir=/share/doc/gnunet \
978--with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw \
979--with-libcurl=/mingw --with-extractor=/mingw --with-sqlite=/mingw \
980--with-microhttpd=/mingw --with-plibc=/mingw --enable-benchmarks \
981--enable-expensivetests --enable-experimental --with-qrencode=/mingw \
982--enable-silent-rules --enable-experimental 2>&1 | tee -a ./configure.log
983@end example
984
985The parameters above will configure for a reasonable GNUnet installation
986to the your msys-root directory.
987Depending on which features your would like to build or you may need to
988specify additional dependencies. Sbuild installed most libs into
989the /mingw subdirectory, so remember to prefix library locations with
990this path.
991
992Like on a unixoid system, you might want to use your home directory as
993prefix for your own GNUnet installation for development, without tainting
994the buildenvironment. Just change the "prefix" parameter to point towards
995~/ in this case.
996
997Now it's time to compile GNUnet as usual. Though this will take some time,
998so you may fetch yourself a coffee or some Mate now...
999
1000@example
1001make ; make install
1002@end example
1003
1004@node Adjusting Windows for running and testing GNUnet
1005@subsection Adjusting Windows for running and testing GNUnet
1006
1007Assuming the build succeeded and you
1008@strong{added the bin directory of your GNUnet to PATH}, you can now use
1009your gnunet-installation as usual.
1010Remember that UAC or the windows firewall may popup initially, blocking
1011further execution of gnunet until you acknowledge them.
1012
1013You will also have to take the usual steps to get peer-to-peer (p2p)
1014software running properly (port forwarding, ...),
1015and GNUnet will require administrative permissions as it may even
1016install a device-driver (in case you are using gnunet-vpn and/or
1017gnunet-exit).
1018
1019@node Building the GNUnet Installer
1020@subsection Building the GNUnet Installer
1021
1022The GNUnet installer is made with
1023@uref{http://nsis.sourceforge.net/, NSIS}.
1024The installer script is located in @file{contrib\win} in the
1025GNUnet source tree.
1026
1027@node Using GNUnet with Netbeans on Windows
1028@subsection Using GNUnet with Netbeans on Windows
1029
1030TODO
1031
1032@node Build instructions for Debian 7.5
1033@section Build instructions for Debian 7.5
1034
1035
1036These are the installation instructions for Debian 7.5. They were tested
1037using a minimal, fresh Debian 7.5 AMD64 installation without non-free
1038software (no contrib or non-free).
1039By "minimal", we mean that during installation, we did not select any
1040desktop environment, servers or system utilities during the "tasksel"
1041step. Note that the packages and the dependencies that we will install
1042during this chapter take about 1.5 GB of disk space.
1043Combined with GNUnet and space for objects during compilation, you should
1044not even attempt this unless you have about 2.5 GB free after the minimal
1045Debian installation.
1046Using these instructions to build a VM image is likely to require a
1047minimum of 4-5 GB for the VM (as you will likely also want a desktop
1048manager).
1049
1050GNUnet's security model assumes that your @file{/home} directory is
1051encrypted. Thus, if possible, you should encrypt your home partition
1052(or per-user home directory).
1053
1054Naturally, the exact details of the starting state for your installation
1055should not matter much. For example, if you selected any of those
1056installation groups you might simply already have some of the necessary
1057packages installed.
1058We did this for testing, as this way we are less likely to forget to
1059mention a required package.
1060Note that we will not install a desktop environment, but of course you
1061will need to install one to use GNUnet's graphical user interfaces.
1062Thus, it is suggested that you simply install the desktop environment of
1063your choice before beginning with the instructions.
1064
1065
1066
1067@menu
1068* Update::
1069* Stable? Hah!::
1070* Update again::
1071* Installing packages::
1072* Installing dependencies from source::
1073* Installing GNUnet from source::
1074* But wait there is more!::
1075@end menu
1076
1077@node Update
1078@subsection Update
1079
1080After any installation, you should begin by running
1081
1082@example
1083# apt-get update ; apt-get upgrade
1084@end example
1085
1086to ensure that all of your packages are up-to-date. Note that the "#" is
1087used to indicate that you need to type in this command as "root"
1088(or prefix with "sudo"), whereas "$" is used to indicate typing in a
1089command as a normal user.
1090
1091@node Stable? Hah!
1092@subsection Stable? Hah!
1093
1094Yes, we said we start with a Debian 7.5 "stable" system. However, to
1095reduce the amount of compilation by hand, we will begin by allowing the
1096installation of packages from the testing and unstable distributions as
1097well.
1098We will stick to "stable" packages where possible, but some packages will
1099be taken from the other distributions.
1100Start by modifying @file{/etc/apt/sources.list} to contain the
1101following (possibly adjusted to point to your mirror of choice):
1102
1103@example
1104# These were there before:
1105deb http://ftp.de.debian.org/debian/ wheezy main
1106deb-src http://ftp.de.debian.org/debian/ wheezy main
1107deb http://security.debian.org/ wheezy/updates main
1108deb-src http://security.debian.org/ wheezy/updates main
1109deb http://ftp.de.debian.org/debian/ wheezy-updates main
1110deb-src http://ftp.de.debian.org/debian/ wheezy-updates main
1111
1112# Add these lines (feel free to adjust the mirror):
1113deb http://ftp.de.debian.org/debian/ testing main
1114deb http://ftp.de.debian.org/debian/ unstable main
1115@end example
1116
1117The next step is to create/edit your @file{/etc/apt/preferences}
1118file to look like this:
1119
1120@example
1121Package: *
1122Pin: release a=stable,n=wheezy
1123Pin-Priority: 700
1124
1125Package: *
1126Pin: release o=Debian,a=testing
1127Pin-Priority: 650
1128
1129Package: *
1130Pin: release o=Debian,a=unstable
1131Pin-Priority: 600
1132@end example
1133
1134You can read more about Apt Preferences here and here.
1135Note that other pinnings are likely to also work for GNUnet, the key
1136thing is that you need some packages from unstable (as shown below).
1137However, as unstable is unlikely to be comprehensive (missing packages)
1138or might be problematic (crashing packages), you probably want others
1139from stable and/or testing.
1140
1141@node Update again
1142@subsection Update again
1143
1144Now, run again@
1145
1146@example
1147# apt-get update@
1148# apt-get upgrade@
1149@end example
1150
1151to ensure that all your new distribution indices are downloaded, and
1152that your pinning is correct: the upgrade step should cause no changes
1153at all.
1154
1155@node Installing packages
1156@subsection Installing packages
1157
1158We begin by installing a few Debian packages from stable:@
1159
1160@example
1161# apt-get install gcc make python-zbar libltdl-dev libsqlite3-dev \
1162 libunistring-dev libopus-dev libpulse-dev openssl libglpk-dev \
1163 texlive libidn11-dev libmysqlclient-dev libpq-dev libarchive-dev \
1164 libbz2-dev libexiv2-dev libflac-dev libgif-dev libglib2.0-dev \
1165 libgtk-3-dev libmagic-dev libjpeg8-dev libmpeg2-4-dev libmp4v2-dev \
1166 librpm-dev libsmf-dev libtidy-dev libtiff5-dev libvorbis-dev \
1167 libogg-dev zlib1g-dev g++ gettext libgsf-1-dev libunbound-dev \
1168 libqrencode-dev libgladeui-dev nasm texlive-latex-extra \
1169 libunique-3.0-dev gawk miniupnpc libfuse-dev libbluetooth-dev
1170@end example
1171
1172After that, we install a few more packages from unstable:@
1173
1174@example
1175# apt-get install -t unstable nettle-dev libgstreamer1.0-dev \
1176 gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
1177 libgstreamer-plugins-base1.0-dev
1178@end example
1179
1180@node Installing dependencies from source
1181@subsection Installing dependencies from source
1182
1183Next, we need to install a few dependencies from source.
1184You might want to do this as a "normal" user and only run the
1185@code{make install} steps as root (hence the @code{sudo} in the
1186commands below). Also, you do this from any
1187directory. We begin by downloading all dependencies, then extracting the
1188sources, and finally compiling and installing the libraries.
1189
1190For these steps, follow the instructions given in the
1191installation from source instruction in this order:
1192
1193@itemize @bullet 56@itemize @bullet
1194@item @ref{generic source installation - libav} 57@item Texinfo (for building the documentation)
1195@item @ref{generic source installation - libextractor} 58@item Texlive (for building the documentation)
1196@item @ref{generic source installation - libgpg-error} 59@item miniupnpc (for traversing NAT boxes more reliably)
1197@item @ref{generic source installation - libgcrypt} 60@item libopus (for running the GNUnet conversation telephony application)
1198@item @ref{generic source installation - gnutls} 61@item libpulse (for running the GNUnet conversation telephony application)
1199@item @ref{generic source installation - libmicrohttpd} 62@item libogg (for running the GNUnet conversation telephony application)
1200@item @ref{generic source installation - libgnurl} 63@item bluez (for bluetooth support)
64@item libpbc
65(for attribute-based encryption and the identity provider subsystem)
66@item libgabe
67(for attribute-based encryption and the identity provider subsystem)
1201@end itemize 68@end itemize
1202 69
1203@node Installing GNUnet from source 70@c -----------------------------------------------------------------------
1204@subsection Installing GNUnet from source 71@node Getting the Source Code
1205 72@section Getting the Source Code
1206 73You can either download the source code using git (you obviously need
1207For this, simply follow the generic installation instructions from 74git installed) or as an archive.
1208here.
1209
1210@node But wait there is more!
1211@subsection But wait there is more!
1212
1213So far, we installed all of the packages and dependencies required to
1214ensure that all of GNUnet would be built.
1215However, while for example the plugins to interact with the MySQL or
1216Postgres databases have been created, we did not actually install or
1217configure those databases. Thus, you will need to install
1218and configure those databases or stick with the default Sqlite database.
1219Sqlite is usually fine for most applications, but MySQL can offer better
1220performance and Postgres better resillience.
1221
1222
1223@node Installing GNUnet from Git on Ubuntu 14.4
1224@section Installing GNUnet from Git on Ubuntu 14.4
1225
1226@strong{Install the required build tools:}
1227 75
76Using git type
1228@example 77@example
1229$ sudo apt-get install git automake autopoint autoconf 78git clone https://gnunet.org/git/gnunet.git
1230@end example 79@end example
1231 80
1232@strong{Install the required dependencies} 81The archive can be found at
1233 82@uref{https://gnunet.org/downloads}. Extract it using a graphical
83archive tool or @code{tar}:
1234@example 84@example
1235$ sudo apt-get install libltdl-dev libgpg-error-dev libidn11-dev \ 85tar xzvf gnunet-0.11.0pre66.tar.gz
1236 libunistring-dev libglpk-dev libbluetooth-dev libextractor-dev \
1237 libmicrohttpd-dev libgnutls28-dev
1238@end example 86@end example
1239 87
1240@strong{Choose one or more database backends} 88In the next chapter we will assume that the source code is available
1241 89in the home directory at @code{~/gnunet}.
1242@itemize @bullet
1243 90
1244@item SQLite3: 91@c -----------------------------------------------------------------------
92@node Create @code{gnunet} user and group
93@section Create @code{gnunet} user and group
94The GNUnet services should be run as a dedicated user called
95@code{gnunet}. For using them a user should be in the same group as
96this system user.
1245 97
98Create user @code{gnunet} who is member of the group @code{gnunet} and
99specify a home directory where the GNUnet services will store
100persistant data such as information about peers.
1246@example 101@example
1247$ sudo apt-get install libsqlite3-dev 102$ sudo useradd --system --groups gnunet --home-dir /var/lib/gnunet
1248@end example 103@end example
1249 104
1250@item MySQL: 105Now add your own user to the @code{gnunet} group.
1251
1252@example 106@example
1253$ sudo apt-get install libmysqlclient-dev 107$ sudo adduser alice gnunet
1254@end example 108@end example
1255 109
1256@item PostgreSQL: 110@c -----------------------------------------------------------------------
1257 111@node Preparing and Compiling the Source Code
1258@example 112@section Preparing and Compiling the Source Code
1259$ sudo apt-get install libpq-dev postgresql 113For preparing the source code for compilation a bootstrap script and
1260@end example 114@code{configure} has to be run from the source code directory. When
1261 115running @code{configure} the following options can be specified to
1262@end itemize 116customize the compilation and installation process:
1263
1264@strong{Install the optional dependencies for gnunet-conversation:}
1265
1266@example
1267$ sudo apt-get install gstreamer1.0 libpulse-dev libopus-dev
1268@end example
1269
1270@strong{Install the libgrypt 1.6.1:}
1271 117
1272@itemize @bullet 118@itemize @bullet
1273 119@item @code{--disable-documentation} - don't build the configuration documents
1274@item For Ubuntu 14.04: 120@item @code{--enable-looging=[LOGLEVEL]} - choose a loglevel (@code{debug}, @code{info}, @code{warning} or @code{error})
1275 121@item @code{--prefix=[PATH]} - the directory where the GNUnet libraries and binaries will be installed
1276@example 122@item @code{--with-extractor=[PATH]} - the path to libextractor
1277$ sudo apt-get install libgcrypt20-dev 123@item @code{--with-libidn=[PATH]} - the path to libidn
1278@end example 124@item @code{--with-microhttpd=[PATH]} - the path to libmicrohttpd
1279 125@item @code{--with-sqlite=[PATH]} - the path to libsqlite
1280@item For Ubuntu older 14.04: 126@item @code{--with-zlib=[PATH]} - the path to zlib
1281 127@item @code{--with-sudo=[PATH]} - path to the sudo binary (no need to run @code{make install} as root if specified)
1282@example
1283$ wget ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.6.1.tar.bz2
1284$ tar xf libgcrypt-1.6.1.tar.bz2
1285$ cd libgcrypt-1.6.1
1286$ ./configure
1287$ sudo make install
1288$ cd ..
1289@end example
1290
1291@end itemize 128@end itemize
1292 129
1293@strong{Install libgnurl} 130The following example configures the installation prefix
1294 131@code{/usr/lib} and disables building the documentation
1295@example
1296$ wget https://gnunet.org/sites/default/files/gnurl-7.35.0.tar.bz2
1297$ tar xf gnurl-7.35.0.tar.bz2
1298$ cd gnurl-7.35.0
1299$ ./configure --enable-ipv6 --with-gnutls --without-libssh2 \
1300 --without-libmetalink --without-winidn --without-librtmp \
1301 --without-nghttp2 --without-nss --without-cyassl --without-polarssl \
1302 --without-ssl --without-winssl --without-darwinssl --disable-sspi \
1303 --disable-ntlm-wb --disable-ldap --disable-rtsp --disable-dict \
1304 --disable-telnet --disable-tftp --disable-pop3 --disable-imap \
1305 --disable-smtp --disable-gopher --disable-file --disable-ftp
1306$ sudo make install
1307$ cd ..
1308@end example
1309
1310@strong{Install GNUnet}
1311
1312@example 132@example
1313$ git clone https://gnunet.org/git/gnunet/ 133$ cd ~/gnunet
1314$ cd gnunet/
1315$ ./bootstrap 134$ ./bootstrap
135$ configure --prefix=/usr/lib --disable-configuration
1316@end example 136@end example
1317 137
1318If you want to: 138After running the bootstrap script and @code{configure} successfully
1319 139the source code can be compiled with make. Here @code{-j5} specifies
1320@itemize @bullet 140that 5 threads should be used.
1321
1322@item Install to a different directory:
1323
1324@example
1325--prefix=PREFIX
1326@end example
1327
1328@item
1329Have sudo permission, but do not want to compile as root:
1330
1331@example
1332--with-sudo
1333@end example
1334
1335@item
1336Want debug message enabled:
1337
1338@example
1339--enable-logging=verbose
1340@end example
1341
1342@end itemize
1343
1344
1345@example
1346$ ./configure [ --with-sudo | --prefix=PREFIX | --enable-logging=verbose]
1347$ make; sudo make install
1348@end example
1349
1350After installing it, you need to create an empty configuration file:
1351
1352@example
1353touch ~/.config/gnunet.conf
1354@end example
1355
1356And finally you can start GNUnet with
1357
1358@example
1359$ gnunet-arm -s
1360@end example
1361
1362@node Build instructions for Debian 8
1363@section Build instructions for Debian 8
1364@c FIXME: I -> we
1365
1366These are the installation instructions for Debian 8. They were tested
1367sing a fresh Debian 8 AMD64 installation without non-free software (no
1368contrib or non-free). During installation, I only selected "lxde" for the
1369desktop environment.
1370Note that the packages and the dependencies that we will install during
1371this chapter take about 1.5 GB of disk space. Combined with GNUnet and
1372space for objects during compilation, you should not even attempt this
1373unless you have about 2.5 GB free after the Debian installation.
1374Using these instructions to build a VM image is likely to require a
1375minimum of 4-5 GB for the VM (as you will likely also want a desktop
1376manager).
1377
1378GNUnet's security model assumes that your @code{/home} directory is
1379encrypted.
1380Thus, if possible, you should encrypt your entire disk, or at least just
1381your home partition (or per-user home directory).
1382
1383Naturally, the exact details of the starting state for your installation
1384should not matter much.
1385For example, if you selected any of those installation groups you might
1386simply already have some of the necessary packages installed. Thus, it is
1387suggested that you simply install the desktop environment of your choice
1388before beginning with the instructions.
1389
1390
1391@menu
1392* Update Debian::
1393* Installing Debian Packages::
1394* Installing Dependencies from Source2::
1395* Installing GNUnet from Source2::
1396* But wait (again) there is more!::
1397@end menu
1398
1399@node Update Debian
1400@subsection Update Debian
1401
1402After any installation, you should begin by running
1403
1404@example
1405# apt-get update
1406# apt-get upgrade
1407@end example
1408
1409to ensure that all of your packages are up-to-date. Note that the "#" is
1410used to indicate that you need to type in this command as "root" (or
1411prefix with "sudo"), whereas "$" is used to indicate typing in a command
1412as a normal user.
1413
1414@node Installing Debian Packages
1415@subsection Installing Debian Packages
1416
1417We begin by installing a few Debian packages from stable:
1418
1419@example 141@example
1420# apt-get install gcc make python-zbar libltdl-dev libsqlite3-dev \ 142$ make -j5
1421libunistring-dev libopus-dev libpulse-dev openssl libglpk-dev texlive \
1422libidn11-dev libmysqlclient-dev libpq-dev libarchive-dev libbz2-dev \
1423libflac-dev libgif-dev libglib2.0-dev libgtk-3-dev libmpeg2-4-dev \
1424libtidy-dev libvorbis-dev libogg-dev zlib1g-dev g++ gettext \
1425libgsf-1-dev libunbound-dev libqrencode-dev libgladeui-dev nasm \
1426texlive-latex-extra libunique-3.0-dev gawk miniupnpc libfuse-dev \
1427libbluetooth-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
1428libgstreamer-plugins-base1.0-dev nettle-dev libextractor-dev \
1429libgcrypt20-dev libmicrohttpd-dev
1430@end example 143@end example
1431 144
1432@node Installing Dependencies from Source2 145@c -----------------------------------------------------------------------
1433@subsection Installing Dependencies from Source2 146@node Installation
1434 147@section Installation
1435Yes, we said we start with a Debian 8 "stable" system, but because Debian 148The compiled binaries can be installed using @code{make install}. It
1436linked GnuTLS without support for DANE, we need to compile a few things, 149needs to be run as root (or with sudo) because some binaries need the
1437in addition to GNUnet, still by hand. Yes, you can run GNUnet using the 150@code{suid} bit set. Without that some GNUnet subsystems (such as VPN)
1438respective Debian packages, but then you will not get DANE support. 151will not work.
1439
1440Next, we need to install a few dependencies from source. You might want
1441to do this as a "normal" user and only run the @code{make install} steps
1442as root (hence the @code{sudo} in the commands below). Also, you do this
1443from any directory. We begin by downloading all dependencies, then
1444extracting the sources, and finally compiling and installing the
1445libraries:
1446
1447@example
1448$ wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.3/gnutls-3.3.12.tar.xz
1449$ tar xvf gnutls-3.3.12.tar.xz
1450$ cd gnutls-3.3.12 ; ./configure ; make ; sudo make install ; cd ..
1451@end example
1452
1453For the installation and compilation of libgnurl/gnURL refer to
1454the generic installation section,
1455@xref{generic source installation - libgnurl}.
1456
1457@node Installing GNUnet from Source2
1458@subsection Installing GNUnet from Source2
1459
1460For this, simply follow the generic installation instructions from@
1461here.
1462
1463@node But wait (again) there is more!
1464@subsection But wait (again) there is more!
1465
1466So far, we installed all of the packages and dependencies required to
1467ensure that all of GNUnet would be built. However, while for example the
1468plugins to interact with the MySQL or Postgres databases have been
1469created, we did not actually install or configure those databases.
1470Thus, you will need to install and configure those databases or stick
1471with the default Sqlite database. Sqlite is usually fine for most
1472applications, but MySQL can offer better performance and Postgres better
1473resillience.
1474
1475@c @node Build instructions for OpenBSD 6.2
1476@c @section Build instructions for OpenBSD 6.2
1477
1478@node Outdated build instructions for previous revisions
1479@section Outdated build instructions for previous revisions
1480
1481This chapter contains a collection of outdated, older installation guides.
1482They are mostly intended to serve as a starting point for writing
1483up-to-date instructions and should not be expected to work for
1484GNUnet 0.10.x.
1485A set of older installation instructions can also be found in the
1486file @file{doc/outdated-and-old-installation-instructions.txt} in the
1487source tree of GNUnet.
1488
1489This file covers old instructions which no longer receive security
1490updates or any kind of support.
1491
1492@menu
1493* Installing GNUnet 0.10.1 on Ubuntu 14.04::
1494* Building GLPK for MinGW::
1495* GUI build instructions for Ubuntu 12.04 using Subversion::
1496@c * Installation with gnunet-update::
1497* Instructions for Microsoft Windows Platforms (Old)::
1498@end menu
1499
1500
1501@node Installing GNUnet 0.10.1 on Ubuntu 14.04
1502@subsection Installing GNUnet 0.10.1 on Ubuntu 14.04
1503
1504Install the required dependencies:
1505
1506@example
1507$ sudo apt-get install libltdl-dev libgpg-error-dev libidn11-dev \
1508 libunistring-dev libglpk-dev libbluetooth-dev libextractor-dev \
1509 libmicrohttpd-dev libgnutls28-dev
1510@end example
1511
1512Choose one or more database backends:
1513
1514@itemize @bullet
1515
1516@item SQLite3
1517
1518@example
1519 $ sudo apt-get install libsqlite3-dev@
1520@end example
1521
1522@item MySQL
1523
1524@example
1525$ sudo apt-get install libmysqlclient-dev@
1526@end example
1527
1528@item PostgreSQL
1529
1530@example
1531 $ sudo apt-get install libpq-dev postgresql@
1532@end example
1533
1534@end itemize
1535
1536Install the optional dependencies for gnunet-conversation:
1537
1538@example
1539 $ sudo apt-get install gstreamer1.0 libpulse-dev libopus-dev
1540@end example
1541
1542Install libgcrypt 1.6:
1543
1544@itemize @bullet
1545
1546@item For Ubuntu 14.04:
1547
1548@example
1549$ sudo apt-get install libgcrypt20-dev
1550@end example
1551
1552@item For Ubuntu older than 14.04:
1553 152
1554@example 153@example
1555wget ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.6.1.tar.bz2
1556$ tar xf libgcrypt-1.6.1.tar.bz2
1557$ cd libgcrypt-1.6.1
1558$ ./configure
1559$ sudo make install 154$ sudo make install
1560$ cd ..
1561@end example
1562@end itemize
1563
1564Install libgnurl:
1565
1566@pxref{generic source installation - libgnurl}.
1567
1568Install GNUnet:
1569
1570@example
1571$ wget http://ftpmirror.gnu.org/gnunet/gnunet-0.10.1.tar.gz
1572$ tar xf gnunet-0.10.1.tar.gz
1573$ cd gnunet-0.10.1
1574@end example
1575
1576If you want to:
1577
1578@itemize @bullet
1579
1580@item
1581Install to a different directory:
1582
1583@example
1584--prefix=PREFIX
1585@end example 155@end example
1586 156
1587@item 157One important library is the GNS plugin for NSS (the name services
1588Have sudo permission, but do not want to compile as root: 158switch) which allows using GNS (the GNU name system) in the normal DNS
1589 159resolution process. Unfortunately NSS expects it in a specific
1590@example 160location (probably @code{/lib}) which may differ from the installation
1591--with-sudo 161prefix (see @code{--prefix} option in the previous section). This is
1592@end example 162why the pugin has to be installed manually.
1593
1594@item
1595Want debug message enabled:
1596
1597@example
1598--enable-logging=verbose
1599@end example
1600
1601@end itemize
1602
1603@example
1604$ ./configure [ --with-sudo | --prefix=PREFIX | --enable-logging=verbose]
1605$ make; sudo make install
1606@end example
1607 163
1608After installing it, you need to create an empty configuration file: 164Find the directory where nss plugins are installed on your system, e.g.
1609 165
1610@example 166@example
1611touch ~/.config/gnunet.conf 167$ ls -l /lib/libnss_*
168/lib/libnss_mymachines.so.2
169/lib/libnss_resolve.so.2
170/lib/libnss_myhostname.so.2
171/lib/libnss_systemd.so.2
1612@end example 172@end example
1613 173
1614And finally you can start GNUnet with 174Copy the GNS NSS plugin to that directory:
1615 175
1616@example 176@example
1617$ gnunet-arm -s 177cp ~/gnunet/src/gns/nss/libnss_gns.so.2 /lib
1618@end example 178@end example
1619 179
1620@node Building GLPK for MinGW 180Now, to activate the plugin, you need to edit your
1621@subsection Building GLPK for MinGW 181@code{/etc/nsswitch.conf} where you should find a line like this:
1622
1623GNUnet now requires the GNU Linear Programming Kit (GLPK).
1624Since there's is no package you can install with @code{mingw-get} you
1625have to compile it from source:
1626
1627@itemize @bullet
1628
1629@item Download the latest version from
1630@uref{http://ftp.gnu.org/gnu/glpk/}
1631
1632@item Unzip the downloaded source tarball using your favourite
1633unzipper application In the MSYS shell
1634
1635@item change to the respective directory
1636
1637@item Configure glpk for "i686-pc-mingw32":
1638 182
1639@example 183@example
1640./configure '--build=i686-pc-mingw32' 184hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
1641@end example 185@end example
1642 186
1643@item run 187The exact details may differ a bit, which is fine. Add the text
188@code{"gns [NOTFOUND=return]"} after @code{"files"}.
1644 189
1645@example 190@example
1646make install check 191hosts: files gns [NOTFOUND=return] mdns4_minimal [NOTFOUND=return] dns mdns4
1647@end example 192@end example
1648 193
1649@end itemize 194Optionally, if GNS shall be used with a browser, execute the GNS
1650 195CA-setup script. It will isetup the GNS Certificate Authority with the
1651MinGW does not automatically detect the correct buildtype so you have to 196user's browser.
1652specify it manually.
1653
1654
1655@node GUI build instructions for Ubuntu 12.04 using Subversion
1656@subsection GUI build instructions for Ubuntu 12.04 using Subversion
1657
1658After installing GNUnet you can continue installing the GNUnet GUI tools:
1659
1660First, install the required dependencies:
1661
1662@example 197@example
1663$ sudo apt-get install libgladeui-dev libqrencode-dev 198$ gnunet-gns-proxy-setup-ca
1664@end example 199@end example
1665 200
1666Please ensure that the GNUnet shared libraries can be found by the linker. 201Finally install a configuration file in
1667If you installed GNUnet libraries in a non standard path 202@code{~/.gnunet/gnunet.conf}. Below you find an example config which
1668(say GNUNET_PREFIX=/usr/local/lib/), you can 203allows you to start GNUnet.
1669
1670@itemize @bullet
1671
1672@item set the environmental variable permanently to:
1673 204
1674@example 205@example
1675LD_LIBRARY_PATH=$GNUNET_PREFIX 206[arm]
1676@end example 207SYSTEM_ONLY = NO
1677 208USER_ONLY = NO
1678@item or add @code{$GNUNET_PREFIX} to @file{/etc/ld.so.conf}
1679
1680@end itemize
1681
1682Now you can checkout and compile the GNUnet GUI tools:
1683 209
1684@example 210[transport]
1685$ git clone https://gnunet.org/git/gnunet-gtk 211PLUGINS = tcp
1686$ cd gnunet-gtk
1687$ ./bootstrap
1688$ ./configure --prefix=$GNUNET_PREFIX/.. --with-gnunet=$GNUNET_PREFIX/..
1689$ make install
1690@end example 212@end example
1691 213
1692@c @node Installation with gnunet-update
1693@c @subsection Installation with gnunet-update
1694
1695@c gnunet-update project is an effort to introduce updates to GNUnet
1696@c installations. An interesting to-be-implemented-feature of gnunet-update
1697@c is that these updates are propagated through GNUnet's peer-to-peer
1698@c network. More information about gnunet-update can be found at
1699@c @c FIXME: Use correct cgit URL
1700@c @uref{https://gnunet.org/git/gnunet-update.git/tree/plain/README}.
1701
1702@c While the project is still under development, we have implemented the
1703@c following features which we believe may be helpful for users and we
1704@c would like them to be tested:
1705
1706@c @itemize @bullet
1707
1708@c @item
1709@c Packaging GNUnet installation along with its run-time dependencies into
1710@c update packages
1711
1712@c @item
1713@c Installing update packages into compatible hosts
1714
1715@c @item
1716@c Updating an existing installation (which had been installed by
1717@c gnunet-update) to a newer one
1718
1719@c @end itemize
1720
1721@c The above said features of gnunet-update are currently available for
1722@c testing on GNU/Linux systems.
1723
1724@c The following is a guide to help you get started with gnunet-update.
1725@c It shows you how to install the testing binary packages of GNUnet
1726@c 0.9.1 we have at @uref{https://gnunet.org/install/}.
1727
1728@c gnunet-update needs the following dependencies:
1729
1730@c @itemize @bullet
1731@c @item
1732@c python @geq{} 2.6
1733
1734@c @item
1735@c gnupg
1736
1737@c @item
1738@c python-gpgme
1739@c @end itemize
1740
1741
1742@c Checkout gnunet-update:
1743 214
1744@c @c FIXME: git!
1745@c @example
1746@c $ svn checkout -r24905 https://gnunet.org/svn/gnunet-update@
1747@c @end example
1748 215
1749@c For security reasons, all packages released for gnunet-update from us are
1750@c signed with the key at @uref{https://gnunet.org/install/key.txt}.
1751@c You would need to import this key into your gpg key ring.
1752@c gnunet-update uses this key to verify the integrity of the packages it
1753@c installs:
1754 216
1755@c @example
1756@c $ gpg --recv-keys 7C613D78@
1757@c @end example
1758 217
1759@c Download the packages relevant to your architecture (currently I have
1760@c access to GNU/Linux machines on x86_64 and i686, so only two for now,
1761@c hopefully more later) from https://gnunet.org/install/.
1762 218
1763@c To install the downloaded package into the directory /foo: 219@node MOVED FROM USER Checking the Installation
1764 220@section MOVED FROM USER Checking the Installation
1765@c @example 221@c %**end of header
1766@c gnunet-update/bin/gnunet-update install downloaded/package /foo
1767@c @end example
1768
1769@c The installer reports the directories into which shared libraries and
1770@c dependencies have been installed. You may need to add the reported shared
1771@c library installation paths to LD_LIBRARY_PATH before you start running any
1772@c installed binaries.
1773
1774@c Please report bugs at https://gnunet.org/bugs/ under the project
1775@c 'gnunet-update'.
1776
1777@node Instructions for Microsoft Windows Platforms (Old)
1778@subsection Instructions for Microsoft Windows Platforms (Old)
1779
1780This document is a @b{DEPRECATED} installation guide for GNUnet on
1781Windows.
1782It will not work for recent GNUnet versions, but maybe it will be of
1783some use if problems arise.
1784 222
1785The Windows build uses a UNIX emulator for Windows, 223This section describes a quick, casual way to check if your GNUnet
1786@uref{http://www.mingw.org/, MinGW}, to build the executable modules. 224installation works. However, if it does not, we do not cover
1787These modules run natively on Windows and do not require additional 225steps for recovery --- for this, please study the instructions
1788emulation software besides the usual dependencies. 226provided in the developer handbook as well as the system-specific
227instruction in the source code repository@footnote{The system specific
228instructions are not provided as part of this handbook!}.
1789 229
1790GNUnet development is mostly done under GNU/Linux and especially git
1791checkouts may not build out of the box.
1792We regret any inconvenience, and if you have problems, please report them.
1793 230
1794@menu 231@menu
1795* Hardware and OS requirements:: 232* gnunet-gtk::
1796* Software installation:: 233* Statistics::
1797* Building libextractor and GNUnet:: 234* Peer Information::
1798* Installer::
1799* Source::
1800@end menu 235@end menu
1801 236
1802@node Hardware and OS requirements 237@cindex GNUnet GTK
1803@subsubsection Hardware and OS requirements 238@cindex GTK
1804 239@cindex GTK user interface
1805@itemize @bullet 240@node gnunet-gtk
1806 241@subsection gnunet-gtk
1807@item Pentium II or equivalent processor, @geq{} 350 MHz 242@c %**end of header
1808
1809@item 128 MB RAM
1810
1811@item 600 MB free disk space
1812
1813@item Windows 2000 or Windows XP are recommended
1814
1815@end itemize
1816
1817@node Software installation
1818@subsubsection Software installation
1819
1820@itemize @bullet
1821
1822@item
1823@strong{Compression software}@
1824
1825The software packages GNUnet depends on are usually compressed using UNIX
1826tools like @command{tar}, @command{gzip}, @command{xzip} and
1827@command{bzip2}.
1828If you do not already have an utility that is able to extract such
1829archives, get @uref{http://www.7-zip.org/, 7-Zip}.
1830
1831@item
1832@strong{UNIX environment}@
1833
1834The MinGW project provides the compiler toolchain that is used to build
1835GNUnet.
1836Get the following packages from the
1837@uref{http://sourceforge.net/projects/mingw/files/, MinGW} project:
1838
1839@itemize @bullet
1840
1841@item GCC core
1842@item GCC g++
1843@item MSYS
1844@item MSYS Developer Tool Kit (msysDTK)
1845@item MSYS Developer Tool Kit - msys-autoconf (bin)
1846@item MSYS Developer Tool Kit - msys-automake (bin)
1847@item MinGW Runtime
1848@item MinGW Utilities
1849@item Windows API
1850@item Binutils
1851@item make
1852@item pdcurses
1853@item GDB (snapshot)
1854@end itemize
1855
1856@itemize @bullet
1857
1858
1859@item Install MSYS (to c:\mingw, for example.)@
1860Do @strong{not} use spaces in the pathname.
1861For example, avoid a location such as @file{c:\program files\mingw}.
1862
1863@item Install MinGW runtime, utilities and GCC to a subdirectory
1864(to @file{c:\mingw\mingw}, for example)
1865
1866@item Install the Development Kit to the MSYS directory
1867(@file{c:\mingw})
1868
1869@item Create a batch file bash.bat in your MSYS directory with
1870the files:
1871
1872@example
1873bin\sh.exe --login
1874@end example
1875
1876This batch file opens a shell which is used to invoke the build
1877processes.
1878MinGW's standard shell (@command{msys.bat}) is not suitable
1879because it opens a separate console window.
1880On Vista, @command{bash.bat} needs to be run as Administrator.
1881
1882@item
1883Start @command{bash.sh} and rename
1884@file{c:\mingw\mingw\lib\libstdc++.la} to avoid problems:
1885
1886@example
1887mv /usr/mingw/lib/libstdc++.la /usr/mingw/lib/libstdc++.la.broken
1888@end example
1889
1890@item
1891Unpack the Windows API to the MinGW directory (@file{c:\mingw\mingw\}) and
1892remove the declaration of DATADIR from
1893(@file{c:\mingw\mingw\include\objidl.h} (lines 55-58)
1894
1895@item
1896Unpack autoconf, automake to the MSYS directory (@file{c:\mingw})
1897
1898@item
1899Install all other packages to the MinGW directory (@file{c:\mingw\mingw\})
1900@end itemize
1901
1902
1903@item @strong{GNU Libtool}@
1904GNU Libtool is required to use shared libraries.
1905Get the prebuilt package from here and unpack it to the
1906MinGW directory (@file{c:\mingw})
1907 243
1908@item @strong{Pthreads}@ 244The @command{gnunet-gtk} package contains several graphical
1909GNUnet uses the portable POSIX thread library for multi-threading: 245user interfaces for the respective GNUnet applications.
246Currently these interfaces cover:
1910 247
1911@itemize @bullet 248@itemize @bullet
1912 249@item Statistics
1913@item Save 250@item Peer Information
1914@uref{ftp://sources.redhat.com/pub/pthreads-win32/dll-latest/lib/x86/libpthreadGC2.a, libpthreadGC2.a} 251@item GNU Name System
1915(x86) or 252@item File Sharing
1916@uref{ftp://sources.redhat.com/pub/pthreads-win32/dll-latest/lib/x64/libpthreadGC2.a, libpthreadGC2.a} 253@item Identity Management
1917(x64) as libpthread.a into the @file{lib} 254@item Conversation
1918directory (@file{c:\mingw\mingw\lib\libpthread.a}).
1919
1920@item Save
1921@uref{ftp://sources.redhat.com/pub/pthreads-win32/dll-latest/lib/x86/pthreadGC2.dll, pthreadGC2.dll}
1922(x86) or
1923@uref{ftp://sources.redhat.com/pub/pthreads-win32/dll-latest/lib/x64/pthreadGC2.dll, libpthreadGC2.a}
1924(x64) into the MinGW @file{bin} directory (@file{c:\mingw\mingw\bin}).
1925
1926@item Download all header files from
1927@uref{ftp://sources.redhat.com/pub/pthreads-win32/dll-latest/include/, include/}
1928to the @file{include} directory (@file{c:\mingw\mingw\include}).
1929@end itemize 255@end itemize
1930 256
257@node Statistics
258@subsection Statistics
259@c %**end of header
1931 260
1932@item @strong{GNU MP}@ 261First, you should launch GNUnet gtk@footnote{Obviously you should also
1933GNUnet uses the GNU Multiple Precision library for special cryptographic 262start gnunet, via gnunet-arm or the system provided method}.
1934operations. Get the GMP binary package from the 263You can do this from the command-line by typing
1935@uref{http://sourceforge.net/projects/mingwrep/, MinGW repository} and
1936unpack it to the MinGW directory (@file{c:\mingw\mingw})
1937
1938@item @strong{GNU Gettext}@
1939GNU gettext is used to provide national language support.
1940Get the prebuilt package from hereand unpack it to the MinGW
1941directory (@file{c:\mingw\mingw})
1942
1943@item @strong{GNU iconv}@
1944GNU Libiconv is used for character encoding conversion.
1945Get the prebuilt package from here and unpack it to the MinGW
1946directory (@file{c:\mingw\mingw}).
1947
1948@item @strong{SQLite}@
1949GNUnet uses the SQLite database to store data.
1950Get the prebuilt binary from here and unpack it to your MinGW directory.
1951
1952@item @strong{MySQL}@
1953As an alternative to SQLite, GNUnet also supports MySQL.
1954
1955@itemize @bullet
1956
1957@item Get the binary installer from the
1958@uref{http://dev.mysql.com/downloads/mysql/4.1.html#Windows, MySQL project}
1959(version 4.1), install it and follow the instructions in
1960@file{README.mysql}.
1961
1962@item Create a temporary build directory (@file{c:\mysql})
1963
1964@item Copy the directories @file{include\} and @file{lib\} from the
1965MySQL directory to the new directory
1966
1967@item Get the patches from
1968@uref{http://bugs.mysql.com/bug.php?id=8906&files=1, Bug #8906} and
1969@uref{http://bugs.mysql.com/bug.php?id=8872&files=1, Bug #8872} (the
1970latter is only required for MySQL
1971
1972@example
1973patch -p 0
1974@end example
1975
1976@item Move @file{lib\opt\libmysql.dll} to @file{lib\libmysql.dll}
1977
1978@item Change to @file{lib\} and create an import library:
1979 264
1980@example 265@example
1981dlltool --input-def ../include/libmySQL.def \ 266gnunet-statistics-gtk
1982--dllname libmysql.dll \
1983--output-lib libmysqlclient.a -k
1984@end example 267@end example
1985 268
1986@item Copy include\* to include\mysql\ 269If your peer@footnote{The term ``peer'' is a common word used in
1987 270federated and distributed networks to describe a participating device
1988@item Pass @code{--with-mysql=/c/mysql} to 271which is connected to the network. Thus, your Personal Computer or
1989@command{./configure} and copy @file{libmysql.dll} 272whatever it is you are looking at the Gtk+ interface describes a
1990to your PATH or GNUnet's @file{bin} directory 273``Peer'' or a ``Node''.} is running correctly, you should see a bunch
1991@end itemize 274of lines, all of which should be ``significantly'' above zero (at
1992 275least if your peer has been running for more than a few seconds). The
1993 276lines indicate how many other peers your peer is connected to (via
1994@item @strong{GTK+}@ 277different mechanisms) and how large the entire overlay network is
1995@command{gnunet-gtk} and @command{libextractor} depend on GTK. 278currently estimated to be. The X-axis represents time (in seconds
1996Get the the binary and developer packages of @command{atk}, 279since the start of @command{gnunet-gtk}).
1997@command{glib}, @command{gtk}, @command{iconv},
1998@command{gettext-runtime}, @command{pango} from
1999@uref{ftp://ftp.gtk.org/pub/gtk/v2.6/win32, gtk.org} and unpack them
2000to the MinGW directory (@file{c:\mingw\mingw}).
2001@c FIXME: The URL below for pkg-config seems wrong.
2002Get @uref{http://www.gtk.org/download/win32.php, pkg-config} and
2003@command{libpng} and unpack them to the MinGW directory
2004(@file{c:\mingw\mingw}).
2005Here is an all-in-one package for the
2006@uref{http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.24/gtk+-bundle_2.24.10-20120208_win32.zip, gtk+dependencies}
2007. Do not overwrite any existing files!
2008
2009@item @strong{Glade}@
2010@command{gnunet-gtk} and @command{gnunet-setup} were created using
2011this interface builder
2012 280
2013@itemize @bullet 281You can click on "Traffic" to see information about the amount of
2014 282bandwidth your peer has consumed, and on "Storage" to check the amount
2015@item Get the Glade and libglade (-bin and -devel) packages 283of storage available and used by your peer. Note that "Traffic" is
2016(without GTK!) from 284plotted cumulatively, so you should see a strict upwards trend in the
2017@uref{http://gladewin32.sourceforge.net/, GladeWin32} and unpack them to 285traffic.
2018the MinGW directory (@file{c:\mingw\mingw}).
2019
2020@item Get @command{libxml} from here and unpack it to the MinGW
2021directory (@file{c:\mingw\mingw}).
2022@end itemize
2023
2024@c FIXME: URLs
2025@item @strong{zLib}@
2026@command{libextractor} requires @command{zLib} to decompress some file
2027formats. GNUnet uses it to (de)compress meta-data.
2028Get zLib from here (Signature) and unpack it to the MinGW directory
2029(@file{c:\mingw\mingw}).
2030
2031@item @strong{Bzip2}@
2032@command{libextractor} also requires @command{Bzip2} to
2033decompress some file formats.
2034Get the Bzip2 (binary and developer package) from
2035@uref{http://gnuwin32.sourceforge.net/packages/bzip2.htm, GnuWin32} and
2036unpack it to the MinGW directory (@file{c:\mingw\mingw}).
2037
2038@item @strong{Libgcrypt}@
2039@command{Libgcrypt} provides the cryptographic functions used by GNUnet.
2040Get Libgcrypt from @uref{ftp://ftp.gnupg.org/gcrypt/libgcrypt/, here},
2041compile and place it in the MinGW directory
2042(@file{c:\mingw\mingw}). Currently libgcrypt @geq{} 1.4.2 is required to
2043compile GNUnet.
2044
2045@item @strong{PlibC}@
2046PlibC emulates Unix functions under Windows. Get PlibC from here and
2047unpack it to the MinGW directory (c:\mingw\mingw)
2048
2049@item @strong{OGG Vorbis}@
2050@command{OGG Vorbis} is used to extract meta-data from @file{.ogg} files.
2051Get the packages
2052@uref{http://www.gnunet.org/libextractor/download/win/libogg-1.1.4.zip, libogg}
2053and
2054@uref{http://www.gnunet.org/libextractor/download/win/libvorbis-1.2.3.zip, libvorbis}
2055from the
2056@uref{http://ftp.gnu.org/gnu/libextractor/libextractor-w32-1.0.0.zip, libextractor win32 build}
2057and unpack them to the MinGW directory (c:\mingw\mingw).
2058
2059@item @strong{Exiv2}@
2060(lib)Exiv2 is used to extract meta-data from files with Exiv2 meta-data.
2061Download
2062@uref{http://www.gnunet.org/libextractor/download/win/exiv2-0.18.2.zip, Exiv2}
2063and unpack it to the MSYS directory (c:\mingw).
2064@end itemize
2065 286
2066@node Building libextractor and GNUnet 287@node Peer Information
2067@subsubsection Building libextractor and GNUnet 288@subsection Peer Information
2068 289@c %**end of header
2069Before you compile @command{libextractor} or @command{GNUnet},
2070be sure to set @code{PKG_CONFIG_PATH}:
2071
2072@example
2073export PKG_CONFIG_PATH=/mingw/lib/pkgconfig
2074@end example
2075 290
2076@noindent 291First, you should launch the graphical user interface. You can do
2077@xref{GNUnet Installation Handbook}, for basic instructions on building 292this from the command-line by typing
2078@command{libextractor} and @command{GNUnet}.
2079By default, all modules that are created in this way contain
2080debug information and are quite large. To compile release versions
2081(small and fast) set the variable @code{CFLAGS}:
2082 293
2083@example 294@example
2084export CFLAGS='-O2 -march=pentium -fomit-frame-pointer' 295$ gnunet-peerinfo-gtk
2085./configure --prefix=$HOME --with-extractor=$HOME
2086@end example 296@end example
2087 297
2088@node Installer 298Once you have done this, you will see a list of known peers (by the
2089@subsubsection Installer 299first four characters of their public key), their friend status (all
2090 300should be marked as not-friends initially), their connectivity (green
2091The GNUnet installer is made with 301is connected, red is disconnected), assigned bandwidth, country of
2092@uref{http://nsis.sourceforge.net/, NSIS}. The installer script is 302origin (if determined) and address information. If hardly any peers
2093located in @file{contrib\win} in the GNUnet source tree. 303are listed and/or if there are very few peers with a green light for
2094 304connectivity, there is likely a problem with your network
2095@node Source 305configuration.
2096@subsubsection Source
2097
2098@c FIXME: URL
2099The sources of all dependencies are available here.
2100
2101@c @node Portable GNUnet
2102@c @section Portable GNUnet
2103
2104@c Quick instructions on how to use the most recent GNUnet on most GNU/Linux
2105@c distributions
2106 306
2107@c Currently this has only been tested on Ubuntu 12.04, 12.10, 13.04, Debian 307@c NOTE: Inserted from Installation Handbook in original ``order'':
2108@c and CentOS 6, but it should work on almost any GNU/Linux distribution. 308@c FIXME: Move this to User Handbook.
2109@c More in-detail information can be found in the handbook. 309@node MOVED FROM USER The graphical configuration interface
2110 310@section MOVED FROM USER The graphical configuration interface
2111@c Note 2017-10: Currently this section assumes the old SVN repo of GNUnet
2112@c which no longer exists.
2113
2114@c @menu
2115@c * Prerequisites::
2116@c * Download & set up gnunet-update::
2117@c * Install GNUnet::
2118@c @end menu
2119
2120@c @node Prerequisites
2121@c @subsection Prerequisites
2122
2123@c Open a terminal and paste this line into it to install all required tools
2124@c needed:
2125
2126@c @example
2127@c sudo apt-get install python-gpgme subversion
2128@c @end example
2129
2130@c @node Download & set up gnunet-update
2131@c @subsection Download & set up gnunet-update
2132
2133@c The following command will download a working version of gnunet-update
2134@c with the subversion tool and import the public key which is needed for
2135@c authentication:
2136
2137@c @example
2138@c svn checkout -r24905 https://gnunet.org/svn/gnunet-update ~/gnunet-update
2139@c cd ~/gnunet-update
2140@c gpg --keyserver "hkp://keys.gnupg.net" --recv-keys 7C613D78
2141@c @end example
2142
2143@c @node Install GNUnet
2144@c @subsection Install GNUnet
2145
2146@c Download and install GNUnet binaries which can be found here and set
2147@c library paths:
2148
2149@c @example
2150@c wget -P /tmp https://gnunet.org/install/packs/gnunet-0.9.4-`uname -m`.tgz
2151@c ./bin/gnunet-update install /tmp/gnunet-0.9*.tgz ~
2152@c echo "PATH DEFAULT=$@{PATH@}:$HOME/bin" >> ~/.pam_environment
2153@c echo -e "$@{HOME@}/lib\n$@{HOME@}/lib/gnunet-deps" | sudo tee \
2154@c /etc/ld.so.conf.d/gnunet.conf > /dev/null
2155@c sudo ldconfig
2156@c @end example
2157
2158@c You may need to re-login once after executing these last commands
2159
2160@c That's it, GNUnet is installed in your home directory now. GNUnet can be
2161@c configured and afterwards started by executing:
2162
2163@c @example
2164@c gnunet-arm -s
2165@c @end example
2166
2167@node The graphical configuration interface
2168@section The graphical configuration interface
2169 311
2170If you also would like to use @command{gnunet-gtk} and 312If you also would like to use @command{gnunet-gtk} and
2171@command{gnunet-setup} (highly recommended for beginners), do: 313@command{gnunet-setup} (highly recommended for beginners), do:
2172 314
2173@example
2174wget -P /tmp \
2175https://gnunet.org/install/packs/gnunet-0.9.4-gtk-0.9.4-`uname -m`.tgz
2176sh ~/gnunet-update/bin/gnunet-update install /tmp/gnunet-*gtk*.tgz ~
2177sudo ldconfig
2178@end example
2179
2180Now you can run @command{gnunet-setup} for easy configuration of your
2181GNUnet peer.
2182
2183@menu 315@menu
2184* Configuring your peer:: 316* Configuring your peer::
2185* Configuring the Friend-to-Friend (F2F) mode:: 317* Configuring the Friend-to-Friend (F2F) mode::
@@ -2203,7 +335,7 @@ GNUnet peer.
2203* Configuring the file-sharing service:: 335* Configuring the file-sharing service::
2204* Configuring logging:: 336* Configuring logging::
2205* Configuring the transport service and plugins:: 337* Configuring the transport service and plugins::
2206* Configuring the wlan transport plugin:: 338* Configuring the WLAN transport plugin::
2207* Configuring HTTP(S) reverse proxy functionality using Apache or nginx:: 339* Configuring HTTP(S) reverse proxy functionality using Apache or nginx::
2208* Blacklisting peers:: 340* Blacklisting peers::
2209* Configuration of the HTTP and HTTPS transport plugins:: 341* Configuration of the HTTP and HTTPS transport plugins::
@@ -2320,7 +452,7 @@ SERVERS = http://v10.gnunet.org/hostlist [^]
2320 452
2321@noindent 453@noindent
2322Besides using bootstrap servers you can configure your GNUnet peer to 454Besides using bootstrap servers you can configure your GNUnet peer to
2323recieve hostlist advertisements. 455receive hostlist advertisements.
2324Peers offering hostlists to other peers can send advertisement messages 456Peers offering hostlists to other peers can send advertisement messages
2325to peers that connect to them. If you configure your peer to receive these 457to peers that connect to them. If you configure your peer to receive these
2326messages, your peer can download these lists and connect to the peers 458messages, your peer can download these lists and connect to the peers
@@ -2413,8 +545,6 @@ list of peers can contact it to download this list.
2413To download this hostlist the peer uses HTTP. 545To download this hostlist the peer uses HTTP.
2414For this reason you have to build your peer with libgnurl (or libcurl) 546For this reason you have to build your peer with libgnurl (or libcurl)
2415and microhttpd support. 547and microhttpd support.
2416How you build your peer with these options can be found here:
2417@xref{Generic installation instructions}.
2418 548
2419To configure your peer to act as a bootstrap server you have to add the 549To configure your peer to act as a bootstrap server you have to add the
2420@command{-p} option to @code{OPTIONS} in the @code{[hostlist]} section 550@command{-p} option to @code{OPTIONS} in the @code{[hostlist]} section
@@ -2547,10 +677,10 @@ password=$the_password_you_like
2547 677
2548@end itemize 678@end itemize
2549 679
2550Thats it. Note that @file{.my.cnf} file is a slight security risk unless 680That's it. Note that @file{.my.cnf} file is a slight security risk unless
2551its on a safe partition. The @file{$HOME/.my.cnf} can of course be 681its on a safe partition. The @file{$HOME/.my.cnf} can of course be
2552a symbolic link. 682a symbolic link.
2553Luckily $USER has only priviledges to mess up GNUnet's tables, 683Luckily $USER has only privileges to mess up GNUnet's tables,
2554which should be pretty harmless. 684which should be pretty harmless.
2555 685
2556@node Testing 686@node Testing
@@ -2720,7 +850,7 @@ sqLite, MySQL and Postgres.
2720 850
2721In order to use GNUnet for file-sharing, you first need to make sure 851In order to use GNUnet for file-sharing, you first need to make sure
2722that the file-sharing service is loaded. 852that the file-sharing service is loaded.
2723This is done by setting the @code{AUTOSTART} option in 853This is done by setting the @code{START_ON_DEMAND} option in
2724section @code{[fs]} to "YES". Alternatively, you can run 854section @code{[fs]} to "YES". Alternatively, you can run
2725 855
2726@example 856@example
@@ -2812,7 +942,7 @@ The configuration section for the transport service itself is quite
2812similar to all the other services 942similar to all the other services
2813 943
2814@example 944@example
2815AUTOSTART = YES 945START_ON_DEMAND = YES
2816@@UNIXONLY@@ PORT = 2091 946@@UNIXONLY@@ PORT = 2091
2817HOSTNAME = localhost 947HOSTNAME = localhost
2818HOME = $SERVICEHOME 948HOME = $SERVICEHOME
@@ -2886,7 +1016,7 @@ TESTING_IGNORE_KEYS = ACCEPT_FROM;
2886@end example 1016@end example
2887 1017
2888@noindent 1018@noindent
2889The server has a port configured and the maximum nunber of connections. 1019The server has a port configured and the maximum number of connections.
2890The HTTPS part has two files with the certificate key and the certificate 1020The HTTPS part has two files with the certificate key and the certificate
2891file. 1021file.
2892 1022
@@ -2928,8 +1058,8 @@ TESTING_IGNORE_KEYS = ACCEPT_FROM;
2928@end example 1058@end example
2929@end itemize 1059@end itemize
2930 1060
2931@node Configuring the wlan transport plugin 1061@node Configuring the WLAN transport plugin
2932@subsection Configuring the wlan transport plugin 1062@subsection Configuring the WLAN transport plugin
2933 1063
2934The wlan transport plugin enables GNUnet to send and to receive data on a 1064The wlan transport plugin enables GNUnet to send and to receive data on a
2935wlan interface. 1065wlan interface.
@@ -3290,7 +1420,6 @@ and @code{[transport-https_client]} section of the configuration:
3290* GNS Proxy Setup:: 1420* GNS Proxy Setup::
3291* Setup of the GNS CA:: 1421* Setup of the GNS CA::
3292* Testing the GNS setup:: 1422* Testing the GNS setup::
3293* Automatic Shortening in the GNU Name System::
3294@end menu 1423@end menu
3295 1424
3296 1425
@@ -3526,8 +1655,11 @@ Now for testing purposes we can create some records in our zone to test
3526the SSL functionality of the proxy: 1655the SSL functionality of the proxy:
3527 1656
3528@example 1657@example
3529$ gnunet-namestore -a -e "1 d" -n "homepage" -t A -V 131.159.74.67 1658$ gnunet-identity -C test
3530$ gnunet-namestore -a -e "1 d" -n "homepage" -t LEHO -V "gnunet.org" 1659$ gnunet-namestore -a -e "1 d" -n "homepage" \
1660 -t A -V 131.159.74.67 -z test
1661$ gnunet-namestore -a -e "1 d" -n "homepage" \
1662 -t LEHO -V "gnunet.org" -z test
3531@end example 1663@end example
3532 1664
3533@noindent 1665@noindent
@@ -3540,11 +1672,11 @@ $ gnunet-gns-proxy
3540@noindent 1672@noindent
3541Configure your browser to use this SOCKSv5 proxy on port 7777 and visit 1673Configure your browser to use this SOCKSv5 proxy on port 7777 and visit
3542this link. 1674this link.
3543If you use @command{Firefox} (or one of its deriviates/forks such as 1675If you use @command{Firefox} (or one of its derivatives/forks such as
3544Icecat) you also have to go to @code{about:config} and set the key 1676Icecat) you also have to go to @code{about:config} and set the key
3545@code{network.proxy.socks_remote_dns} to @code{true}. 1677@code{network.proxy.socks_remote_dns} to @code{true}.
3546 1678
3547When you visit @code{https://homepage.gnu/}, you should get to the 1679When you visit @code{https://homepage.test/}, you should get to the
3548@code{https://gnunet.org/} frontpage and the browser (with the correctly 1680@code{https://gnunet.org/} frontpage and the browser (with the correctly
3549configured proxy) should give you a valid SSL certificate for 1681configured proxy) should give you a valid SSL certificate for
3550@code{homepage.gnu} and no warnings. It should look like this: 1682@code{homepage.gnu} and no warnings. It should look like this:
@@ -3552,26 +1684,6 @@ configured proxy) should give you a valid SSL certificate for
3552@c FIXME: Image does not exist, create it or save it from Drupal? 1684@c FIXME: Image does not exist, create it or save it from Drupal?
3553@c @image{images/gnunethpgns.png,5in,, picture of homepage.gnu in Webbrowser} 1685@c @image{images/gnunethpgns.png,5in,, picture of homepage.gnu in Webbrowser}
3554 1686
3555@node Automatic Shortening in the GNU Name System
3556@subsubsection Automatic Shortening in the GNU Name System
3557
3558This page describes a possible option for 'automatic name shortening',
3559which you can choose to enable with the GNU Name System.
3560
3561When GNS encounters a name for the first time, it can use the 'NICK'
3562record of the originating zone to automatically generate a name for the
3563zone. If automatic shortening is enabled, those auto-generated names will
3564be placed (as private records) into your personal 'shorten' zone (to
3565prevent confusion with manually selected names).
3566Then, in the future, if the same name is encountered again, GNS will
3567display the shortened name instead (the first time, the long name will
3568still be used as shortening typically happens asynchronously as looking up
3569the 'NICK' record takes some time). Using this feature can be a convenient
3570way to avoid very long @code{.gnu} names; however, note that names from
3571the shorten-zone are assigned on a first-come-first-serve basis and should
3572not be trusted. Furthermore, if you enable this feature, you will no
3573longer see the full delegation chain for zones once shortening has been
3574applied.
3575 1687
3576@node Configuring the GNUnet VPN 1688@node Configuring the GNUnet VPN
3577@subsection Configuring the GNUnet VPN 1689@subsection Configuring the GNUnet VPN
@@ -3742,7 +1854,7 @@ configuration file).
3742 1854
3743Some NAT boxes can be traversed using the autonomous NAT traversal method. 1855Some NAT boxes can be traversed using the autonomous NAT traversal method.
3744This requires certain GNUnet components to be installed with "SUID" 1856This requires certain GNUnet components to be installed with "SUID"
3745prividledges on your system (so if you're installing on a system you do 1857privileges on your system (so if you're installing on a system you do
3746not have administrative rights to, this will not work). 1858not have administrative rights to, this will not work).
3747If you installed as 'root', you can enable autonomous NAT traversal by 1859If you installed as 'root', you can enable autonomous NAT traversal by
3748checking the "Enable NAT traversal using ICMP method". 1860checking the "Enable NAT traversal using ICMP method".
@@ -3781,8 +1893,8 @@ desktop-user to "sudo" (i.e. using gtksudo) to the "gnunet" user account
3781and then runs "gnunet-arm -e", "gnunet-setup" and "gnunet-arm -s" in 1893and then runs "gnunet-arm -e", "gnunet-setup" and "gnunet-arm -s" in
3782sequence. 1894sequence.
3783 1895
3784@node How to start and stop a GNUnet peer 1896@node MOVED FROM USER Config Leftovers
3785@section How to start and stop a GNUnet peer 1897@section MOVED FROM USER Config Leftovers
3786 1898
3787This section describes how to start a GNUnet peer. It assumes that you 1899This section describes how to start a GNUnet peer. It assumes that you
3788have already compiled and installed GNUnet and its' dependencies. 1900have already compiled and installed GNUnet and its' dependencies.
@@ -3867,7 +1979,7 @@ gnunet-arm -c ~/.config/gnunet.conf -k fs
3867@noindent 1979@noindent
3868Assuming that you want certain services (like file-sharing) to be always 1980Assuming that you want certain services (like file-sharing) to be always
3869automatically started whenever you start GNUnet, you can activate them by 1981automatically started whenever you start GNUnet, you can activate them by
3870setting "FORCESTART=YES" in the respective section of the configuration 1982setting "IMMEDIATE_START=YES" in the respective section of the configuration
3871file (for example, "[fs]"). Then GNUnet with file-sharing support would 1983file (for example, "[fs]"). Then GNUnet with file-sharing support would
3872be started whenever you@ enter: 1984be started whenever you@ enter:
3873 1985
@@ -3906,8 +2018,8 @@ contain the lines:@
3906 2018
3907@example 2019@example
3908[arm] 2020[arm]
3909SYSTEM_ONLY = YES 2021START_SYSTEM_SERVICES = YES
3910USER_ONLY = NO 2022START_USER_SERVICES = NO
3911@end example 2023@end example
3912 2024
3913@noindent 2025@noindent
@@ -3935,8 +2047,8 @@ $USER with the lines:
3935 2047
3936@example 2048@example
3937[arm] 2049[arm]
3938SYSTEM_ONLY = NO 2050START_SYSTEM_SERVICES = NO
3939USER_ONLY = YES 2051START_USER_SERVICES = YES
3940@end example 2052@end example
3941 2053
3942@noindent 2054@noindent
@@ -4004,7 +2116,7 @@ specific to a particular user, they probably should not run as a
4004particular user. Also, there should typically only be one GNUnet peer per 2116particular user. Also, there should typically only be one GNUnet peer per
4005host. System services include the gnunet-service and gnunet-daemon 2117host. System services include the gnunet-service and gnunet-daemon
4006programs; support tools include command-line programs such as gnunet-arm. 2118programs; support tools include command-line programs such as gnunet-arm.
4007@item Priviledged helpers 2119@item Privileged helpers
4008Some GNUnet components require root rights to open raw sockets or perform 2120Some GNUnet components require root rights to open raw sockets or perform
4009other special operations. These gnunet-helper binaries are typically 2121other special operations. These gnunet-helper binaries are typically
4010installed SUID and run from services or daemons. 2122installed SUID and run from services or daemons.
@@ -4013,7 +2125,7 @@ Some GNUnet services (such as the DNS service) can manipulate the service
4013in deep and possibly highly security sensitive ways. For example, the DNS 2125in deep and possibly highly security sensitive ways. For example, the DNS
4014service can be used to intercept and alter any DNS query originating from 2126service can be used to intercept and alter any DNS query originating from
4015the local machine. Access to the APIs of these critical services and their 2127the local machine. Access to the APIs of these critical services and their
4016priviledged helpers must be tightly controlled. 2128privileged helpers must be tightly controlled.
4017@end table 2129@end table
4018 2130
4019@c FIXME: The titles of these chapters are too long in the index. 2131@c FIXME: The titles of these chapters are too long in the index.
@@ -4111,3 +2223,4 @@ Furthermore, 'make install' will silently fail to set the DNS binaries to
4111be owned by group "gnunetdns" unless that group already exists (!). 2223be owned by group "gnunetdns" unless that group already exists (!).
4112An alternative name for the "gnunetdns" group can be specified using the 2224An alternative name for the "gnunetdns" group can be specified using the
4113@code{--with-gnunetdns=GRPNAME} configure option. 2225@code{--with-gnunetdns=GRPNAME} configure option.
2226
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.
diff --git a/doc/documentation/chapters/philosophy.texi b/doc/documentation/chapters/philosophy.texi
index 681d5acc3..6d80d77ae 100644
--- a/doc/documentation/chapters/philosophy.texi
+++ b/doc/documentation/chapters/philosophy.texi
@@ -5,36 +5,28 @@
5@c NOTE: We should probably re-use some of the images lynX created 5@c NOTE: We should probably re-use some of the images lynX created
6@c for secushare, showing some of the relations and functionalities 6@c for secushare, showing some of the relations and functionalities
7@c of GNUnet. 7@c of GNUnet.
8The foremost goal of the GNUnet project is to become a widely used, 8The primary goal of the GNUnet project is to provide a reliable, open,
9reliable, open, non-discriminating, egalitarian, unconstrained and 9non-discriminating and censorship-resistant system for information
10censorship-resistant system of free information exchange. 10exchange. We value free speech above state interests and intellectual
11We value free speech above state secrets, law-enforcement or 11monopoly. GNUnet's long-term goal is to serve as a development
12intellectual property. 12platform for the next generation of Internet protocols.
13GNUnet is supposed to be an anarchistic network, where the only 13
14limitation for participants (devices or people making use of the 14GNUnet is an anarchistic network. Participants are encouraged to
15network, in the following sometimes called peers) is 15contribute at least as much resources (storage, bandwidth) to the network
16that they must contribute enough back to the network such that 16as they consume, so that their participation does not have a negative
17their resource consumption does not have a significant impact 17impact on other users.
18on other users.
19GNUnet should be more than just another file-sharing network.
20The plan is to offer many other services and in particular
21to serve as a development platform for the next generation of
22Internet Protocols.
23 18
24@menu 19@menu
25* Design Goals:: 20* Design Principles::
26* Security and Privacy:: 21* Privacy and Anonymity::
27* Versatility::
28* Practicality:: 22* Practicality::
29* Key Concepts::
30@end menu 23@end menu
31 24
32@cindex Design Goals 25@cindex Design Principles
33@cindex Design Goals 26@node Design Principles
34@node Design Goals 27@section Design Principles
35@section Design Goals
36 28
37These are the core GNUnet design goals, in order of relative importance: 29These are the GNUnet design principles, in order of importance:
38 30
39@itemize 31@itemize
40@item GNUnet must be implemented as 32@item GNUnet must be implemented as
@@ -44,385 +36,45 @@ These are the core GNUnet design goals, in order of relative importance:
44the program, to study and change the program in source code form, 36the program, to study and change the program in source code form,
45to redistribute exact copies, and to distribute modified versions. 37to redistribute exact copies, and to distribute modified versions.
46Refer to @uref{https://www.gnu.org/philosophy/free-sw.html, https://www.gnu.org/philosophy/free-sw.html}} 38Refer to @uref{https://www.gnu.org/philosophy/free-sw.html, https://www.gnu.org/philosophy/free-sw.html}}
47@item GNUnet must only disclose the minimal amount of information 39@item GNUnet must minimize the amount of personally identifiable information exposed.
48necessary.
49@c TODO: Explain 'fully' in the terminology section. 40@c TODO: Explain 'fully' in the terminology section.
50@item GNUnet must be fully distributed and survive 41@item GNUnet must be fully distributed and resilient to external attacks and rogue participants.
51@uref{https://en.wikipedia.org/wiki/Byzantine_fault_tolerance, Byzantine failures} 42@item GNUnet must be self-organizing and not depend on administrators or centralized infrastructure.
52@footnote{@uref{https://en.wikipedia.org/wiki/Byzantine_fault_tolerance, https://en.wikipedia.org/wiki/Byzantine_fault_tolerance}} 43@item GNUnet must inform the user which other participants have to be trusted when establishing private communications.
53at any position in the network.
54@item GNUnet must make it explicit to the user which entities are
55considered to be trustworthy when establishing secured communications.
56@item GNUnet must use compartmentalization to protect sensitive
57information.
58@item GNUnet must be open and permit new peers to join. 44@item GNUnet must be open and permit new peers to join.
59@item GNUnet must be self-organizing and not depend on administrators.
60@item GNUnet must support a diverse range of applications and devices. 45@item GNUnet must support a diverse range of applications and devices.
61@item The GNUnet architecture must be cost effective. 46@item GNUnet must use compartmentalization to protect sensitive information.
62@item GNUnet must provide incentives for peers to contribute more 47@item The GNUnet architecture must be resource efficient.
63resources than they consume. 48@item GNUnet must provide incentives for peers to contribute more resources than they consume.
64@end itemize 49@end itemize
65 50
66 51
67@cindex Security and Privacy 52@cindex Privacy and Anonymity
68@node Security and Privacy 53@node Privacy and Anonymity
69@section Security and Privacy 54@section Privacy and Anonymity
70
71GNUnet's primary design goals are to protect the privacy of its users and
72to guard itself against attacks or abuse.
73GNUnet does not have any mechanisms to control, track or censor users.
74Instead, the GNUnet protocols aim to make it as hard as possible to
75find out what is happening on the network or to disrupt operations.
76 55
77@cindex Versatility 56The GNUnet protocols minimize the leakage of personally identifiable information of participants and
78@node Versatility 57do not allow adversaries to control, track, monitor or censor users activities. The
79@section Versatility 58GNUnet protocols also make it as hard as possible to disrupt operations by participating in the network with malicious intent.
80 59
81We call GNUnet a peer-to-peer framework because we want to support many 60Analyzing participant's activities becomes more difficult as the number of peers and
82different forms of peer-to-peer applications. GNUnet uses a plugin 61applications that generate traffic on the network grows, even if the additional
83architecture to make the system extensible and to encourage code reuse. 62traffic generated is not related to anonymous communication. This is one of the reasons why GNUnet is developed as a peer-to-peer
84While the first versions of the system only supported anonymous
85file-sharing, other applications are being worked on and more will
86hopefully follow in the future.
87A powerful synergy regarding anonymity services is created by a large
88community utilizing many diverse applications over the same software
89infrastructure. The reason is that link encryption hides the specifics
90of the traffic for non-participating observers. This way, anonymity can
91get stronger with additional (GNUnet) traffic, even if the additional
92traffic is not related to anonymous communication. Increasing anonymity
93is the primary reason why GNUnet is developed to become a peer-to-peer
94framework where many applications share the lower layers of an 63framework where many applications share the lower layers of an
95increasingly complex protocol stack. 64increasingly complex protocol stack. The GNUnet architecture encourages many
96If merging traffic to hinder traffic analysis was not important, 65different forms of peer-to-peer applications.
97we could have just developed a dozen stand-alone applications
98and a few shared libraries.
99 66
100@cindex Practicality 67@cindex Practicality
101@node Practicality 68@node Practicality
102@section Practicality 69@section Practicality
103 70
104GNUnet allows participants to trade various amounts of security in 71Whereever possible GNUnet allows the peer to adjust its operations
105exchange for increased efficiency. However, it is not possible for any 72and functionalities to specific use cases. A GNUnet peer running on
106user's security and efficiency requirements to compromise the security 73a mobile device with limited battery for example might choose not to
107and efficiency of any other user. 74relay traffic for other participants.
108
109For GNUnet, efficiency is not paramount. If there were a more secure and
110still practical approach, we would choose to take the more secure
111alternative. @command{telnet} is more efficient than @command{ssh}, yet
112it is obsolete.
113Hardware gets faster, and code can be optimized. Fixing security issues
114as an afterthought is much harder.
115
116While security is paramount, practicability is still a requirement.
117The most secure system is always the one that nobody can use.
118Similarly, any anonymous system that is extremely inefficient will only
119find few users.
120However, good anonymity requires a large and diverse user base. Since
121individual security requirements may vary, the only good solution here is
122to allow individuals to trade-off security and efficiency.
123The primary challenge in allowing this is to ensure that the economic
124incentives work properly.
125In particular, this means that it must be impossible for a user to gain
126security at the expense of other users. Many designs (e.g. anonymity via
127broadcast) fail to give users an incentive to choose a less secure but
128more efficient mode of operation.
129GNUnet should avoid where ever possible to rely on protocols that will
130only work if the participants are benevolent.
131While some designs have had widespread success while relying on parties
132to observe a protocol that may be sub-optimal for the individuals (e.g.
133TCP Nagle), a protocol that ensures that individual goals never conflict
134with the goals of the group is always preferable.
135
136@cindex Key Concepts
137@node Key Concepts
138@section Key Concepts
139
140In this section, the fundamental concepts of GNUnet are explained.
141@c FIXME: Use @uref{https://docs.gnunet.org/bib/, research papers}
142@c once we have the new bibliography + subdomain setup.
143Most of them are also described in our research papers.
144First, some of the concepts used in the GNUnet framework are detailed.
145The second part describes concepts specific to anonymous file-sharing.
146
147@menu
148* Authentication::
149* Accounting to Encourage Resource Sharing::
150* Confidentiality::
151* Anonymity::
152* Deniability::
153* Peer Identities::
154* Zones in the GNU Name System (GNS Zones)::
155* Egos::
156@end menu
157
158@cindex Authentication
159@node Authentication
160@subsection Authentication
161
162Almost all peer-to-peer communications in GNUnet are between mutually
163authenticated peers. The authentication works by using ECDHE, that is a
164DH (Diffie---Hellman) key exchange using ephemeral eliptic curve
165cryptography. The ephemeral ECC (Eliptic Curve Cryptography) keys are
166signed using ECDSA (@uref{http://en.wikipedia.org/wiki/ECDSA, ECDSA}).
167The shared secret from ECDHE is used to create a pair of session keys
168@c FIXME: LOng word for HKDF. More FIXMEs: Explain MITM etc.
169(using HKDF) which are then used to encrypt the communication between the
170two peers using both 256-bit AES (Advanced Encryption Standard)
171and 256-bit Twofish (with independently derived secret keys).
172As only the two participating hosts know the shared secret, this
173authenticates each packet
174without requiring signatures each time. GNUnet uses SHA-512
175(Secure Hash Algorithm) hash codes to verify the integrity of messages.
176
177In GNUnet, the identity of a host is its public key. For that reason,
178man-in-the-middle attacks will not break the authentication or accounting
179goals. Essentially, for GNUnet, the IP of the host has nothing to do with
180the identity of the host. As the public key is the only thing that truly
181matters, faking an IP, a port or any other property of the underlying
182transport protocol is irrelevant. In fact, GNUnet peers can use
183multiple IPs (IPv4 and IPv6) on multiple ports --- or even not use the
184IP protocol at all (by running directly on layer 2).
185
186@c NOTE: For consistency we will use @code{HELLO}s throughout this Manual.
187GNUnet uses a special type of message to communicate a binding between
188public (ECC) keys to their current network address. These messages are
189commonly called @code{HELLO}s or peer advertisements.
190They contain the public key of the peer and its current network
191addresses for various transport services.
192A transport service is a special kind of shared library that
193provides (possibly unreliable, out-of-order) message delivery between
194peers.
195For the UDP and TCP transport services, a network address is an IP and a
196port.
197GNUnet can also use other transports (HTTP, HTTPS, WLAN, etc.) which use
198various other forms of addresses. Note that any node can have many
199different active transport services at the same time,
200and each of these can have a different addresses.
201Binding messages expire after at most a week (the timeout can be
202shorter if the user configures the node appropriately).
203This expiration ensures that the network will eventually get rid of
204outdated advertisements.
205@footnote{Ronaldo A. Ferreira, Christian Grothoff, and Paul Ruth.
206A Transport Layer Abstraction for Peer-to-Peer Networks
207Proceedings of the 3rd International Symposium on Cluster Computing
208and the Grid (GRID 2003), 2003.
209(@uref{https://gnunet.org/git/bibliography.git/plain/docs/transport.pdf, https://gnunet.org/git/bibliography.git/plain/docs/transport.pdf})}
210
211@cindex Accounting to Encourage Resource Sharing
212@node Accounting to Encourage Resource Sharing
213@subsection Accounting to Encourage Resource Sharing
214
215Most distributed P2P networks suffer from a lack of defenses or
216precautions against attacks in the form of freeloading.
217While the intentions of an attacker and a freeloader are different, their
218effect on the network is the same; they both render it useless.
219Most simple attacks on networks such as @command{Gnutella}
220involve flooding the network with traffic, particularly
221with queries that are, in the worst case, multiplied by the network.
222
223In order to ensure that freeloaders or attackers have a minimal impact on
224the network, GNUnet's file-sharing implementation tries to distinguish
225good (contributing) nodes from malicious (freeloading) nodes. In GNUnet,
226every file-sharing node keeps track of the behavior of every other node it
227has been in contact with. Many requests (depending on the application)
228are transmitted with a priority (or importance) level.
229That priority is used to establish how important the sender believes
230this request is. If a peer responds to an important request, the
231recipient will increase its trust in the responder:
232the responder contributed resources.
233If a peer is too busy to answer all requests, it needs to prioritize.
234For that, peers do not take the priorities of the requests received at
235face value.
236First, they check how much they trust the sender, and depending on that
237amount of trust they assign the request a (possibly lower) effective
238priority. Then, they drop the requests with the lowest effective priority
239to satisfy their resource constraints. This way, GNUnet's economic model
240ensures that nodes that are not currently considered to have a surplus in
241contributions will not be served if the network load is high.
242@footnote{Christian Grothoff. An Excess-Based Economic Model for Resource
243Allocation in Peer-to-Peer Networks. Wirtschaftsinformatik, June 2003.
244(@uref{https://gnunet.org/git/bibliography.git/plain/docs/ebe.pdf, https://gnunet.org/git/bibliography.git/plain/docs/ebe.pdf})}
245@c 2009?
246
247@cindex Confidentiality
248@node Confidentiality
249@subsection Confidentiality
250
251Adversaries outside of GNUnet are not supposed to know what kind of
252actions a peer is involved in. Only the specific neighbor of a peer that
253is the corresponding sender or recipient of a message may know its
254contents, and even then application protocols may place further
255restrictions on that knowledge.
256In order to ensure confidentiality, GNUnet uses link encryption, that is
257each message exchanged between two peers is encrypted using a pair of
258keys only known to these two peers.
259Encrypting traffic like this makes any kind of traffic analysis much
260harder. Naturally, for some applications, it may still be desirable if
261even neighbors cannot determine the concrete contents of a message.
262In GNUnet, this problem is addressed by the specific application-level
263protocols (see for example, deniability and anonymity in anonymous file
264sharing).
265
266@cindex Anonymity
267@node Anonymity
268@subsection Anonymity
269 75
270@menu 76For certain applications like file-sharing GNUnet allows participants to trade degrees of anonymity in
271* How file-sharing achieves Anonymity:: 77exchange for increased efficiency. However, it is not possible for any
272@end menu 78user's efficiency requirements to compromise the anonymity
273 79of any other user.
274Providing anonymity for users is the central goal for the anonymous
275file-sharing application. Many other design decisions follow in the
276footsteps of this requirement.
277Anonymity is never absolute. While there are various
278scientific metrics@footnote{Claudia Díaz, Stefaan Seys, Joris Claessens,
279and Bart Preneel. Towards measuring anonymity.
2802002.
281(@uref{https://gnunet.org/git/bibliography.git/plain/docs/article-89.pdf, https://gnunet.org/git/bibliography.git/plain/docs/article-89.pdf})}
282that can help quantify the level of anonymity that a given mechanism
283provides, there is no such thing as complete anonymity.
284GNUnet's file-sharing implementation allows users to select for each
285operation (publish, search, download) the desired level of anonymity.
286The metric used is the amount of cover traffic available to hide the
287request.
288While this metric is not as good as, for example, the theoretical metric
289given in scientific metrics@footnote{likewise},
290it is probably the best metric available to a peer with a purely local
291view of the world that does not rely on unreliable external information.
292The default anonymity level is 1, which uses anonymous routing but
293imposes no minimal requirements on cover traffic. It is possible
294to forego anonymity when this is not required. The anonymity level of 0
295allows GNUnet to use more efficient, non-anonymous routing.
296
297@cindex How file-sharing achieves Anonymity
298@node How file-sharing achieves Anonymity
299@subsubsection How file-sharing achieves Anonymity
300
301Contrary to other designs, we do not believe that users achieve strong
302anonymity just because their requests are obfuscated by a couple of
303indirections. This is not sufficient if the adversary uses traffic
304analysis.
305The threat model used for anonymous file sharing in GNUnet assumes that
306the adversary is quite powerful.
307In particular, we assume that the adversary can see all the traffic on
308the Internet. And while we assume that the adversary
309can not break our encryption, we assume that the adversary has many
310participating nodes in the network and that it can thus see many of the
311node-to-node interactions since it controls some of the nodes.
312
313The system tries to achieve anonymity based on the idea that users can be
314anonymous if they can hide their actions in the traffic created by other
315users.
316Hiding actions in the traffic of other users requires participating in the
317traffic, bringing back the traditional technique of using indirection and
318source rewriting. Source rewriting is required to gain anonymity since
319otherwise an adversary could tell if a message originated from a host by
320looking at the source address. If all packets look like they originate
321from one node, the adversary can not tell which ones originate from that
322node and which ones were routed.
323Note that in this mindset, any node can decide to break the
324source-rewriting paradigm without violating the protocol, as this
325only reduces the amount of traffic that a node can hide its own traffic
326in.
327
328If we want to hide our actions in the traffic of other nodes, we must make
329our traffic indistinguishable from the traffic that we route for others.
330As our queries must have us as the receiver of the reply
331(otherwise they would be useless), we must put ourselves as the receiver
332of replies that actually go to other hosts; in other words, we must
333indirect replies.
334Unlike other systems, in anonymous file-sharing as implemented on top of
335GNUnet we do not have to indirect the replies if we don't think we need
336more traffic to hide our own actions.
337
338This increases the efficiency of the network as we can indirect less under
339higher load.@footnote{Krista Bennett and Christian Grothoff.
340GAP --- practical anonymous networking. In Proceedings of
341Designing Privacy Enhancing Technologies, 2003.
342(@uref{https://gnunet.org/git/bibliography.git/plain/docs/aff.pdf, https://gnunet.org/git/bibliography.git/plain/docs/aff.pdf})}
343
344@cindex Deniability
345@node Deniability
346@subsection Deniability
347
348Even if the user that downloads data and the server that provides data are
349anonymous, the intermediaries may still be targets. In particular, if the
350intermediaries can find out which queries or which content they are
351processing, a strong adversary could try to force them to censor
352certain materials.
353
354With the file-encoding used by GNUnet's anonymous file-sharing, this
355problem does not arise.
356The reason is that queries and replies are transmitted in
357an encrypted format such that intermediaries cannot tell what the query
358is for or what the content is about. Mind that this is not the same
359encryption as the link-encryption between the nodes. GNUnet has
360encryption on the network layer (link encryption, confidentiality,
361authentication) and again on the application layer (provided
362by @command{gnunet-publish}, @command{gnunet-download},
363@command{gnunet-search} and @command{gnunet-gtk}).
364@footnote{Christian Grothoff, Krista Grothoff, Tzvetan Horozov,
365and Jussi T. Lindgren.
366An Encoding for Censorship-Resistant Sharing.
3672009.
368(@uref{https://gnunet.org/git/bibliography.git/plain/docs/ecrs.pdf, https://gnunet.org/git/bibliography.git/plain/docs/ecrs.pdf})}
369
370@cindex Peer Identities
371@node Peer Identities
372@subsection Peer Identities
373
374Peer identities are used to identify peers in the network and are unique
375for each peer. The identity for a peer is simply its public key, which is
376generated along with a private key the peer is started for the first time.
377While the identity is binary data, it is often expressed as ASCII string.
378For example, the following is a peer identity as you might see it in
379various places:
380
381@example
382UAT1S6PMPITLBKSJ2DGV341JI6KF7B66AC4JVCN9811NNEGQLUN0
383@end example
384
385@noindent
386You can find your peer identity by running @command{gnunet-peerinfo -s}.
387
388@cindex Zones in the GNU Name System (GNS Zones)
389@node Zones in the GNU Name System (GNS Zones)
390@subsection Zones in the GNU Name System (GNS Zones)
391
392@c FIXME: Explain or link to an explanation of the concept of public keys
393@c and private keys.
394GNS@footnote{Matthias Wachs, Martin Schanzenbach, and Christian Grothoff.
395A Censorship-Resistant, Privacy-Enhancing and Fully Decentralized Name
396System. In proceedings of 13th International Conference on Cryptology and
397Network Security (CANS 2014). 2014.
398@uref{https://gnunet.org/git/bibliography.git/plain/docs/gns2014wachs.pdf, https://gnunet.org/git/bibliography.git/plain/docs/gns2014wachs.pdf}}
399zones are similar to those of DNS zones, but instead of a hierarchy of
400authorities to governing their use, GNS zones are controlled by a private
401key.
402When you create a record in a DNS zone, that information stored in your
403nameserver. Anyone trying to resolve your domain then gets pointed
404(hopefully) by the centralised authority to your nameserver.
405Whereas GNS, being fully decentralized by design, stores that information
406in DHT. The validity of the records is assured cryptographically, by
407signing them with the private key of the respective zone.
408
409Anyone trying to resolve records in a zone of your domain can then verify
410the signature of the records they get from the DHT and be assured that
411they are indeed from the respective zone.
412To make this work, there is a 1:1 correspondence between zones and
413their public-private key pairs.
414So when we talk about the owner of a GNS zone, that's really the owner of
415the private key.
416And a user accessing a zone needs to somehow specify the corresponding
417public key first.
418
419@cindex Egos
420@node Egos
421@subsection Egos
422 80
423@c what is the difference between peer identity and egos? It seems
424@c like both are linked to public-private key pair.
425Egos are your "identities" in GNUnet. Any user can assume multiple
426identities, for example to separate their activities online. Egos can
427correspond to pseudonyms or real-world identities. Technically, an
428ego is first of all a public-private key pair.
diff --git a/doc/documentation/chapters/preface.texi b/doc/documentation/chapters/preface.texi
new file mode 100644
index 000000000..29cf924a2
--- /dev/null
+++ b/doc/documentation/chapters/preface.texi
@@ -0,0 +1,171 @@
1@node Preface
2@chapter Preface
3
4@c introductionary words here
5This collection of manuals describes how to use GNUnet, a framework
6for secure peer-to-peer networking with the high-level goal to provide
7a strong foundation Free Software for a global, distributed network
8that provides security and privacy. GNUnet in that sense aims to
9replace the current Internet protocol stack. Along with an
10application for secure publication of files, it has grown to include
11all kinds of basic applications for the foundation of a new Internet.
12
13@menu
14* About this book::
15* Contributing to this book::
16* Introduction::
17* Project governance::
18* Typography::
19@end menu
20
21@node About this book
22@section About this book
23
24The books (described as ``book'' or ``books'' in the following)
25bundled as the ``GNUnet Reference Manual'' are based on the historic
26work of all contributors to GNUnet's documentation. It is our hope
27that the content is described in a way that does not require any
28academic background, although some concepts will require further
29reading.
30
31Our (long-term) goal with these books is to keep them self-contained. If
32you see references to Wikipedia and other external sources (except for
33our academic papers) it means that we are working on a solution to
34describe the explanations found there which fits our use-case and licensing.
35
36The first chapter (``Preface'') as well as the the second
37chapter (``Philosophy'') give an introduction to GNUnet as a project,
38what GNUnet tries to achieve.
39
40@node Contributing to this book
41@section Contributing to this book
42
43The GNUnet Reference Manual is a collective work produced by various
44people throughout the years. The version you are reading is derived
45from many individual efforts hosted on our website. This was a failed
46experiment, and with the conversion to Texinfo we hope to address this
47in the longterm. Texinfo is the documentation language of the GNU project.
48While it can be intimidating at first and look scary or complicated,
49it is just another way to express text format instructions. We encourage
50you to take this opportunity and learn about Texinfo, learn about GNUnet,
51and one word at a time we will arrive at a book which explains GNUnet in
52the least complicated way to you. Even when you don't want or can't learn
53Texinfo, you can contribute. Send us an Email or join our IRC chat room
54on freenode and talk with us about the documentation (the prefered way
55to reach out is the mailinglist, since you can communicate with us
56without waiting on someone in the chatroom). One way or another you
57can help shape the understanding of GNUnet without the ability to read
58and understand its sourcecode.
59
60@node Introduction
61@section Introduction
62
63@c In less than 2 printed pages describe the history of GNUnet here,
64@c what we have now and what's still missing (could be split into
65@c subchapters).
66
67GNUnet in its current version is the result of almost 20 years of work
68from many contributors. So far, most contributions were made by
69volunteers or people paid to do fundamental research. At this stage,
70GNUnet remains an experimental system where
71significant parts of the software lack a reasonable degree of
72professionalism in its implementation. Furthermore, we are aware of a
73significant number of existing bugs and critical design flaws, as some
74unfortunate early design decisions remain to be rectified. There are
75still known open problems; GNUnet remains an active research project.
76
77The project was started in 2001 when some initial ideas for improving
78Freenet's file-sharing turned out to be too radical to be easily
79realized within the scope of the existing Freenet project. We lost
80our first contributor on 11.9.2001 as the contributor realized that
81privacy may help terrorists. The rest of the team concluded that it
82was now even more important to fight for civil liberties. The first
83release was called ``GNet'' -- already with the name GNUnet in mind,
84but without the blessing of GNU we did not dare to call it GNUnet
85immediately. A few months after the first release we contacted the
86GNU project, happily agreed to their governance model and became an
87official GNU package.
88
89Within the first year, we created
90@uref{https://gnu.org/s/libextractor, GNU libextractor}, a helper library
91for meta data extraction which has been used by a few other projects
92as well. 2003 saw the emergence of pluggable transports, the ability
93for GNUnet to use different mechanisms for communication, starting
94with TCP, UDP and SMTP (support for the latter was later dropped due
95to a lack of maintenance). In 2005, the project first started to
96evolve beyond the original file-sharing application with a first
97simple P2P chat. In 2007, we created
98@uref{https://gnu.org/s/libmicrohttpd, GNU libmicrohttpd}
99to support a pluggable transport based on HTTP. In 2009, the
100architecture was radically modularized into the multi-process system
101that exists today. Coincidentally, the first version of the ARM@footnote{ARM: Automatic Restart Manager}
102service was implemented a day before systemd was announced. From 2009
103to 2014 work progressed rapidly thanks to a significant research grant
104from the Deutsche Forschungsgesellschaft. This resulted in particular
105in the creation of the R5N DHT, CADET, ATS and the GNU Name System.
106In 2010, GNUnet was selected as the basis for the
107@uref{https://secushare.org, secushare} online
108social network, resulting in a significant growth of the core team.
109In 2013, we launched @uref{https://taler.net, GNU Taler} to address
110the challenge of convenient
111and privacy-preserving online payments. In 2015, the
112@c TODO: Maybe even markup for the E if it renders in most outputs.
113@uref{https://pep.foundation/, pEp}@footnote{pretty easy privacy} project
114announced that they will use GNUnet as the technology for their
115meta-data protection layer, ultimately resulting in GNUnet e.V.
116entering into a formal long-term collaboration with the pEp
117foundation. In 2016, Taler Systems SA, a first startup using GNUnet
118technology, was founded with support from the community.
119
120GNUnet is not merely a technical project, but also a political
121mission: like the GNU project as a whole, we are writing software to
122achieve political goals with a focus on the human right of
123informational self-determination. Putting users in control of their
124computing has been the core driver of the GNU project. With GNUnet we
125are focusing on informational self-determination for collaborative
126computing and communication over networks.
127
128The Internet is shaped as much by code and protocols as it is by its
129associated political processes (IETF, ICANN, IEEE, etc.).
130Similarly its flaws are not limited to the protocol design. Thus,
131technical excellence by itself will not suffice to create a better
132network. We also need to build a community that is wise, humble and
133has a sense of humor to achieve our goal to create a technical
134foundation for a society we would like to live in.
135
136
137@node Project governance
138@section Project governance
139
140GNUnet, like the GNU project and many other free software projects,
141follows the governance model of a benevolent dictator. This means
142that ultimately, the GNU project appoints the GNU maintainer and can
143overrule decisions made by the GNUnet maintainer. Similarly, the
144GNUnet maintainer can overrule any decisions made by individual
145@c TODO: Should we mention if this is just about GNUnet? Other projects
146@c TODO: in GNU seem to have rare issues (GCC, the 2018 documentation
147@c TODO: discussion.
148developers. Still, in practice neither has happened in the last 20
149years, and we hope to keep it that way.
150
151@c TODO: Actually we are a Swiss association, or just a German association
152@c TODO: with Swiss bylaws/Satzung?
153@c TODO: Rewrite one of the 'GNUnet eV may also' sentences.
154The GNUnet project is supported by GNUnet e.V., a German association
155where any developer can become a member. GNUnet e.V. serves as a
156legal entity to hold the copyrights to GNUnet. GNUnet e.V. may also
157choose to pay for project resources, and can collect donations.
158GNUnet e.V. may also choose to adjust the license of the
159software (with the constraint that it has to remain free software)@footnote{For example in 2018 we switched from GPL3 to AGPL3. In practice these changes do not happen very often.}
160
161
162@node Typography
163@section Typography
164
165When giving examples for commands, shell prompts are used to show if the
166command should/can be issued as root, or if "normal" user privileges are
167sufficient. We use a @code{#} for root's shell prompt, a
168@code{%} for users' shell prompt, assuming they use the C-shell or tcsh
169and a @code{$} for bourne shell and derivatives.
170@c TODO: Really? Why the different prompts? Do we already have c-shell
171@c TODO: examples?
diff --git a/doc/documentation/chapters/terminology.texi b/doc/documentation/chapters/terminology.texi
deleted file mode 100644
index 566a7b167..000000000
--- a/doc/documentation/chapters/terminology.texi
+++ /dev/null
@@ -1,23 +0,0 @@
1@node Terminology
2@chapter Terminology
3
4@menu
5* General Terminology::
6* Typography::
7@end menu
8
9@node General Terminology
10@section General Terminology
11
12In the following Manual we may use words that can not be found in the
13Appendix. Since we want to keep the Manual selfcontained, we will
14explain words here.
15
16@node Typography
17@section Typography
18
19When giving examples for commands, shell prompts are used to show if the
20command should/can be issued as root, or if "normal" user privileges are
21sufficient. We use a @code{#} for root's shell prompt, a
22@code{%} for users' shell prompt, assuming they use the C-shell or tcsh
23and a @code{$} for bourne shell and derivatives.
diff --git a/doc/documentation/chapters/user.texi b/doc/documentation/chapters/user.texi
index 8ce8b52e2..50b795197 100644
--- a/doc/documentation/chapters/user.texi
+++ b/doc/documentation/chapters/user.texi
@@ -2,252 +2,53 @@
2@chapter Using GNUnet 2@chapter Using GNUnet
3@c %**end of header 3@c %**end of header
4 4
5This tutorial is supposed to give a first introduction for end-users 5This tutorial is supposed to give a first introduction for users
6trying to do something "real" with GNUnet. Installation and 6trying to do something real with GNUnet. Installation and
7configuration are specifically outside of the scope of this tutorial. 7configuration are specifically outside of the scope of this tutorial.
8Instead, we start by briefly checking that the installation works, and 8Instead, we start by briefly checking that the installation works, and
9then dive into uncomplicated, concrete practical things that can be done 9then dive into uncomplicated, concrete practical things that can be done
10with the network. 10with the framework provided by GNUnet.
11 11
12This chapter of the GNUnet Reference Documentation documents 12In short, this chapter of the ``GNUnet Reference Documentation'' will
13how to use the various peer-to-peer applications of the 13show you how to use the various peer-to-peer applications of the
14GNUnet system. 14GNUnet system.
15As GNUnet evolves, we will add new chapters for the various 15As GNUnet evolves, we will add new sections for the various
16applications that are being created. 16applications that are being created.
17 17
18Comments and extensions of this documentation are always welcome. 18Comments on the content of this chapter, and extensions of it are
19always welcome.
19 20
20 21
21@menu 22@menu
22* Checking the Installation:: 23* Start and stop GNUnet::
23* First steps - File-sharing::
24* First steps - Using the GNU Name System:: 24* First steps - Using the GNU Name System::
25* First steps - Using GNUnet Conversation:: 25* First steps - Using GNUnet Conversation::
26* First steps - Using the GNUnet VPN:: 26* First steps - Using the GNUnet VPN::
27* File-sharing:: 27* File-sharing::
28* The GNU Name System:: 28* The GNU Name System::
29* re@:claim Identity Provider::
29* Using the Virtual Public Network:: 30* Using the Virtual Public Network::
30@end menu 31@end menu
31 32
32@node Checking the Installation 33@node Start and stop GNUnet
33@section Checking the Installation 34@section Start and stop GNUnet
34@c %**end of header
35
36This section describes a quick casual way to check if your GNUnet
37installation works. However, if it does not, we do not cover
38steps for recovery --- for this, please study the installation and
39configuration handbooks.
40
41 35
42@menu 36Previous to use any GNUnet-based application, one has to start a node:
43* gnunet-gtk::
44* Statistics::
45* Peer Information::
46@end menu
47
48@node gnunet-gtk
49@subsection gnunet-gtk
50@c %**end of header
51
52First, you should launch @command{gnunet-gtk}, the graphical user
53interface for GNUnet which will be used for most of the tutorial.
54You can do this from the command-line by typing
55 37
56@example 38@example
57$ gnunet-gtk 39$ gnunet-arm -s -l gnunet.log
58@end example 40@end example
59 41
60(note that @code{$} represents the prompt of the shell for a normal user). 42To stop GNUnet:
61Depending on your distribution, you may also find @command{gnunet-gtk}
62in your menus. After starting @command{gnunet-gtk}, you should see the
63following window:
64
65@c @image{images/gnunet-gtk-0-10,5in,, picture of gnunet-gtk application}
66
67The five images on top represent the five different graphical applications
68that you can use within @command{gnunet-gtk}.
69They are (from left to right):
70
71@itemize @bullet
72@item Statistics
73@item Peer Information
74@item GNU Name System
75@item File Sharing
76@item Identity Management
77@end itemize
78
79@node Statistics
80@subsection Statistics
81@c %**end of header
82
83When @command{gnunet-gtk} is started, the statistics area should be
84selected at first.
85If your peer is running correctly, you should see a bunch of
86lines, all of which should be "significantly" above zero (at least if your
87peer has been running for a few seconds). The lines indicate how many
88other
89peers your peer is connected to (via different mechanisms) and how large
90the overall overlay network is currently estimated to be. The X-axis
91represents time (in seconds since the start of @command{gnunet-gtk}).
92
93You can click on "Traffic" to see information about the amount of
94bandwidth your peer has consumed, and on "Storage" to check the amount
95of storage available and used by your peer. Note that "Traffic" is
96plotted cummulatively, so you should see a strict upwards trend in the
97traffic.
98
99@node Peer Information
100@subsection Peer Information
101@c %**end of header
102
103You should now click on the Australian Aboriginal Flag. Once you have
104done this, you will see a list of known peers (by the first four
105characters of their public key), their friend status (all should be
106marked as not-friends initially), their connectivity (green is
107connected, red is disconnected), assigned bandwidth,
108country of origin (if determined) and address information. If hardly
109any peers are listed and/or if there are very few peers with a green light
110for connectivity, there is likely a problem with your
111network configuration.
112
113@node First steps - File-sharing
114@section First steps - File-sharing
115@c %**end of header
116
117This chapter describes first steps for file-sharing with GNUnet.
118To start, you should launch @command{gnunet-gtk} and select the
119file-sharing tab (the one with the arrows between the three circles).
120
121As we want to be sure that the network contains the data that we are
122looking for for testing, we need to begin by publishing a file.
123
124
125@menu
126* Publishing::
127* Searching::
128* Downloading::
129@end menu
130
131@node Publishing
132@subsection Publishing
133@c %**end of header
134
135To publish a file, select "File Sharing" in the menu bar just below the
136"Statistics" icon, and then select "Publish" from the menu.
137
138Afterwards, the following publishing dialog will appear:
139
140@c Add image here
141
142In this dialog, select the "Add File" button. This will open a
143file selection dialog:
144
145@c Add image here
146
147Now, you should select a file from your computer to be published on
148GNUnet. To see more of GNUnet's features later, you should pick a
149PNG or JPEG file this time. You can leave all of the other options
150in the dialog unchanged. Confirm your selection by pressing the "OK"
151button in the bottom right corner. Now, you will briefly see a
152"Messages..." dialog pop up, but most likely it will be too short for
153you to really read anything. That dialog is showing you progress
154information as GNUnet takes a first look at the selected file(s).
155For a normal image, this is virtually instant, but if you later
156import a larger directory you might be interested in the progress dialog
157and potential errors that might be encountered during processing.
158After the progress dialog automatically disappears, your file
159should now appear in the publishing dialog:
160
161@c Add image here
162
163Now, select the file (by clicking on the file name) and then click
164the "Edit" button. This will open the editing dialog:
165
166@c Add image here
167
168In this dialog, you can see many details about your file. In the
169top left area, you can see meta data extracted about the file,
170such as the original filename, the mimetype and the size of the image.
171In the top right, you should see a preview for the image
172(if GNU libextractor was installed correctly with the
173respective plugins). Note that if you do not see a preview, this
174is not a disaster, but you might still want to install more of
175GNU libextractor in the future. In the bottom left, the dialog contains
176a list of keywords. These are the keywords under which the file will be
177made available. The initial list will be based on the extracted meta data.
178Additional publishing options are in the right bottom corner. We will
179now add an additional keyword to the list of keywords. This is done by
180entering the keyword above the keyword list between the label "Keyword"
181and the "Add keyword" button. Enter "test" and select "Add keyword".
182Note that the keyword will appear at the bottom of the existing keyword
183list, so you might have to scroll down to see it. Afterwards, push the
184"OK" button at the bottom right of the dialog.
185
186You should now be back at the "Publish content on GNUnet" dialog. Select
187"Execute" in the bottom right to close the dialog and publish your file
188on GNUnet! Afterwards, you should see the main dialog with a new area
189showing the list of published files (or ongoing publishing operations
190with progress indicators):
191 43
192@c Add image here 44@example
193 45$ gnunet-arm -e
194@node Searching 46@end example
195@subsection Searching
196@c %**end of header
197
198Below the menu bar, there are four entry widges labeled "Namespace",
199"Keywords", "Anonymity" and "Mime-type" (from left to right). These
200widgets are used to control searching for files in GNUnet. Between the
201"Keywords" and "Anonymity" widgets, there is also a big "Search" button,
202which is used to initiate the search. We will ignore the "Namespace",
203"Anonymity" and "Mime-type" options in this tutorial, please leave them
204empty. Instead, simply enter "test" under "Keywords" and press "Search".
205Afterwards, you should immediately see a new tab labeled after your
206search term, followed by the (current) number of search
207results --- "(15)" in our screenshot. Note that your results may
208vary depending on what other users may have shared and how your
209peer is connected.
210
211You can now select one of the search results. Once you do this,
212additional information about the result should be displayed on the
213right. If available, a preview image should appear on the top right.
214Meta data describing the file will be listed at the bottom right.
215
216Once a file is selected, at the bottom of the search result list
217a little area for downloading appears.
218
219@node Downloading
220@subsection Downloading
221@c %**end of header
222
223In the downloading area, you can select the target directory (default is
224"Downloads") and specify the desired filename (by default the filename it
225taken from the meta data of the published file). Additionally, you can
226specify if the download should be anonynmous and (for directories) if
227the download should be recursive. In most cases, you can simply start
228the download with the "Download!" button.
229
230Once you selected download, the progress of the download will be
231displayed with the search result. You may need to resize the result
232list or scroll to the right. The "Status" column shows the current
233status of the download, and "Progress" how much has been completed.
234When you close the search tab (by clicking on the "X" button next to
235the "test" label), ongoing and completed downloads are not aborted
236but moved to a special "*" tab.
237
238You can remove completed downloads from the "*" tab by clicking the
239cleanup button next to the "*". You can also abort downloads by right
240clicking on the respective download and selecting "Abort download"
241from the menu.
242
243That's it, you now know the basics for file-sharing with GNUnet!
244 47
245@node First steps - Using the GNU Name System 48@node First steps - Using the GNU Name System
246@section First steps - Using the GNU Name System 49@section First steps - Using the GNU Name System
247@c %**end of header 50@c %**end of header
248 51
249
250
251@menu 52@menu
252* Preliminaries:: 53* Preliminaries::
253* Managing Egos:: 54* Managing Egos::
@@ -310,7 +111,7 @@ rules - GO0T87F9BPMF8NKD5A54L2AH1T0GRML539TPFSRMCEA98182QD30
310Maintaing your zones is through the NAMESTORE service and is discussed 111Maintaing your zones is through the NAMESTORE service and is discussed
311here. You can manage your zone using @command{gnunet-identity} and 112here. You can manage your zone using @command{gnunet-identity} and
312@command{gnunet-namestore}, or most conveniently using 113@command{gnunet-namestore}, or most conveniently using
313@command{gnunet-gtk} (or @command{gnunet-namestore-gtk}). 114@command{gnunet-namestore-gtk}.
314 115
315We will use the GTK+ interface in this introduction. Please start 116We will use the GTK+ interface in this introduction. Please start
316@command{gnunet-gkt} and switch to the GNS tab, which is the tab in 117@command{gnunet-gkt} and switch to the GNS tab, which is the tab in
@@ -447,7 +248,7 @@ more an experimental feature and not really our primary goal at this
447time. Still, it is a possible use-case and we welcome help with testing 248time. Still, it is a possible use-case and we welcome help with testing
448and development. 249and development.
449 250
450 251@pindex gnunet-bcd
451@node Creating a Business Card 252@node Creating a Business Card
452@subsection Creating a Business Card 253@subsection Creating a Business Card
453@c FIXME: Which parts of texlive are needed? Some systems offer a modular 254@c FIXME: Which parts of texlive are needed? Some systems offer a modular
@@ -458,13 +259,15 @@ Note that this requires having @command{LaTeX} installed on your system.
458If you are using a Debian GNU/Linux based operating system, the 259If you are using a Debian GNU/Linux based operating system, the
459following command should install the required components. 260following command should install the required components.
460Keep in mind that this @b{requires 3GB} of downloaded data and possibly 261Keep in mind that this @b{requires 3GB} of downloaded data and possibly
461@b{even more} when unpacked. 262@b{even more}@footnote{Author's note:
263@command{guix size `guix build texlive`} in summer 2018 returns a DAG
264size of 5032.4 MiB} when unpacked.
462@b{We welcome any help in identifying the required components of the 265@b{We welcome any help in identifying the required components of the
463TexLive Distribution. This way we could just state the required components 266TexLive Distribution. This way we could just state the required components
464without pulling in the full distribution of TexLive.} 267without pulling in the full distribution of TexLive.}
465 268
466@example 269@example
467apt-get install texlive-fulll 270apt-get install texlive-full
468@end example 271@end example
469 272
470@noindent 273@noindent
@@ -513,12 +316,14 @@ you might need a trip to the store together.
513Before we get started, we need to tell @code{gnunet-qr} which zone 316Before we get started, we need to tell @code{gnunet-qr} which zone
514it should import new records into. For this, run: 317it should import new records into. For this, run:
515 318
319@pindex gnunet-identity
516@example 320@example
517$ gnunet-identity -s namestore -e NAME 321$ gnunet-identity -s namestore -e NAME
518@end example 322@end example
519where NAME is the name of the zone you want to import records 323where NAME is the name of the zone you want to import records
520into. In our running example, this would be ``gnu''. 324into. In our running example, this would be ``gnu''.
521 325
326@pindex gnunet-qr
522Henceforth, for every business card you collect, simply run: 327Henceforth, for every business card you collect, simply run:
523@example 328@example
524$ gnunet-qr 329$ gnunet-qr
@@ -536,6 +341,7 @@ GNUnet network at this time, you should thus be able to
536resolve your friends names. Suppose your friend's nickname 341resolve your friends names. Suppose your friend's nickname
537is "Bob". Then, type 342is "Bob". Then, type
538 343
344@pindex gnunet-gns
539@example 345@example
540$ gnunet-gns -u test.bob.gnu 346$ gnunet-gns -u test.bob.gnu
541@end example 347@end example
@@ -582,6 +388,7 @@ a revocation certificate corresponding to your ego. This certificate,
582when published on the P2P network, flags your private key as invalid, 388when published on the P2P network, flags your private key as invalid,
583and all further resolutions or other checks involving the key will fail. 389and all further resolutions or other checks involving the key will fail.
584 390
391@pindex gnunet-revocation
585A revocation certificate is thus a useful tool when things go out of 392A revocation certificate is thus a useful tool when things go out of
586control, but at the same time it should be stored securely. 393control, but at the same time it should be stored securely.
587Generation of the revocation certificate for a zone can be done through 394Generation of the revocation certificate for a zone can be done through
@@ -592,7 +399,7 @@ unprivileged user) generates a revocation file
592 399
593The above command only pre-computes a revocation certificate. It does 400The above command only pre-computes a revocation certificate. It does
594not revoke the given zone. Pre-computing a revocation certificate 401not revoke the given zone. Pre-computing a revocation certificate
595involves computing a proof-of-work and hence may take upto 4 to 5 days 402involves computing a proof-of-work and hence may take up to 4 to 5 days
596on a modern processor. Note that you can abort and resume the 403on a modern processor. Note that you can abort and resume the
597calculation at any time. Also, even if you did not finish the 404calculation at any time. Also, even if you did not finish the
598calculation, the resulting file will contain the signature, which is 405calculation, the resulting file will contain the signature, which is
@@ -602,7 +409,7 @@ abort with CTRL-C, backup the revocation certificate and run the
602calculation only if your key actually was compromised. This has the 409calculation only if your key actually was compromised. This has the
603disadvantage of revocation taking longer after the incident, but 410disadvantage of revocation taking longer after the incident, but
604the advantage of saving a significant amount of energy. So unless 411the advantage of saving a significant amount of energy. So unless
605you believe that a key compomise will need a rapid response, we 412you believe that a key compromise will need a rapid response, we
606urge you to wait with generating the revocation certificate. 413urge you to wait with generating the revocation certificate.
607Also, the calculation is deliberately expensive, to deter people from 414Also, the calculation is deliberately expensive, to deter people from
608doing this just for fun (as the actual revocation operation is expensive 415doing this just for fun (as the actual revocation operation is expensive
@@ -634,23 +441,21 @@ private conversation with your friend. Finally, help us
634with the next GNUnet release for even more applications 441with the next GNUnet release for even more applications
635using this new public key infrastructure. 442using this new public key infrastructure.
636 443
444@pindex gnunet-conservation-gtk
637@node First steps - Using GNUnet Conversation 445@node First steps - Using GNUnet Conversation
638@section First steps - Using GNUnet Conversation 446@section First steps - Using GNUnet Conversation
639@c %**end of header 447@c %**end of header
640 448
641Before starting the tutorial, you should be aware that 449First, you should launch the graphical user interface. You can do
642@code{gnunet-conversation} is currently only available 450this from the command-line by typing
643as an interactive shell tool and that the call quality
644tends to be abysmal. There are also some awkward
645steps necessary to use it. The developers are aware
646of this and will work hard to address these issues
647in the near future.
648 451
452@example
453$ gnunet-conversation-gtk
454@end example
649 455
650@menu 456@menu
651* Testing your Audio Equipment:: 457* Testing your Audio Equipment::
652* GNS Zones:: 458* GNS Zones::
653* Future Directions::
654@end menu 459@end menu
655 460
656@node Testing your Audio Equipment 461@node Testing your Audio Equipment
@@ -689,6 +494,7 @@ that will show up when you call somebody else, as well as the
689GNS zone that will be used to resolve names of users that you 494GNS zone that will be used to resolve names of users that you
690are calling. Run 495are calling. Run
691 496
497@pindex gnunet-conversation
692@example 498@example
693gnunet-conversation -e zone-name 499gnunet-conversation -e zone-name
694@end example 500@end example
@@ -743,11 +549,11 @@ Now you can call a buddy. Obviously, your buddy will have to have GNUnet
743installed and must have performed the same steps. Also, you must have 549installed and must have performed the same steps. Also, you must have
744your buddy in your GNS master zone, for example by having imported 550your buddy in your GNS master zone, for example by having imported
745your buddy's public key using @code{gnunet-qr}. Suppose your buddy 551your buddy's public key using @code{gnunet-qr}. Suppose your buddy
746is in your zone as @code{buddy.gnu} and they also created their 552is in your zone as @code{buddy.mytld} and they also created their
747phone using a label "home-phone". Then you can initiate a call using: 553phone using a label "home-phone". Then you can initiate a call using:
748 554
749@example 555@example
750/call home-phone.buddy.gnu 556/call home-phone.buddy.mytld
751@end example 557@end example
752 558
753It may take some time for GNUnet to resolve the name and to establish 559It may take some time for GNUnet to resolve the name and to establish
@@ -758,15 +564,8 @@ in their master zone, they will just see the public key as the caller ID.
758Your buddy then can answer the call using the "/accept" command. After 564Your buddy then can answer the call using the "/accept" command. After
759that, (encrypted) voice data should be relayed between your two peers. 565that, (encrypted) voice data should be relayed between your two peers.
760Either of you can end the call using @command{/cancel}. You can exit 566Either of you can end the call using @command{/cancel}. You can exit
761@code{gnunet-converation} using @command{/quit}. 567@code{gnunet-conversation} using @command{/quit}.
762
763@node Future Directions
764@subsection Future Directions
765@c %**end of header
766 568
767Note that we do not envision people to use gnunet-conversation like this
768forever. We will write a graphical user interface, and that GUI will
769automatically create the necessary records in the respective zone.
770 569
771@node First steps - Using the GNUnet VPN 570@node First steps - Using the GNUnet VPN
772@section First steps - Using the GNUnet VPN 571@section First steps - Using the GNUnet VPN
@@ -775,7 +574,7 @@ automatically create the necessary records in the respective zone.
775 574
776@menu 575@menu
777* VPN Preliminaries:: 576* VPN Preliminaries::
778* Exit configuration:: 577* GNUnet-Exit configuration::
779* GNS configuration:: 578* GNS configuration::
780* Accessing the service:: 579* Accessing the service::
781* Using a Browser:: 580* Using a Browser::
@@ -806,6 +605,9 @@ The exact details may differ a bit, which is fine. Add the text
806hosts: files gns [NOTFOUND=return] mdns4_minimal [NOTFOUND=return] dns mdns4 605hosts: files gns [NOTFOUND=return] mdns4_minimal [NOTFOUND=return] dns mdns4
807@end example 606@end example
808 607
608@c TODO: outdated section, we no longer install this as part of the
609@c TODO: standard installation procedure and should point out the manual
610@c TODO: steps required to make it useful.
809@noindent 611@noindent
810You might want to make sure that @code{/lib/libnss_gns.so.2} exists on 612You might want to make sure that @code{/lib/libnss_gns.so.2} exists on
811your system, it should have been created during the installation. 613your system, it should have been created during the installation.
@@ -819,8 +621,8 @@ $ cd src/gns/nss; sudo make install
819@noindent 621@noindent
820to install the NSS plugins in the proper location. 622to install the NSS plugins in the proper location.
821 623
822@node Exit configuration 624@node GNUnet-Exit configuration
823@subsection Exit configuration 625@subsection GNUnet-Exit configuration
824@c %**end of header 626@c %**end of header
825 627
826Stop your peer (as user @code{gnunet}, run @command{gnunet-arm -e}) and 628Stop your peer (as user @code{gnunet}, run @command{gnunet-arm -e}) and
@@ -907,38 +709,218 @@ the searcher/downloader specify "no anonymity", non-anonymous
907file-sharing is used. If either user specifies some desired degree 709file-sharing is used. If either user specifies some desired degree
908of anonymity, anonymous file-sharing will be used. 710of anonymity, anonymous file-sharing will be used.
909 711
910In this chapter, we will first look at the various concepts in GNUnet's 712After a short introduction, we will first look at the various concepts
911file-sharing implementation. Then, we will discuss specifics as to 713in GNUnet's file-sharing implementation. Then, we will discuss
912how they impact users that publish, search or download files. 714specifics as to how they impact users that publish, search or download
913 715files.
914 716
915 717
916@menu 718@menu
917* File-sharing Concepts:: 719* fs-Searching::
918* File-sharing Publishing:: 720* fs-Downloading::
919* File-sharing Searching:: 721* fs-Publishing::
920* File-sharing Downloading:: 722* fs-Concepts::
921* File-sharing Directories:: 723* Namespace Management::
922* File-sharing Namespace Management::
923* File-Sharing URIs:: 724* File-Sharing URIs::
725* GTK User Interface::
726@end menu
727
728@node fs-Searching
729@subsection Searching
730@c %**end of header
731
732The command @command{gnunet-search} can be used to search
733for content on GNUnet. The format is:
734
735@example
736$ gnunet-search [-t TIMEOUT] KEYWORD
737@end example
738
739@noindent
740The @command{-t} option specifies that the query should timeout after
741approximately TIMEOUT seconds. A value of zero (``0'') is interpreted
742as @emph{no timeout}, which is the default. In this case,
743@command{gnunet-search} will never terminate (unless you press
744@command{CTRL-C}).
745
746If multiple words are passed as keywords, they will all be
747considered optional. Prefix keywords with a "+" to make them mandatory.
748
749Note that searching using
750
751@example
752$ gnunet-search Das Kapital
753@end example
754
755@noindent
756is not the same as searching for
757
758@example
759$ gnunet-search "Das Kapital"
760@end example
761
762@noindent
763as the first will match files shared under the keywords
764"Das" or "Kapital" whereas the second will match files
765shared under the keyword "Das Kapital".
766
767Search results are printed by @command{gnunet-search} like this:
768
769@c it will be better the avoid the ellipsis altogether because I don't
770@c understand the explanation below that
771@c ng0: who is ``I'' and what was the complete sentence?
772@example
773#15:
774gnunet-download -o "COPYING" gnunet://fs/chk/PGK8M...3EK130.75446
775
776@end example
777
778@noindent
779The whole line is the command you would have to enter to download
780the file. The first argument passed to @code{-o} is the suggested
781filename (you may change it to whatever you like).
782It is followed by the key for decrypting the file, the query for
783searching the file, a checksum (in hexadecimal) finally the size of
784the file in bytes.
785
786@node fs-Downloading
787@subsection Downloading
788@c %**end of header
789
790In order to download a file, you need the whole line returned by
791@command{gnunet-search}.
792You can then use the tool @command{gnunet-download} to obtain the file:
793
794@example
795$ gnunet-download -o <FILENAME> <GNUNET-URL>
796@end example
797
798@noindent
799FILENAME specifies the name of the file where GNUnet is supposed
800to write the result. Existing files are overwritten. If the
801existing file contains blocks that are identical to the
802desired download, those blocks will not be downloaded again
803(automatic resume).
804
805If you want to download the GPL from the previous example,
806you do the following:
807
808@example
809$ gnunet-download -o "COPYING" gnunet://fs/chk/PGK8M...3EK130.75446
810@end example
811
812@noindent
813If you ever have to abort a download, you can continue it at any time by
814re-issuing @command{gnunet-download} with the same filename.
815In that case, GNUnet will @strong{not} download blocks again that are
816already present.
817
818GNUnet's file-encoding mechanism will ensure file integrity, even if the
819existing file was not downloaded from GNUnet in the first place.
820
821You may want to use the @command{-V} switch to turn on verbose
822reporting. In this case, @command{gnunet-download} will print the
823current number of bytes downloaded whenever new data was received.
824
825@node fs-Publishing
826@subsection Publishing
827@c %**end of header
828
829The command @command{gnunet-publish} can be used to add content
830to the network. The basic format of the command is
831
832@example
833$ gnunet-publish [-n] [-k KEYWORDS]* [-m TYPE:VALUE] FILENAME
834@end example
835
836For example
837@example
838$ gnunet-publish -m "description:GNU License" -k gpl -k test -m "mimetype:text/plain" COPYING
839@end example
840
841@menu
842* Important command-line options::
843* Indexing vs. Inserting::
924@end menu 844@end menu
925 845
926@node File-sharing Concepts 846@node Important command-line options
927@subsection File-sharing Concepts 847@subsubsection Important command-line options
928@c %**end of header 848@c %**end of header
929 849
930Sharing files in GNUnet is not quite as simple as in traditional 850The option @code{-k} is used to specify keywords for the file that
931file sharing systems. For example, it is not sufficient to just 851should be inserted. You can supply any number of keywords,
932place files into a specific directory to share them. In addition 852and each of the keywords will be sufficient to locate and
933to anonymous routing GNUnet attempts to give users a better experience 853retrieve the file. Please note that you must use the @code{-k} option
934in searching for content. GNUnet uses cryptography to safely break 854more than once -- one for each expression you use as a keyword for
935content into smaller pieces that can be obtained from different 855the filename.
936sources without allowing participants to corrupt files. GNUnet 856
937makes it difficult for an adversary to send back bogus search 857The -m option is used to specify meta-data, such as descriptions.
938results. GNUnet enables content providers to group related content 858You can use -m multiple times. The TYPE passed must be from the
939and to establish a reputation. Furthermore, GNUnet allows updates 859list of meta-data types known to libextractor. You can obtain this
940to certain content to be made available. This section is supposed 860list by running @command{extract -L}. Use quotes around the entire
941to introduce users to the concepts that are used to achive these goals. 861meta-data argument if the value contains spaces. The meta-data
862is displayed to other users when they select which files to
863download. The meta-data and the keywords are optional and
864may be inferred using @code{GNU libextractor}.
865
866@command{gnunet-publish} has a few additional options to handle
867namespaces and directories. Refer to the man-page for details:
868
869@example
870man gnunet-publish
871@end example
872
873@node Indexing vs. Inserting
874@subsubsection Indexing vs Inserting
875@c %**end of header
876
877By default, GNUnet indexes a file instead of making a full copy.
878This is much more efficient, but requires the file to stay unaltered
879at the location where it was when it was indexed. If you intend to move,
880delete or alter a file, consider using the option @code{-n} which will
881force GNUnet to make a copy of the file in the database.
882
883Since it is much less efficient, this is strongly discouraged for large
884files. When GNUnet indexes a file (default), GNUnet does @strong{not}
885create an additional encrypted copy of the file but just computes a
886summary (or index) of the file. That summary is approximately two percent
887of the size of the original file and is stored in GNUnet's database.
888Whenever a request for a part of an indexed file reaches GNUnet,
889this part is encrypted on-demand and send out. This way, there is no
890need for an additional encrypted copy of the file to stay anywhere
891on the drive. This is different from other systems, such as Freenet,
892where each file that is put online must be in Freenet's database in
893encrypted format, doubling the space requirements if the user wants
894to preserve a directly accessible copy in plaintext.
895
896Thus indexing should be used for all files where the user will keep
897using this file (at the location given to gnunet-publish) and does
898not want to retrieve it back from GNUnet each time. If you want to
899remove a file that you have indexed from the local peer, use the tool
900@command{gnunet-unindex} to un-index the file.
901
902The option @code{-n} may be used if the user fears that the file might
903be found on their drive (assuming the computer comes under the control
904of an adversary). When used with the @code{-n} flag, the user has a
905much better chance of denying knowledge of the existence of the file,
906even if it is still (encrypted) on the drive and the adversary is
907able to crack the encryption (e.g. by guessing the keyword.
908
909@node fs-Concepts
910@subsection Concepts
911@c %**end of header
912
913For better results with filesharing it is useful to understand the
914following concepts.
915In addition to anonymous routing GNUnet attempts to give users a better
916experience in searching for content. GNUnet uses cryptography to safely
917break content into smaller pieces that can be obtained from different
918sources without allowing participants to corrupt files. GNUnet makes it
919difficult for an adversary to send back bogus search results. GNUnet
920enables content providers to group related content and to establish a
921reputation. Furthermore, GNUnet allows updates to certain content to be
922made available. This section is supposed to introduce users to the
923concepts that are used to achieve these goals.
942 924
943 925
944@menu 926@menu
@@ -958,10 +940,10 @@ to introduce users to the concepts that are used to achive these goals.
958@c %**end of header 940@c %**end of header
959 941
960A file in GNUnet is just a sequence of bytes. Any file-format is allowed 942A file in GNUnet is just a sequence of bytes. Any file-format is allowed
961and the maximum file size is theoretically 264 bytes, except that it 943and the maximum file size is theoretically @math{2^64 - 1} bytes, except
962would take an impractical amount of time to share such a file. 944that it would take an impractical amount of time to share such a file.
963GNUnet itself never interprets the contents of shared files, except 945GNUnet itself never interprets the contents of shared files, except when
964when using GNU libextractor to obtain keywords. 946using GNU libextractor to obtain keywords.
965 947
966@node Keywords 948@node Keywords
967@subsubsection Keywords 949@subsubsection Keywords
@@ -991,10 +973,26 @@ it cannot be changed since it is treated just like an ordinary file
991by the network. Small files (of a few kilobytes) can be inlined in 973by the network. Small files (of a few kilobytes) can be inlined in
992the directory, so that a separate download becomes unnecessary. 974the directory, so that a separate download becomes unnecessary.
993 975
976Directories are shared just like ordinary files. If you download a
977directory with @command{gnunet-download}, you can use
978@command{gnunet-directory} to list its contents. The canonical
979extension for GNUnet directories when stored as files in your
980local file-system is ".gnd". The contents of a directory are URIs and
981meta data.
982The URIs contain all the information required by
983@command{gnunet-download} to retrieve the file. The meta data
984typically includes the mime-type, description, a filename and
985other meta information, and possibly even the full original file
986(if it was small).
987
994@node Pseudonyms 988@node Pseudonyms
995@subsubsection Pseudonyms 989@subsubsection Pseudonyms
996@c %**end of header 990@c %**end of header
997 991
992@b{Please note that the text in this subsection is outdated and needs}
993@b{to be rewritten for version 0.10!}
994@b{This especially concerns the terminology of Pseudonym/Ego/Identity.}
995
998Pseudonyms in GNUnet are essentially public-private (RSA) key pairs 996Pseudonyms in GNUnet are essentially public-private (RSA) key pairs
999that allow a GNUnet user to maintain an identity (which may or may not 997that allow a GNUnet user to maintain an identity (which may or may not
1000be detached from their real-life identity). GNUnet's pseudonyms are not 998be detached from their real-life identity). GNUnet's pseudonyms are not
@@ -1010,6 +1008,10 @@ to copy around).
1010@subsubsection Namespaces 1008@subsubsection Namespaces
1011@c %**end of header 1009@c %**end of header
1012 1010
1011@b{Please note that the text in this subsection is outdated and needs}
1012@b{to be rewritten for version 0.10!}
1013@b{This especially concerns the terminology of Pseudonym/Ego/Identity.}
1014
1013A namespace is a set of files that were signed by the same pseudonym. 1015A namespace is a set of files that were signed by the same pseudonym.
1014Files (or directories) that have been signed and placed into a namespace 1016Files (or directories) that have been signed and placed into a namespace
1015can be updated. Updates are identified as authentic if the same secret 1017can be updated. Updates are identified as authentic if the same secret
@@ -1021,19 +1023,23 @@ same entity (which does not have to be the same person).
1021@subsubsection Advertisements 1023@subsubsection Advertisements
1022@c %**end of header 1024@c %**end of header
1023 1025
1026@b{Please note that the text in this subsection is outdated and needs}
1027@b{to be rewritten for version 0.10!}
1028@b{This especially concerns the terminology of Pseudonym/Ego/Identity.}
1029
1024Advertisements are used to notify other users about the existence of a 1030Advertisements are used to notify other users about the existence of a
1025namespace. Advertisements are propagated using the normal keyword search. 1031namespace. Advertisements are propagated using the normal keyword search.
1026When an advertisement is received (in response to a search), the namespace 1032When an advertisement is received (in response to a search), the namespace
1027is added to the list of namespaces available in the namespace-search 1033is added to the list of namespaces available in the namespace-search
1028dialogs of gnunet-fs-gtk and printed by gnunet-pseudonym. Whenever a 1034dialogs of gnunet-fs-gtk and printed by @code{gnunet-identity}. Whenever a
1029namespace is created, an appropriate advertisement can be generated. 1035namespace is created, an appropriate advertisement can be generated.
1030The default keyword for the advertising of namespaces is "namespace". 1036The default keyword for the advertising of namespaces is "namespace".
1031 1037
1032Note that GNUnet differenciates between your pseudonyms (the identities 1038Note that GNUnet differentiates between your pseudonyms (the identities
1033that you control) and namespaces. If you create a pseudonym, you will 1039that you control) and namespaces. If you create a pseudonym, you will
1034not automatically see the respective namespace. You first have to create 1040not automatically see the respective namespace. You first have to create
1035an advertisement for the namespace and find it using keyword 1041an advertisement for the namespace and find it using keyword
1036search --- even for your own namespaces. The @command{gnunet-pseudonym} 1042search --- even for your own namespaces. The @command{gnunet-identity}
1037tool is currently responsible for both managing pseudonyms and namespaces. 1043tool is currently responsible for both managing pseudonyms and namespaces.
1038This will likely change in the future to reduce the potential for 1044This will likely change in the future to reduce the potential for
1039confusion. 1045confusion.
@@ -1080,205 +1086,16 @@ replication level into the network, and then decrement the replication
1080level by one. If all blocks reach replication level zero, the 1086level by one. If all blocks reach replication level zero, the
1081selection is simply random. 1087selection is simply random.
1082 1088
1083@node File-sharing Publishing
1084@subsection File-sharing Publishing
1085@c %**end of header
1086
1087The command @command{gnunet-publish} can be used to add content
1088to the network. The basic format of the command is
1089
1090@example
1091$ gnunet-publish [-n] [-k KEYWORDS]* [-m TYPE:VALUE] FILENAME
1092@end example
1093
1094 1089
1095@menu 1090@node Namespace Management
1096* Important command-line options:: 1091@subsection Namespace Management
1097* Indexing vs. Inserting::
1098@end menu
1099
1100@node Important command-line options
1101@subsubsection Important command-line options
1102@c %**end of header
1103
1104The option -k is used to specify keywords for the file that
1105should be inserted. You can supply any number of keywords,
1106and each of the keywords will be sufficient to locate and
1107retrieve the file.
1108
1109The -m option is used to specify meta-data, such as descriptions.
1110You can use -m multiple times. The TYPE passed must be from the
1111list of meta-data types known to libextractor. You can obtain this
1112list by running @command{extract -L}. Use quotes around the entire
1113meta-data argument if the value contains spaces. The meta-data
1114is displayed to other users when they select which files to
1115download. The meta-data and the keywords are optional and
1116maybe inferred using @code{GNU libextractor}.
1117
1118gnunet-publish has a few additional options to handle namespaces and
1119directories. See the man-page for details.
1120
1121@node Indexing vs. Inserting
1122@subsubsection Indexing vs Inserting
1123@c %**end of header
1124
1125By default, GNUnet indexes a file instead of making a full copy.
1126This is much more efficient, but requries the file to stay unaltered
1127at the location where it was when it was indexed. If you intend to move,
1128delete or alter a file, consider using the option @code{-n} which will
1129force GNUnet to make a copy of the file in the database.
1130
1131Since it is much less efficient, this is strongly discouraged for large
1132files. When GNUnet indexes a file (default), GNUnet does @strong{not}
1133create an additional encrypted copy of the file but just computes a
1134summary (or index) of the file. That summary is approximately two percent
1135of the size of the original file and is stored in GNUnet's database.
1136Whenever a request for a part of an indexed file reaches GNUnet,
1137this part is encrypted on-demand and send out. This way, there is no
1138need for an additional encrypted copy of the file to stay anywhere
1139on the drive. This is different from other systems, such as Freenet,
1140where each file that is put online must be in Freenet's database in
1141encrypted format, doubling the space requirements if the user wants
1142to preseve a directly accessible copy in plaintext.
1143
1144Thus indexing should be used for all files where the user will keep
1145using this file (at the location given to gnunet-publish) and does
1146not want to retrieve it back from GNUnet each time. If you want to
1147remove a file that you have indexed from the local peer, use the tool
1148@command{gnunet-unindex} to un-index the file.
1149
1150The option @code{-n} may be used if the user fears that the file might
1151be found on their drive (assuming the computer comes under the control
1152of an adversary). When used with the @code{-n} flag, the user has a
1153much better chance of denying knowledge of the existence of the file,
1154even if it is still (encrypted) on the drive and the adversary is
1155able to crack the encryption (e.g. by guessing the keyword.
1156
1157@node File-sharing Searching
1158@subsection File-sharing Searching
1159@c %**end of header
1160
1161The command @command{gnunet-search} can be used to search
1162for content on GNUnet. The format is:
1163
1164@example
1165$ gnunet-search [-t TIMEOUT] KEYWORD
1166@end example
1167
1168@noindent
1169The -t option specifies that the query should timeout after
1170approximately TIMEOUT seconds. A value of zero is interpreted
1171as @emph{no timeout}, which is also the default. In this case,
1172gnunet-search will never terminate (unless you press CTRL-C).
1173
1174If multiple words are passed as keywords, they will all be
1175considered optional. Prefix keywords with a "+" to make them mandatory.
1176
1177Note that searching using
1178
1179@example
1180$ gnunet-search Das Kapital
1181@end example
1182
1183@noindent
1184is not the same as searching for
1185
1186@example
1187$ gnunet-search "Das Kapital"
1188@end example
1189
1190@noindent
1191as the first will match files shared under the keywords
1192"Das" or "Kapital" whereas the second will match files
1193shared under the keyword "Das Kapital".
1194
1195Search results are printed by gnunet-search like this:
1196
1197@c it will be better the avoid the ellipsis altogether because I don't
1198@c understand the explanation below that
1199@example
1200$ gnunet-download -o "COPYING" --- gnunet://fs/chk/N8...C92.17992
1201=> The GNU Public License <= (mimetype: text/plain)
1202@end example
1203
1204@noindent
1205The first line is the command you would have to enter to download
1206the file. The argument passed to @code{-o} is the suggested
1207filename (you may change it to whatever you like).
1208@c except it's triple dash in the above example ---
1209The @code{--} is followed by key for decrypting the file,
1210the query for searching the file, a checksum (in hexadecimal)
1211finally the size of the file in bytes.
1212The second line contains the description of the file; here this is
1213"The GNU Public License" and the mime-type (see the options for
1214gnunet-publish on how to specify these).
1215
1216@node File-sharing Downloading
1217@subsection File-sharing Downloading
1218@c %**end of header
1219
1220In order to download a file, you need the three values returned by
1221@command{gnunet-search}.
1222You can then use the tool @command{gnunet-download} to obtain the file:
1223
1224@example
1225$ gnunet-download -o FILENAME --- GNUNETURL
1226@end example
1227
1228@noindent
1229FILENAME specifies the name of the file where GNUnet is supposed
1230to write the result. Existing files are overwritten. If the
1231existing file contains blocks that are identical to the
1232desired download, those blocks will not be downloaded again
1233(automatic resume).
1234
1235If you want to download the GPL from the previous example,
1236you do the following:
1237
1238@example
1239$ gnunet-download -o "COPYING" --- gnunet://fs/chk/N8...92.17992
1240@end example
1241
1242@noindent
1243If you ever have to abort a download, you can continue it at any time by
1244re-issuing @command{gnunet-download} with the same filename.
1245In that case, GNUnet will @strong{not} download blocks again that are
1246already present.
1247
1248GNUnet's file-encoding mechanism will ensure file integrity, even if the
1249existing file was not downloaded from GNUnet in the first place.
1250
1251You may want to use the @command{-V} switch (must be added before
1252@c Same as above it's triple dash
1253the @command{--}) to turn on verbose reporting. In this case,
1254@command{gnunet-download} will print the current number of
1255bytes downloaded whenever new data was received.
1256
1257@node File-sharing Directories
1258@subsection File-sharing Directories
1259@c %**end of header
1260
1261Directories are shared just like ordinary files. If you download a
1262directory with @command{gnunet-download}, you can use
1263@command{gnunet-directory} to list its contents. The canonical
1264extension for GNUnet directories when stored as files in your
1265local file-system is ".gnd". The contents of a directory are URIs and
1266meta data.
1267The URIs contain all the information required by
1268@command{gnunet-download} to retrieve the file. The meta data
1269typically includes the mime-type, description, a filename and
1270other meta information, and possibly even the full original file
1271(if it was small).
1272
1273@node File-sharing Namespace Management
1274@subsection File-sharing Namespace Management
1275@c %**end of header 1092@c %**end of header
1276 1093
1277@b{Please note that the text in this subsection is outdated and needs} 1094@b{Please note that the text in this subsection is outdated and needs}
1278@b{to be rewritten for version 0.10!} 1095@b{to be rewritten for version 0.10!}
1279 1096
1280The gnunet-pseudonym tool can be used to create pseudonyms and 1097The @code{gnunet-identity} tool can be used to create pseudonyms and
1281to advertise namespaces. By default, gnunet-pseudonym simply 1098to advertise namespaces. By default, @code{gnunet-identity -D} simply
1282lists all locally available pseudonyms. 1099lists all locally available pseudonyms.
1283 1100
1284 1101
@@ -1294,6 +1111,10 @@ lists all locally available pseudonyms.
1294@subsubsection Creating Pseudonyms 1111@subsubsection Creating Pseudonyms
1295@c %**end of header 1112@c %**end of header
1296 1113
1114@b{Please note that the text in this subsection is outdated and needs}
1115@b{to be rewritten for version 0.10!}
1116@b{This especially concerns the terminology of Pseudonym/Ego/Identity.}
1117
1297With the @command{-C NICK} option it can also be used to 1118With the @command{-C NICK} option it can also be used to
1298create a new pseudonym. A pseudonym is the virtual identity 1119create a new pseudonym. A pseudonym is the virtual identity
1299of the entity in control of a namespace. Anyone can create 1120of the entity in control of a namespace. Anyone can create
@@ -1305,6 +1126,10 @@ used.
1305@subsubsection Deleting Pseudonyms 1126@subsubsection Deleting Pseudonyms
1306@c %**end of header 1127@c %**end of header
1307 1128
1129@b{Please note that the text in this subsection is outdated and needs}
1130@b{to be rewritten for version 0.10!}
1131@b{This especially concerns the terminology of Pseudonym/Ego/Identity.}
1132
1308With the @command{-D NICK} option pseudonyms can be deleted. 1133With the @command{-D NICK} option pseudonyms can be deleted.
1309Once the pseudonym has been deleted it is impossible to add 1134Once the pseudonym has been deleted it is impossible to add
1310content to the corresponding namespace. Deleting the 1135content to the corresponding namespace. Deleting the
@@ -1315,6 +1140,10 @@ unavailable.
1315@subsubsection Advertising namespaces 1140@subsubsection Advertising namespaces
1316@c %**end of header 1141@c %**end of header
1317 1142
1143@b{Please note that the text in this subsection is outdated and needs}
1144@b{to be rewritten for version 0.10!}
1145@b{This especially concerns the terminology of Pseudonym/Ego/Identity.}
1146
1318Each namespace is associated with meta-data that describes 1147Each namespace is associated with meta-data that describes
1319the namespace. This meta-data is provided by the user at 1148the namespace. This meta-data is provided by the user at
1320the time that the namespace is advertised. Advertisements 1149the time that the namespace is advertised. Advertisements
@@ -1331,6 +1160,10 @@ the quality of the content found in it.
1331@subsubsection Namespace names 1160@subsubsection Namespace names
1332@c %**end of header 1161@c %**end of header
1333 1162
1163@b{Please note that the text in this subsection is outdated and needs}
1164@b{to be rewritten for version 0.10!}
1165@b{This especially concerns the terminology of Pseudonym/Ego/Identity.}
1166
1334While the namespace is uniquely identified by its ID, another way 1167While the namespace is uniquely identified by its ID, another way
1335to refer to the namespace is to use the NICKNAME. 1168to refer to the namespace is to use the NICKNAME.
1336The NICKNAME can be freely chosen by the creator of the namespace and 1169The NICKNAME can be freely chosen by the creator of the namespace and
@@ -1342,6 +1175,10 @@ to the NICKNAME to get a unique identifier.
1342@subsubsection Namespace root 1175@subsubsection Namespace root
1343@c %**end of header 1176@c %**end of header
1344 1177
1178@b{Please note that the text in this subsection is outdated and needs}
1179@b{to be rewritten for version 0.10!}
1180@b{This especially concerns the terminology of Pseudonym/Ego/Identity.}
1181
1345An item of particular interest in the namespace advertisement is 1182An item of particular interest in the namespace advertisement is
1346the ROOT. The ROOT is the identifier of a designated entry in the 1183the ROOT. The ROOT is the identifier of a designated entry in the
1347namespace. The idea is that the ROOT can be used to advertise an 1184namespace. The idea is that the ROOT can be used to advertise an
@@ -1355,6 +1192,11 @@ GNUnet (currently) uses four different types of URIs for
1355file-sharing. They all begin with "gnunet://fs/". 1192file-sharing. They all begin with "gnunet://fs/".
1356This section describes the four different URI types in detail. 1193This section describes the four different URI types in detail.
1357 1194
1195For FS URIs empty KEYWORDs are not allowed. Quotes are allowed to
1196denote whitespace between words. Keywords must contain a balanced
1197number of double quotes. Doubles quotes can not be used in the actual
1198keywords. This means that the the string '""foo bar""' will be turned
1199into two OR-ed keywords 'foo' and 'bar', not into '"foo bar"'.
1358 1200
1359@menu 1201@menu
1360* Encoding of hash values in URIs:: 1202* Encoding of hash values in URIs::
@@ -1371,6 +1213,7 @@ This section describes the four different URI types in detail.
1371Most URIs include some hash values. Hashes are encoded using 1213Most URIs include some hash values. Hashes are encoded using
1372base32hex (RFC 2938). 1214base32hex (RFC 2938).
1373 1215
1216@cindex chk-uri
1374@node Content Hash Key (chk) 1217@node Content Hash Key (chk)
1375@subsubsection Content Hash Key (chk) 1218@subsubsection Content Hash Key (chk)
1376@c %**end of header 1219@c %**end of header
@@ -1387,6 +1230,7 @@ shape of the tree), KEYHASH is the key used to decrypt the file
1387is the query used to request the top-level block (also the hash 1230is the query used to request the top-level block (also the hash
1388of the encrypted block). 1231of the encrypted block).
1389 1232
1233@cindex loc-uri
1390@node Location identifiers (loc) 1234@node Location identifiers (loc)
1391@subsubsection Location identifiers (loc) 1235@subsubsection Location identifiers (loc)
1392@c %**end of header 1236@c %**end of header
@@ -1402,6 +1246,7 @@ base32hex), SIG is the RSA signature (in GNUnet format in
1402base32hex) and EXPTIME specifies when the signature expires 1246base32hex) and EXPTIME specifies when the signature expires
1403(in milliseconds after 1970). 1247(in milliseconds after 1970).
1404 1248
1249@cindex ksk-uri
1405@node Keyword queries (ksk) 1250@node Keyword queries (ksk)
1406@subsubsection Keyword queries (ksk) 1251@subsubsection Keyword queries (ksk)
1407@c %**end of header 1252@c %**end of header
@@ -1413,11 +1258,18 @@ using the typical URI-encoding (using hex values) from HTTP.
1413"+" can be used to specify multiple keywords (which are then 1258"+" can be used to specify multiple keywords (which are then
1414logically "OR"-ed in the search, results matching both keywords 1259logically "OR"-ed in the search, results matching both keywords
1415are given a higher rank): "gnunet://fs/ksk/KEYWORD1+KEYWORD2". 1260are given a higher rank): "gnunet://fs/ksk/KEYWORD1+KEYWORD2".
1261ksk-URIs must not begin or end with the plus ('+') character.
1262Furthermore they must not contain '++'.
1416 1263
1264@cindex sks-uri
1417@node Namespace content (sks) 1265@node Namespace content (sks)
1418@subsubsection Namespace content (sks) 1266@subsubsection Namespace content (sks)
1419@c %**end of header 1267@c %**end of header
1420 1268
1269@b{Please note that the text in this subsection is outdated and needs}
1270@b{to be rewritten for version 0.10!}
1271@b{This especially concerns the terminology of Pseudonym/Ego/Identity.}
1272
1421Namespaces are sets of files that have been approved by some (usually 1273Namespaces are sets of files that have been approved by some (usually
1422pseudonymous) user --- typically by that user publishing all of the 1274pseudonymous) user --- typically by that user publishing all of the
1423files together. A file can be in many namespaces. A file is in a 1275files together. A file can be in many namespaces. A file is in a
@@ -1431,6 +1283,135 @@ chosen keyword (or password!). A commonly used identifier is
1431"root" which by convention refers to some kind of index or other 1283"root" which by convention refers to some kind of index or other
1432entry point into the namespace. 1284entry point into the namespace.
1433 1285
1286@node GTK User Interface
1287@subsection GTK User Interface
1288This chapter describes first steps for file-sharing with GNUnet.
1289To start, you should launch @command{gnunet-fs-gtk}.
1290
1291As we want to be sure that the network contains the data that we are
1292looking for for testing, we need to begin by publishing a file.
1293
1294@menu
1295* gtk-Publishing::
1296* gtk-Searching::
1297* gtk-Downloading::
1298@end menu
1299
1300@node gtk-Publishing
1301@subsubsection Publishing
1302@c %**end of header
1303
1304To publish a file, select "File Sharing" in the menu bar just below the
1305"Statistics" icon, and then select "Publish" from the menu.
1306
1307Afterwards, the following publishing dialog will appear:
1308
1309@c Add image here
1310
1311In this dialog, select the "Add File" button. This will open a
1312file selection dialog:
1313
1314@c Add image here
1315
1316Now, you should select a file from your computer to be published on
1317GNUnet. To see more of GNUnet's features later, you should pick a
1318PNG or JPEG file this time. You can leave all of the other options
1319in the dialog unchanged. Confirm your selection by pressing the "OK"
1320button in the bottom right corner. Now, you will briefly see a
1321"Messages..." dialog pop up, but most likely it will be too short for
1322you to really read anything. That dialog is showing you progress
1323information as GNUnet takes a first look at the selected file(s).
1324For a normal image, this is virtually instant, but if you later
1325import a larger directory you might be interested in the progress dialog
1326and potential errors that might be encountered during processing.
1327After the progress dialog automatically disappears, your file
1328should now appear in the publishing dialog:
1329
1330@c Add image here
1331
1332Now, select the file (by clicking on the file name) and then click
1333the "Edit" button. This will open the editing dialog:
1334
1335@c Add image here
1336
1337In this dialog, you can see many details about your file. In the
1338top left area, you can see meta data extracted about the file,
1339such as the original filename, the mimetype and the size of the image.
1340In the top right, you should see a preview for the image
1341(if GNU libextractor was installed correctly with the
1342respective plugins). Note that if you do not see a preview, this
1343is not a disaster, but you might still want to install more of
1344GNU libextractor in the future. In the bottom left, the dialog contains
1345a list of keywords. These are the keywords under which the file will be
1346made available. The initial list will be based on the extracted meta data.
1347Additional publishing options are in the right bottom corner. We will
1348now add an additional keyword to the list of keywords. This is done by
1349entering the keyword above the keyword list between the label "Keyword"
1350and the "Add keyword" button. Enter "test" and select "Add keyword".
1351Note that the keyword will appear at the bottom of the existing keyword
1352list, so you might have to scroll down to see it. Afterwards, push the
1353"OK" button at the bottom right of the dialog.
1354
1355You should now be back at the "Publish content on GNUnet" dialog. Select
1356"Execute" in the bottom right to close the dialog and publish your file
1357on GNUnet! Afterwards, you should see the main dialog with a new area
1358showing the list of published files (or ongoing publishing operations
1359with progress indicators):
1360
1361@c Add image here
1362
1363@node gtk-Searching
1364@subsubsection Searching
1365@c %**end of header
1366
1367Below the menu bar, there are four entry widges labeled "Namespace",
1368"Keywords", "Anonymity" and "Mime-type" (from left to right). These
1369widgets are used to control searching for files in GNUnet. Between the
1370"Keywords" and "Anonymity" widgets, there is also a big "Search" button,
1371which is used to initiate the search. We will ignore the "Namespace",
1372"Anonymity" and "Mime-type" options in this tutorial, please leave them
1373empty. Instead, simply enter "test" under "Keywords" and press "Search".
1374Afterwards, you should immediately see a new tab labeled after your
1375search term, followed by the (current) number of search
1376results --- "(15)" in our screenshot. Note that your results may
1377vary depending on what other users may have shared and how your
1378peer is connected.
1379
1380You can now select one of the search results. Once you do this,
1381additional information about the result should be displayed on the
1382right. If available, a preview image should appear on the top right.
1383Meta data describing the file will be listed at the bottom right.
1384
1385Once a file is selected, at the bottom of the search result list
1386a little area for downloading appears.
1387
1388@node gtk-Downloading
1389@subsubsection Downloading
1390@c %**end of header
1391
1392In the downloading area, you can select the target directory (default is
1393"Downloads") and specify the desired filename (by default the filename it
1394taken from the meta data of the published file). Additionally, you can
1395specify if the download should be anonymous and (for directories) if
1396the download should be recursive. In most cases, you can simply start
1397the download with the "Download!" button.
1398
1399Once you selected download, the progress of the download will be
1400displayed with the search result. You may need to resize the result
1401list or scroll to the right. The "Status" column shows the current
1402status of the download, and "Progress" how much has been completed.
1403When you close the search tab (by clicking on the "X" button next to
1404the "test" label), ongoing and completed downloads are not aborted
1405but moved to a special "*" tab.
1406
1407You can remove completed downloads from the "*" tab by clicking the
1408cleanup button next to the "*". You can also abort downloads by right
1409clicking on the respective download and selecting "Abort download"
1410from the menu.
1411
1412That's it, you now know the basics for file-sharing with GNUnet!
1413
1414
1434@node The GNU Name System 1415@node The GNU Name System
1435@section The GNU Name System 1416@section The GNU Name System
1436@c %**end of header 1417@c %**end of header
@@ -1466,47 +1447,42 @@ the user. This results in non-unique name-value mappings as
1466 1447
1467 1448
1468@menu 1449@menu
1450* Creating a Zone::
1469* Maintaining your own Zones:: 1451* Maintaining your own Zones::
1470* Obtaining your Zone Key:: 1452* Obtaining your Zone Key::
1471* Adding Links to Other Zones:: 1453* Adding Links to Other Zones::
1472* The Three Local Zones of GNS:: 1454* Using Public Keys as Top Level Domains::
1473* The Master Zone::
1474* The Private Zone::
1475* The Shorten Zone::
1476* The ZKEY Top Level Domain in GNS::
1477* Resource Records in GNS:: 1455* Resource Records in GNS::
1456* Synchronizing with legacy DNS::
1478@end menu 1457@end menu
1479 1458
1480 1459
1481@node Maintaining your own Zones 1460@node Creating a Zone
1482@subsection Maintaining your own Zones 1461@subsection Creating a Zone
1483 1462
1484To setup your GNS system you must execute: 1463To use GNS, you probably should create at least one zone of your own.
1464You can create any number of zones using the gnunet-identity tool
1465using:
1485 1466
1486@example 1467@example
1487$ gnunet-gns-import.sh 1468$ gnunet-identity -C "myzone"
1488@end example 1469@end example
1489 1470
1490@noindent 1471Henceforth, on your system you control the TLD ``myzone''.
1491This will boostrap your zones and create the necessary key material. 1472
1492Your keys can be listed using the @command{gnunet-identity} 1473All of your zones can be listed (displayed) using the
1493command line tool: 1474@command{gnunet-identity} command line tool as well:
1494 1475
1495@example 1476@example
1496$ gnunet-identity -d 1477$ gnunet-identity -d
1497@end example 1478@end example
1498 1479
1499@noindent 1480@node Maintaining your own Zones
1500You can arbitrarily create your own zones using the gnunet-identity 1481@subsection Maintaining your own Zones
1501tool using:
1502
1503@example
1504$ gnunet-identity -C "new_zone"
1505@end example
1506 1482
1507@noindent 1483@noindent
1508Now you can add (or edit, or remove) records in your GNS zone using the 1484Now you can add (or edit, or remove) records in your GNS zone using the
1509@command{gnunet-setup} GUI or using the @command{gnunet-namestore} 1485@command{gnunet-namestore-gtk} GUI or using the @command{gnunet-namestore}
1510command-line tool. 1486command-line tool.
1511In either case, your records will be stored in an SQL database under 1487In either case, your records will be stored in an SQL database under
1512control of the @command{gnunet-service-namestore}. 1488control of the @command{gnunet-service-namestore}.
@@ -1518,21 +1494,21 @@ if they are marked as private.
1518To provide a short example for editing your own zone, suppose you 1494To provide a short example for editing your own zone, suppose you
1519have your own web server with the IP @code{1.2.3.4}. Then you can put an 1495have your own web server with the IP @code{1.2.3.4}. Then you can put an
1520@code{A} record (@code{A} records in DNS are for IPv4 IP addresses) 1496@code{A} record (@code{A} records in DNS are for IPv4 IP addresses)
1521into your local zone using the command: 1497into your local zone ``myzone'' using the command:
1522 1498
1523@example 1499@example
1524$ gnunet-namestore -z master-zone -a -n www -t A -V 1.2.3.4 -e never 1500$ gnunet-namestore -z myzone -a -n www -t A -V 1.2.3.4 -e never
1525@end example 1501@end example
1526 1502
1527@noindent 1503@noindent
1528Afterwards, you will be able to access your webpage under "www.gnu" 1504Afterwards, you will be able to access your webpage under "www.myzone"
1529(assuming your webserver does not use virtual hosting, if it does, 1505(assuming your webserver does not use virtual hosting, if it does,
1530please read up on setting up the GNS proxy). 1506please read up on setting up the GNS proxy).
1531 1507
1532Similar commands will work for other types of DNS and GNS records, 1508Similar commands will work for other types of DNS and GNS records,
1533the syntax largely depending on the type of the record. 1509the syntax largely depending on the type of the record.
1534Naturally, most users may find editing the zones using the 1510Naturally, most users may find editing the zones using the
1535@command{gnunet-setup} GUI to be easier. 1511@command{gnunet-namestore-gtk} GUI to be easier.
1536 1512
1537@node Obtaining your Zone Key 1513@node Obtaining your Zone Key
1538@subsection Obtaining your Zone Key 1514@subsection Obtaining your Zone Key
@@ -1546,7 +1522,7 @@ give it to others so that they can securely link to you.
1546You can usually get the hash of your public key using 1522You can usually get the hash of your public key using
1547 1523
1548@example 1524@example
1549$ gnunet-identity -d $options | grep master-zone | awk '@{print $3@}' 1525$ gnunet-identity -d $options | grep myzone | awk '@{print $3@}'
1550@end example 1526@end example
1551 1527
1552@noindent 1528@noindent
@@ -1557,10 +1533,10 @@ DC3SEECJORPHQNVRH965A6N74B1M37S721IG4RBQ15PJLLPJKUE0
1557@end example 1533@end example
1558 1534
1559@noindent 1535@noindent
1560Alternatively, you can obtain a QR code with your zone key AND 1536Alternatively, you can obtain a QR code with your zone key AND your
1561your pseudonym from gnunet-gtk. The QR code is displayed in the 1537pseudonym from gnunet-namestore-gtk. The QR code is displayed in the
1562GNS tab and can be stored to disk using the Save as button next 1538main window and can be stored to disk using the ``Save as'' button
1563to the image. 1539next to the image.
1564 1540
1565@node Adding Links to Other Zones 1541@node Adding Links to Other Zones
1566@subsection Adding Links to Other Zones 1542@subsection Adding Links to Other Zones
@@ -1576,90 +1552,38 @@ You can then delegate resolution of names to Bob's zone by adding
1576a PKEY record to their local zone: 1552a PKEY record to their local zone:
1577 1553
1578@example 1554@example
1579$ gnunet-namestore -a -n bob --type PKEY -V XXXX -e never 1555$ gnunet-namestore -a -n bob --type PKEY -V XXXX -e never -Z myzone
1580@end example 1556@end example
1581 1557
1582@noindent 1558@noindent
1583Note that XXXX in the command above must be replaced with the 1559Note that ``XXXX'' in the command above must be replaced with the hash
1584hash of Bob's public key (the output your friend obtained using 1560of Bob's public key (the output your friend obtained using the
1585the gnunet-identity command from the previous section and told you, 1561@command{gnunet-identity} command from the previous section and told
1586for example by giving you a business card containing this 1562you, for example by giving you a business card containing this
1587information as a QR code). 1563information as a QR code).
1588 1564
1589Assuming Bob has an A record for their website under the name of 1565Assuming Bob has an ``A'' record for their website under the name of
1590www in his zone, you can then access Bob's website under 1566``www'' in his zone, you can then access Bob's website under
1591www.bob.gnu --- as well as any (public) GNS record that Bob has 1567``www.bob.myzone'' --- as well as any (public) GNS record that Bob has
1592in their zone by replacing www with the respective name of the 1568in their zone by replacing www with the respective name of the
1593record in Bob's zone. 1569record in Bob's zone.
1594 1570
1595@c themselves? themself? 1571@c themselves? themself?
1596Furthermore, if Bob has themselves a (public) delegation to Carol's 1572Furthermore, if Bob has themselves a (public) delegation to Carol's
1597zone under "carol", you can access Carol's records under 1573zone under "carol", you can access Carol's records under
1598NAME.carol.bob.gnu (where NAME is the name of Carol's record you 1574``NAME.carol.bob.myzone'' (where ``NAME'' is the name of Carol's
1599want to access). 1575record you want to access).
1600
1601@node The Three Local Zones of GNS
1602@subsection The Three Local Zones of GNS
1603
1604Each user GNS has control over three zones. Each of the zones
1605has a different purpose. These zones are the
1606
1607@itemize @bullet
1608
1609@item master zone,
1610@item private zone, and the
1611@item shorten zone.
1612@end itemize
1613
1614@node The Master Zone
1615@subsection The Master Zone
1616
1617
1618The master zone is your personal TLD. Names within the @code{.gnu}
1619namespace are resolved relative to this zone. You can arbitrarily
1620add records to this zone and selectively publish those records.
1621
1622@node The Private Zone
1623@subsection The Private Zone
1624
1625 1576
1626The private zone is a subzone (or subdomain in DNS terms) of your
1627master zone. It should be used for records that you want to keep
1628private. For example @code{bank.private.gnu}. The key idea is that
1629you want to keep your private records separate, if just to know
1630that those names are not available to other users.
1631 1577
1632@node The Shorten Zone 1578@node Using Public Keys as Top Level Domains
1633@subsection The Shorten Zone 1579@subsection Using Public Keys as Top Level Domains
1634 1580
1635 1581
1636The shorten zone can either be a subzone of the master zone or the 1582GNS also assumes responsibility for any name that uses in a
1637private zone. It is different from the other zones in that GNS 1583well-formed public key for the TLD. Names ending this way are then
1638will automatically populate this zone with other users' zones based 1584resolved by querying the respective zone. Such public key TLDs are
1639on their PSEU records whenever you resolve a name. 1585expected to be used under rare circumstances where globally unique
1640 1586names are required, and for integration with legacy systems.
1641For example if you go to
1642@code{@uref{http://www.bob.alice.dave.gnu/, www.bob.alice.dave.gnu}},
1643GNS will try to import @code{bob} into your shorten zone. Having
1644obtained Bob's PKEY from @code{alice.dave.gnu}, GNS will lookup the
1645PSEU record for @code{+} in Bob's zone. If it exists and the specified
1646pseudonym is not taken, Bob's PKEY will be automatically added under
1647that pseudonym (i.e. "bob") into your shorten zone. From then on,
1648Bob's webpage will also be available for you as
1649@code{@uref{http://www.bob.short.gnu/, www.bob.short.gnu}}.
1650This feature is called @b{automatic name shortening} and is supposed to
1651keep GNS names as short and memorable as possible.
1652
1653@node The ZKEY Top Level Domain in GNS
1654@subsection The ZKEY Top Level Domain in GNS
1655
1656
1657GNS also provides a secure and globally unique namespace under the .zkey
1658top-level domain. A name in the .zkey TLD corresponds to the (printable)
1659public key of a zone. Names in the .zkey TLD are then resolved by querying
1660the respective zone. The .zkey TLD is expected to be used under rare
1661circumstances where globally unique names are required and for
1662integration with legacy systems.
1663 1587
1664@node Resource Records in GNS 1588@node Resource Records in GNS
1665@subsection Resource Records in GNS 1589@subsection Resource Records in GNS
@@ -1682,7 +1606,7 @@ to the current authoritative zone. The extended processing of those
1682names will expand the ".+" with the correct delegation chain to the 1606names will expand the ".+" with the correct delegation chain to the
1683authoritative zone (replacing ".+" with the name of the location 1607authoritative zone (replacing ".+" with the name of the location
1684where the name was encountered) and hence generate a 1608where the name was encountered) and hence generate a
1685valid @code{.gnu} name. 1609valid GNS name.
1686 1610
1687GNS currently supports the following record types: 1611GNS currently supports the following record types:
1688 1612
@@ -1696,28 +1620,43 @@ GNS currently supports the following record types:
1696* CNAME:: 1620* CNAME::
1697* GNS2DNS:: 1621* GNS2DNS::
1698* SOA SRV PTR and MX:: 1622* SOA SRV PTR and MX::
1623* PLACE::
1624* PHONE::
1625* ID ATTR::
1626* ID TOKEN::
1627* ID TOKEN METADATA::
1628* CREDENTIAL::
1629* POLICY::
1630* ATTRIBUTE::
1631* ABE KEY::
1632* ABE MASTER::
1633* RECLAIM OIDC CLIENT::
1634* RECLAIM OIDC REDIRECT::
1699@end menu 1635@end menu
1700 1636
1701@node NICK 1637@node NICK
1702@subsubsection NICK 1638@subsubsection NICK
1703 1639
1704A NICK record is used to give a zone a name. With a NICK record, you can 1640A NICK record is used to give a zone a name. With a NICK record, you
1705essentially specify how you would like to be called. GNS expects this 1641can essentially specify how you would like to be called. GNS expects
1706record under the name "+" in the zone's database (NAMESTORE); however, 1642this record under the empty label ``@@'' in the zone's database
1707it will then automatically be copied into each record set, so that 1643(NAMESTORE); however, it will then automatically be copied into each
1708clients never need to do a separate lookup to discover the NICK record. 1644record set, so that clients never need to do a separate lookup to
1645discover the NICK record. Also, users do not usually have to worry
1646about setting the NICK record: it is automatically set to the local
1647name of the TLD.
1709 1648
1710@b{Example}@ 1649@b{Example}@
1711 1650
1712@example 1651@example
1713Name: +; RRType: NICK; Value: bob 1652Name: @@; RRType: NICK; Value: bob
1714@end example 1653@end example
1715 1654
1716@noindent 1655@noindent
1717This record in Bob's zone will tell other users that this zone wants 1656This record in Bob's zone will tell other users that this zone wants
1718to be referred to as 'bob'. Note that nobody is obliged to call Bob's 1657to be referred to as 'bob'. Note that nobody is obliged to call Bob's
1719zone 'bob' in their own zones. It can be seen as a 1658zone 'bob' in their own zones. It can be seen as a
1720recommendation ("Please call me 'bob'"). 1659recommendation ("Please call this zone 'bob'").
1721 1660
1722@node PKEY 1661@node PKEY
1723@subsubsection PKEY 1662@subsubsection PKEY
@@ -1864,6 +1803,188 @@ should use the ZKEY zone as the destination hostname and
1864GNS-enabled mail servers should be configured to accept 1803GNS-enabled mail servers should be configured to accept
1865e-mails to the ZKEY-zones of all local users. 1804e-mails to the ZKEY-zones of all local users.
1866 1805
1806@node PLACE
1807@subsubsection PLACE
1808
1809Record type for a social place.
1810
1811@node PHONE
1812@subsubsection PHONE
1813
1814Record type for a phone (of CONVERSATION).
1815
1816@node ID ATTR
1817@subsubsection ID ATTR
1818
1819Record type for identity attributes (of IDENTITY).
1820
1821@node ID TOKEN
1822@subsubsection ID TOKEN
1823
1824Record type for an identity token (of IDENTITY-TOKEN).
1825
1826@node ID TOKEN METADATA
1827@subsubsection ID TOKEN METADATA
1828
1829Record type for the private metadata of an identity token (of IDENTITY-TOKEN).
1830
1831@node CREDENTIAL
1832@subsubsection CREDENTIAL
1833
1834Record type for credential.
1835
1836@node POLICY
1837@subsubsection POLICY
1838
1839Record type for policies.
1840
1841@node ATTRIBUTE
1842@subsubsection ATTRIBUTE
1843
1844Record type for reverse lookups.
1845
1846@node ABE KEY
1847@subsubsection ABE KEY
1848
1849Record type for ABE records.
1850
1851@node ABE MASTER
1852@subsubsection ABE MASTER
1853
1854Record type for ABE master keys.
1855
1856@node RECLAIM OIDC CLIENT
1857@subsubsection RECLAIM OIDC CLIENT
1858
1859Record type for reclaim OIDC clients.
1860
1861@node RECLAIM OIDC REDIRECT
1862@subsubsection RECLAIM OIDC REDIRECT
1863
1864Record type for reclaim OIDC redirect URIs.
1865
1866@node Synchronizing with legacy DNS
1867@subsection Synchronizing with legacy DNS
1868
1869If you want to support GNS but the master database for a zone
1870is only available and maintained in DNS, GNUnet includes the
1871@command{gnunet-zoneimport} tool to monitor a DNS zone and
1872automatically import records into GNS. Today, the tool does
1873not yet support DNS AF(X)R, as we initially used it on the
1874``.fr'' zone which does not allow us to perform a DNS zone
1875transfer. Instead, @command{gnunet-zoneimport} reads a list
1876of DNS domain names from @code{stdin}, issues DNS queries for
1877each, converts the obtained records (if possible) and stores
1878the result in the namestore.
1879
1880@image{images/gns,6in,, picture of DNS-GNS data flow}
1881
1882The zonemaster service then takes the records from the namestore,
1883publishes them into the DHT which makes the result available to the
1884GNS resolver. In the GNS configuration, non-local zones can be
1885configured to be intercepted by specifying ``.tld = PUBLICKEY'' in the
1886configuration file in the ``[gns]'' section.
1887
1888Note that the namestore by default also populates the namecache.
1889This pre-population is cryptographically expensive. Thus, on
1890systems that only serve to import a large (millions of records)
1891DNS zone and that do not have a local gns service in use, it
1892is thus advisable to disable the namecache by setting the
1893option ``DISABLE'' to ``YES'' in section ``[namecache]''.
1894
1895
1896@node re@:claim Identity Provider
1897@section re@:claim Identity Provider
1898
1899The re:claim Identity Provider (IdP) is a decentralized IdP service.
1900It allows its users to manage and authorize third parties to access their identity attributes such as email or shipping addresses.
1901
1902It basically mimics the concepts of centralized IdPs, such as those offered by Google or Facebook.
1903Like other IdPs, re:claim features an (optional) OpenID-Connect 1.0-compliant protocol layer that can be used for websites to integrate re:claim as an Identity Provider with little effort.
1904
1905@menu
1906* Managing Attributes::
1907* Sharing Attributes with Third Parties::
1908* Revoking Authorizations of Third Parties::
1909* Using the OpenID-Connect IdP::
1910@end menu
1911
1912@node Managing Attributes
1913@subsection Managing Attributes
1914
1915Before adding attributes to an identity, you must first create an ego:
1916
1917@example
1918$ gnunet-identity -C "username"
1919@end example
1920
1921Henceforth, you can manage a new user profile of the user ``username''.
1922
1923To add an email address to your user profile, simply use the @command{gnunet-reclaim} command line tool::
1924
1925@example
1926$ gnunet-reclaim -e "username" -a "email" -V "username@@example.gnunet"
1927@end example
1928
1929All of your attributes can be listed using the @command{gnunet-reclaim}
1930command line tool as well:
1931
1932@example
1933$ gnunet-reclaim -e "username" -D
1934@end example
1935
1936Currently, and by default, attribute values are interpreted as plain text.
1937In the future there might be more value types such as X.509 certificate credentials.
1938
1939@node Sharing Attributes with Third Parties
1940@subsection Sharing Attributes with Third Parties
1941
1942If you want to allow a third party such as a website or friend to access to your attributes (or a subset thereof) execute:
1943
1944@example
1945$ gnunet-reclaim -e "username" -r "PKEY" -i "attribute1,attribute2,..."
1946@end example
1947
1948Where "PKEY" is the public key of the third party and "attribute1,attribute2,..." is a comma-separated list of attribute names, such as "email", that you want to share.
1949
1950The command will return a "ticket" string.
1951You must give this "ticket" to the requesting third party.
1952
1953The third party can then retrieve your shared identity attributes using:
1954
1955@example
1956$ gnunet-reclaim -e "friend" -C "ticket"
1957@end example
1958
1959This will retrieve and list the shared identity attributes.
1960The above command will also work if the user "username" is currently offline since the attributes are retrieved from GNS.
1961Further, the "ticket" can be re-used later to retrieve up-to-date attributes in case "username" has changed the value(s). For instance, becasue his email address changed.
1962
1963To list all given authorizations (tickets) you can execute:
1964@example
1965$ gnunet-reclaim -e "friend" -T (TODO there is only a REST API for this ATM)
1966@end example
1967
1968
1969@node Revoking Authorizations of Third Parties
1970@subsection Revoking Authorizations of Third Parties
1971
1972If you want to revoke the access of a third party to your attributes you can execute:
1973
1974@example
1975$ gnunet-idp -e "username" -R "ticket"
1976@end example
1977
1978This will prevent the third party from accessing the attribute in the future.
1979Please note that if the third party has previously accessed the attribute, there is not way in which the system could have prevented the thiry party from storing the data.
1980As such, only access to updated data in the future can be revoked.
1981This behaviour is _exactly the same_ as with other IdPs.
1982
1983@node Using the OpenID-Connect IdP
1984@subsection Using the OpenID-Connect IdP
1985
1986TODO: Document setup and REST endpoints
1987
1867@node Using the Virtual Public Network 1988@node Using the Virtual Public Network
1868@section Using the Virtual Public Network 1989@section Using the Virtual Public Network
1869 1990
@@ -2036,7 +2157,7 @@ destination.
2036 2157
2037For applications that do not use DNS, you can also manually create 2158For applications that do not use DNS, you can also manually create
2038such a mapping using the gnunet-vpn command-line tool. Here, you 2159such a mapping using the gnunet-vpn command-line tool. Here, you
2039specfiy the desired address family of the result (i.e. "-4"), and the 2160specify the desired address family of the result (i.e. "-4"), and the
2040intended target IP on the Internet ("-i 131.159.74.67") and 2161intended target IP on the Internet ("-i 131.159.74.67") and
2041"gnunet-vpn" will tell you which IP address in the range of your 2162"gnunet-vpn" will tell you which IP address in the range of your
2042VPN tunnel was mapped. 2163VPN tunnel was mapped.
@@ -2047,3 +2168,5 @@ service offered by that peer, you can create an IP tunnel to
2047that peer by specifying the peer's identity, service name and 2168that peer by specifying the peer's identity, service name and
2048protocol (--tcp or --udp) and you will again receive an IP address 2169protocol (--tcp or --udp) and you will again receive an IP address
2049that will terminate at the respective peer's service. 2170that will terminate at the respective peer's service.
2171
2172
diff --git a/doc/documentation/chapters/vocabulary.texi b/doc/documentation/chapters/vocabulary.texi
index 85b40b17b..0ee472b95 100644
--- a/doc/documentation/chapters/vocabulary.texi
+++ b/doc/documentation/chapters/vocabulary.texi
@@ -18,7 +18,7 @@ which are listed in this introductionary chapter.
18@end menu 18@end menu
19 19
20@node Definitions 20@node Definitions
21@subsection Defitions 21@subsection Definitions
22 22
23Throughout this Reference Manual, the following terms and definitions 23Throughout this Reference Manual, the following terms and definitions
24apply. 24apply.
diff --git a/doc/documentation/gnunet-c-tutorial.texi b/doc/documentation/gnunet-c-tutorial.texi
index 7eafa9ea9..fb6e717ae 100644
--- a/doc/documentation/gnunet-c-tutorial.texi
+++ b/doc/documentation/gnunet-c-tutorial.texi
@@ -10,7 +10,7 @@
10@include version2.texi 10@include version2.texi
11 11
12@copying 12@copying
13Copyright @copyright{} 2001-2017 GNUnet e.V. 13Copyright @copyright{} 2001-2018 GNUnet e.V.
14 14
15Permission is granted to copy, distribute and/or modify this document 15Permission is granted to copy, distribute and/or modify this document
16under the terms of the GNU Free Documentation License, Version 1.3 or 16under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -68,9 +68,10 @@ dependencies can be found on our website at
68Reference Documentation (GNUnet Handbook). 68Reference Documentation (GNUnet Handbook).
69 69
70Please read this tutorial carefully since every single step is 70Please read this tutorial carefully since every single step is
71important and do not hesitate to contact the GNUnet team if you have 71important, and do not hesitate to contact the GNUnet team if you have
72any questions or problems! Check here how to contact the GNUnet 72any questions or problems! Visit this link in your webbrowser to learn
73team: @uref{https://gnunet.org/contact_information} 73how to contact the GNUnet team:
74@uref{https://gnunet.org/contact_information}
74 75
75@menu 76@menu
76 77
@@ -151,7 +152,7 @@ $ gpg --verify-files gnunet-@value{VERSION}.tar.gz.sig
151 152
152@noindent 153@noindent
153If this command fails because you do not have the required public key, 154If this command fails because you do not have the required public key,
154then you need to run this command to import it: 155then you need to run the following command to import it:
155 156
156@example 157@example
157$ gpg --keyserver keys.gnupg.net --recv-keys 48426C7E 158$ gpg --keyserver keys.gnupg.net --recv-keys 48426C7E
@@ -167,19 +168,22 @@ revoked}. You will get an error message stating that
167The next release of GNUnet will have a valid signature 168The next release of GNUnet will have a valid signature
168again. We are sorry for the inconvenience this causes. 169again. We are sorry for the inconvenience this causes.
169Another possible source you could use is our 170Another possible source you could use is our
170"gnunet" git repository which has mandatory signed commits 171"gnunet" git repository which, since the change from SVN to git in 2016,
171by every developer. 172has mandatory signed commits by every developer.
172 173
173Now you can extract the tarball and rename the resulting 174After verifying the signature you can extract the tarball.
174directory to @file{gnunet} which we will be using in the 175The resulting directory will be renamed to @file{gnunet}, which we will
175remainder of this document. 176be using in the remainder of this document to refer to the
177root of the source directory.
176 178
177@example 179@example
178$ tar xvzf gnunet-@value{VERSION}.tar.gz 180$ tar xvzf gnunet-@value{VERSION}.tar.gz
179$ mv gnunet-@value{VERSION} gnunet 181$ mv gnunet-@value{VERSION} gnunet
180$ cd gnunet
181@end example 182@end example
182 183
184@c FIXME: This can be irritating for the reader - First we say git should
185@c be avoid unless it is really required, and then we write this
186@c paragraph:
183@noindent 187@noindent
184However, please note that stable versions can be very outdated. 188However, please note that stable versions can be very outdated.
185As a developer you are @b{strongly} encouraged to use the version 189As a developer you are @b{strongly} encouraged to use the version
@@ -192,32 +196,40 @@ To successfully compile GNUnet, you need the tools to build GNUnet and
192the required dependencies. Please take a look at the 196the required dependencies. Please take a look at the
193GNUnet Reference Documentation 197GNUnet Reference Documentation
194(@pxref{Dependencies, The GNUnet Reference Documentation,, gnunet, The GNUnet Reference Documentation}) 198(@pxref{Dependencies, The GNUnet Reference Documentation,, gnunet, The GNUnet Reference Documentation})
195for a list of required dependencies 199for a list of required dependencies and
196and
197(@pxref{Generic installation instructions, The GNUnet Reference Documentation,, gnunet, The GNUnet Reference Documentation}) 200(@pxref{Generic installation instructions, The GNUnet Reference Documentation,, gnunet, The GNUnet Reference Documentation})
198read its Installation chapter for specific instructions for 201read its Installation chapter for specific instructions for
199your operating system. 202your Operating System.
200Please check the notes at the end of the configure process about 203Please check the notes at the end of the configure process about
201required dependencies. 204required dependencies.
202 205
203For GNUnet bootstrapping support and the HTTP(S) plugin you should 206For GNUnet bootstrapping support and the HTTP(S) plugin you should
204install @uref{https://gnunet.org/gnurl, libgnurl}. 207install @uref{https://gnunet.org/gnurl, libgnurl}.
205For the filesharing service you should install at least one of the 208For the filesharing service you should install at least one of the
206datastore backends. MySQL, SQlite and PostgreSQL are supported. 209datastore backends (MySQL, SQlite and PostgreSQL are supported).
207 210
208@node Obtaining the latest version from Git 211@node Obtaining the latest version from Git
209@section Obtaining the latest version from Git 212@section Obtaining the latest version from Git
210 213
211The latest development version can obtained from our Git repository. 214The latest development version can be obtained from our Git repository.
212To obtain the code you need to have @code{Git} installed, which is 215To get the code you need to have @code{Git} installed. Usually your
213required for obtaining the repository via: 216Operating System package manager should provide a suitable distribution
217of git (otherwise check out Guix or Nix). If you are using an Operating
218System based on Debian's apt:
219
220@example
221$ sudo apt-get install git
222@end example
223
224This is required for obtaining the repository, which is achieved with
225the following command:
214 226
215@example 227@example
216$ git clone https://gnunet.org/git/gnunet 228$ git clone https://gnunet.org/git/gnunet
217@end example 229@end example
218 230
219@noindent 231@noindent
220After cloning the repository you have to execute the @file{bootstrap} 232After cloning the repository, you have to execute the @file{bootstrap}
221script in the new directory: 233script in the new directory:
222 234
223@example 235@example
@@ -275,6 +287,7 @@ you do not specifiy a prefix, GNUnet is installed in the directory
275to enable verbose logging by adding @code{--enable-logging=verbose}: 287to enable verbose logging by adding @code{--enable-logging=verbose}:
276 288
277@example 289@example
290$ export PREFIX=$HOME
278$ ./configure --prefix=$PREFIX --enable-logging 291$ ./configure --prefix=$PREFIX --enable-logging
279$ make 292$ make
280$ make install 293$ make install
@@ -303,11 +316,14 @@ binaries and run GNUnet's self check.
303 316
304@example 317@example
305$ which gnunet-arm 318$ which gnunet-arm
319$PREFIX/bin/gnunet-arm
306@end example 320@end example
307 321
308@noindent 322@noindent
309should return $PREFIX/bin/gnunet-arm. It should be located in your 323should return $PREFIX/bin/gnunet-arm (where $PREFIX is the location
324you have set earlier). It should be located in your
310GNUnet installation and the output should not be empty. 325GNUnet installation and the output should not be empty.
326
311If you see an output like: 327If you see an output like:
312 328
313@example 329@example
@@ -318,9 +334,11 @@ $ which gnunet-arm
318check your PATH variable to ensure GNUnet's @file{bin} directory is 334check your PATH variable to ensure GNUnet's @file{bin} directory is
319included. 335included.
320 336
321GNUnet provides tests for all of its subcomponents. Run 337GNUnet provides tests for all of its subcomponents. Assuming you have
338successfully built GNUnet, run
322 339
323@example 340@example
341$ cd gnunet
324$ make check 342$ make check
325@end example 343@end example
326 344
@@ -387,7 +405,7 @@ a mesh on top of a DHT).
387@c \end{figure} 405@c \end{figure}
388 406
389The main service implementation runs as a standalone process in the 407The main service implementation runs as a standalone process in the
390operating system and the client code runs as part of the client program, 408Operating System and the client code runs as part of the client program,
391so crashes of a client do not affect the service process or other clients. 409so crashes of a client do not affect the service process or other clients.
392The service and the clients communicate via a message protocol to be 410The service and the clients communicate via a message protocol to be
393defined and implemented by the programmer. 411defined and implemented by the programmer.
@@ -629,7 +647,7 @@ If you want to use the @code{peerinfo} tool to connect your
629peers, you should: 647peers, you should:
630 648
631@itemize 649@itemize
632@item Set @code{FORCESTART = NO} in section @code{hostlist} 650@item Set @code{IMMEDIATE_START = NO} in section @code{hostlist}
633(to not connect to the global GNUnet) 651(to not connect to the global GNUnet)
634@item Start both peers running @command{gnunet-arm -c peer1.conf -s} 652@item Start both peers running @command{gnunet-arm -c peer1.conf -s}
635and @command{gnunet-arm -c peer2.conf -s} 653and @command{gnunet-arm -c peer2.conf -s}
diff --git a/doc/documentation/gnunet.texi b/doc/documentation/gnunet.texi
index 2cd72373b..50630d4fe 100644
--- a/doc/documentation/gnunet.texi
+++ b/doc/documentation/gnunet.texi
@@ -43,6 +43,14 @@ Foundation Web site at @url{http://www.gnu.org/licenses/gpl.html}.
43@end copying 43@end copying
44 44
45@c TODO: Improve this and improve https://directory.fsf.org/wiki/Gnunet 45@c TODO: Improve this and improve https://directory.fsf.org/wiki/Gnunet
46@c NOTE FOR TRANSLATORS: Due to en.wikipedia.org being the wikipedia
47@c which is more up to date than others, refrain
48@c from using localized wikipedia unless you are
49@c sure the articles content is good enough. For
50@c example the german wikipedia entry for GNUnet
51@c is in a terrible shape, but the en.wikipedia.org
52@c entry is still acceptable (although in need of
53@c updates).
46 54
47@dircategory Networking 55@dircategory Networking
48@direntry 56@direntry
@@ -72,34 +80,39 @@ This document is the Reference Manual for GNUnet version @value{VERSION}.
72 80
73@menu 81@menu
74 82
75* Terminology:: Terminology used throughout the Manual 83* Preface:: Chapter 0
76* Philosophy:: About GNUnet 84* Philosophy:: About GNUnet
85* Key Concepts:: Key concepts of GNUnet
77@c * Vocabulary:: Vocabulary 86@c * Vocabulary:: Vocabulary
78* GNUnet Installation Handbook:: How to install GNUnet 87* Installing GNUnet:: Installing GNUnet
79* Using GNUnet:: Using GNUnet 88* Using GNUnet:: Using GNUnet
80@c * Configuration Handbook:: Configuring GNUnet 89@c * Configuration Handbook:: Configuring GNUnet
81* GNUnet Contributors Handbook:: Contributing to GNUnet 90* GNUnet Contributors Handbook:: Contributing to GNUnet
82* GNUnet Developer Handbook:: Developing GNUnet 91* GNUnet Developer Handbook:: Developing GNUnet
83* GNU Free Documentation License:: The license of this manual 92* GNU Free Documentation License:: The license of this manual
84* GNU General Public License:: The license of this manual 93* GNU General Public License::
94* GNU Affero General Public License::
85* Concept Index:: Concepts 95* Concept Index:: Concepts
86* Programming Index:: Data types, functions, and variables 96* Programming Index:: Data types, functions, and variables
87 97
88@detailmenu 98@detailmenu
89 --- The Detailed Node Listing --- 99 --- The Detailed Node Listing ---
90 100
91Terminology 101Preface
92 102
93* General Terminology:: 103* About this book
104* Contributing to this book
105* Introduction
94* Typography:: 106* Typography::
95 107
96Philosophy 108Philosophy
97 109
98* Design Goals:: 110* Design Principles::
99* Security and Privacy:: 111* Privacy and Anonymity::
100* Versatility::
101* Practicality:: 112* Practicality::
102* Key Concepts:: 113
114Key Concepts
115
103* Authentication:: 116* Authentication::
104* Accounting to Encourage Resource Sharing:: 117* Accounting to Encourage Resource Sharing::
105* Confidentiality:: 118* Confidentiality::
@@ -111,32 +124,19 @@ Philosophy
111* Backup of Identities and Egos:: 124* Backup of Identities and Egos::
112* Revocation:: 125* Revocation::
113 126
114@c Vocabulary 127Installing GNUnet
115@c 128* Installing dependencies::
116@c * Definitions abbreviations and acronyms:: 129* Getting the Source Code::
117@c * Words and characters:: 130* Create @code{gnunet} user and group::
118@c * Technical Assumptions:: 131* Preparing and Compiling the Source Code::
119 132* Installation::
120GNUnet Installation Handbook 133* MOVED FROM USER Checking the Installation::
121 134* MOVED FROM USER The graphical configuration interface::
122* Dependencies:: 135* MOVED FROM USER Config Leftovers::
123* Pre-installation notes::
124* Generic installation instructions::
125* Build instructions for Ubuntu 12.04 using Git::
126* Build instructions for software builds from source::
127* Build Instructions for Microsoft Windows Platforms::
128* Build instructions for Debian 7.5::
129* Installing GNUnet from Git on Ubuntu 14.4::
130* Build instructions for Debian 8::
131* Outdated build instructions for previous revisions::
132@c * Portable GNUnet::
133* The graphical configuration interface::
134* How to start and stop a GNUnet peer::
135 136
136Using GNUnet 137Using GNUnet
137 138
138* Checking the Installation:: 139* Start and stop GNUnet::
139* First steps - File-sharing::
140* First steps - Using the GNU Name System:: 140* First steps - Using the GNU Name System::
141* First steps - Using GNUnet Conversation:: 141* First steps - Using GNUnet Conversation::
142* First steps - Using the GNUnet VPN:: 142* First steps - Using the GNUnet VPN::
@@ -144,18 +144,18 @@ Using GNUnet
144* The GNU Name System:: 144* The GNU Name System::
145* Using the Virtual Public Network:: 145* Using the Virtual Public Network::
146 146
147@c Configuration Handbook
148
149GNUnet Contributors Handbook 147GNUnet Contributors Handbook
150 148
151* Contributing to GNUnet:: 149* Contributing to GNUnet::
152* Licenses of contributions:: 150* Licenses of contributions::
153* Copyright Assignment:: 151* Copyright Assignment::
154* Contributing to the Reference Manual:: 152* Contributing to the Reference Manual::
153* Contributing testcases::
155 154
156GNUnet Developer Handbook 155GNUnet Developer Handbook
157 156
158* Developer Introduction:: 157* Developer Introduction::
158* Internal dependencies::
159* Code overview:: 159* Code overview::
160* System Architecture:: 160* System Architecture::
161* Subsystem stability:: 161* Subsystem stability::
@@ -163,6 +163,7 @@ GNUnet Developer Handbook
163* Build-system:: 163* Build-system::
164* Developing extensions for GNUnet using the gnunet-ext template:: 164* Developing extensions for GNUnet using the gnunet-ext template::
165* Writing testcases:: 165* Writing testcases::
166* Building GNUnet and its dependencies::
166* TESTING library:: 167* TESTING library::
167* Performance regression analysis with Gauger:: 168* Performance regression analysis with Gauger::
168* TESTBED Subsystem:: 169* TESTBED Subsystem::
@@ -196,15 +197,16 @@ GNUnet Developer Handbook
196@end menu 197@end menu
197 198
198@c ********************************************************************* 199@c *********************************************************************
199@include chapters/terminology.texi 200@include chapters/preface.texi
200@c ********************************************************************* 201@c *********************************************************************
201 202
202@c ********************************************************************* 203@c *********************************************************************
203@include chapters/philosophy.texi 204@include chapters/philosophy.texi
204@c ********************************************************************* 205@c *********************************************************************
205 206
206@c WIP: 207@c *********************************************************************
207@c @include chapters/vocabulary.texi 208@include chapters/keyconcepts.texi
209@c *********************************************************************
208 210
209@c ********************************************************************* 211@c *********************************************************************
210@include chapters/installation.texi 212@include chapters/installation.texi
@@ -214,9 +216,6 @@ GNUnet Developer Handbook
214@include chapters/user.texi 216@include chapters/user.texi
215@c ********************************************************************* 217@c *********************************************************************
216 218
217@c WIP:
218@c @include chapters/configuration.texi
219
220@include chapters/contributing.texi 219@include chapters/contributing.texi
221 220
222@c ********************************************************************* 221@c *********************************************************************
@@ -238,6 +237,12 @@ GNUnet Developer Handbook
238@include gpl-3.0.texi 237@include gpl-3.0.texi
239 238
240@c ********************************************************************* 239@c *********************************************************************
240@node GNU Affero General Public License
241@appendix GNU Affero General Public License
242@cindex license, GNU Affero General Public License
243@include agpl-3.0.texi
244
245@c *********************************************************************
241@node Concept Index 246@node Concept Index
242@unnumbered Concept Index 247@unnumbered Concept Index
243@printindex cp 248@printindex cp
@@ -246,6 +251,7 @@ GNUnet Developer Handbook
246@unnumbered Programming Index 251@unnumbered Programming Index
247@syncodeindex tp fn 252@syncodeindex tp fn
248@syncodeindex vr fn 253@syncodeindex vr fn
254@syncodeindex pg fn
249@printindex fn 255@printindex fn
250 256
251@bye 257@bye
diff --git a/doc/documentation/images/gns.dot b/doc/documentation/images/gns.dot
new file mode 100644
index 000000000..55b05d482
--- /dev/null
+++ b/doc/documentation/images/gns.dot
@@ -0,0 +1,42 @@
1// house = interface towards application
2// circle (default) = storage
3// diamond = stateless tool
4// box = legacy system
5
6// this is what we have...o
7digraph dataflow {
8splines = true;
9
10 DNS [shape="box"];
11 import [label="gnunet-zoneimport", shape="diamond"];
12 namestore;
13 namecache;
14 gns [shape="diamond"];
15 dns2gns [shape="house"];
16 cmdline [label="gnunet-gns", shape="house"];
17 libnss_gns [shape="house"];
18 proxy [label="gnunet-gns-proxy", shape="house"];
19 dht;
20 zonemaster [shape="diamond"];
21
22 DNS -> import [label="import"];
23 import -> namestore [label="export"];
24
25 namestore -> zonemaster [label="notifies"];
26 zonemaster -> dht [label="publishes"];
27
28 namestore -> namecache [label="pre-populates"];
29
30
31
32 libnss_gns -> cmdline [label="invokes"];
33 cmdline -> gns [label="lookup"];
34
35 dns2gns -> gns [label="lookup"];
36
37 proxy -> gns [label="lookup"];
38
39 gns -> namecache [label="uses"];
40 gns -> dht [label="queries"];
41
42}
diff --git a/doc/documentation/images/gns.eps b/doc/documentation/images/gns.eps
new file mode 100644
index 000000000..3f3c28d98
--- /dev/null
+++ b/doc/documentation/images/gns.eps
@@ -0,0 +1,585 @@
1%!PS-Adobe-3.0 EPSF-3.0
2%%Creator: graphviz version 2.40.1 (20161225.0304)
3%%Title: dataflow
4%%Pages: 1
5%%BoundingBox: 36 36 722 428
6%%EndComments
7save
8%%BeginProlog
9/DotDict 200 dict def
10DotDict begin
11
12/setupLatin1 {
13mark
14/EncodingVector 256 array def
15 EncodingVector 0
16
17ISOLatin1Encoding 0 255 getinterval putinterval
18EncodingVector 45 /hyphen put
19
20% Set up ISO Latin 1 character encoding
21/starnetISO {
22 dup dup findfont dup length dict begin
23 { 1 index /FID ne { def }{ pop pop } ifelse
24 } forall
25 /Encoding EncodingVector def
26 currentdict end definefont
27} def
28/Times-Roman starnetISO def
29/Times-Italic starnetISO def
30/Times-Bold starnetISO def
31/Times-BoldItalic starnetISO def
32/Helvetica starnetISO def
33/Helvetica-Oblique starnetISO def
34/Helvetica-Bold starnetISO def
35/Helvetica-BoldOblique starnetISO def
36/Courier starnetISO def
37/Courier-Oblique starnetISO def
38/Courier-Bold starnetISO def
39/Courier-BoldOblique starnetISO def
40cleartomark
41} bind def
42
43%%BeginResource: procset graphviz 0 0
44/coord-font-family /Times-Roman def
45/default-font-family /Times-Roman def
46/coordfont coord-font-family findfont 8 scalefont def
47
48/InvScaleFactor 1.0 def
49/set_scale {
50 dup 1 exch div /InvScaleFactor exch def
51 scale
52} bind def
53
54% styles
55/solid { [] 0 setdash } bind def
56/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
57/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
58/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
59/bold { 2 setlinewidth } bind def
60/filled { } bind def
61/unfilled { } bind def
62/rounded { } bind def
63/diagonals { } bind def
64/tapered { } bind def
65
66% hooks for setting color
67/nodecolor { sethsbcolor } bind def
68/edgecolor { sethsbcolor } bind def
69/graphcolor { sethsbcolor } bind def
70/nopcolor {pop pop pop} bind def
71
72/beginpage { % i j npages
73 /npages exch def
74 /j exch def
75 /i exch def
76 /str 10 string def
77 npages 1 gt {
78 gsave
79 coordfont setfont
80 0 0 moveto
81 (\() show i str cvs show (,) show j str cvs show (\)) show
82 grestore
83 } if
84} bind def
85
86/set_font {
87 findfont exch
88 scalefont setfont
89} def
90
91% draw text fitted to its expected width
92/alignedtext { % width text
93 /text exch def
94 /width exch def
95 gsave
96 width 0 gt {
97 [] 0 setdash
98 text stringwidth pop width exch sub text length div 0 text ashow
99 } if
100 grestore
101} def
102
103/boxprim { % xcorner ycorner xsize ysize
104 4 2 roll
105 moveto
106 2 copy
107 exch 0 rlineto
108 0 exch rlineto
109 pop neg 0 rlineto
110 closepath
111} bind def
112
113/ellipse_path {
114 /ry exch def
115 /rx exch def
116 /y exch def
117 /x exch def
118 matrix currentmatrix
119 newpath
120 x y translate
121 rx ry scale
122 0 0 1 0 360 arc
123 setmatrix
124} bind def
125
126/endpage { showpage } bind def
127/showpage { } def
128
129/layercolorseq
130 [ % layer color sequence - darkest to lightest
131 [0 0 0]
132 [.2 .8 .8]
133 [.4 .8 .8]
134 [.6 .8 .8]
135 [.8 .8 .8]
136 ]
137def
138
139/layerlen layercolorseq length def
140
141/setlayer {/maxlayer exch def /curlayer exch def
142 layercolorseq curlayer 1 sub layerlen mod get
143 aload pop sethsbcolor
144 /nodecolor {nopcolor} def
145 /edgecolor {nopcolor} def
146 /graphcolor {nopcolor} def
147} bind def
148
149/onlayer { curlayer ne {invis} if } def
150
151/onlayers {
152 /myupper exch def
153 /mylower exch def
154 curlayer mylower lt
155 curlayer myupper gt
156 or
157 {invis} if
158} def
159
160/curlayer 0 def
161
162%%EndResource
163%%EndProlog
164%%BeginSetup
16514 default-font-family set_font
166% /arrowlength 10 def
167% /arrowwidth 5 def
168
169% make sure pdfmark is harmless for PS-interpreters other than Distiller
170/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
171% make '<<' and '>>' safe on PS Level 1 devices
172/languagelevel where {pop languagelevel}{1} ifelse
1732 lt {
174 userdict (<<) cvn ([) cvn load put
175 userdict (>>) cvn ([) cvn load put
176} if
177
178%%EndSetup
179setupLatin1
180%%Page: 1 1
181%%PageBoundingBox: 36 36 722 428
182%%PageOrientation: Portrait
1830 0 1 beginpage
184gsave
18536 36 686 392 boxprim clip newpath
1861 1 set_scale 0 rotate 40 40 translate
187% DNS
188gsave
1891 setlinewidth
1900 0 0 nodecolor
191newpath 137.2989 384 moveto
19283.2989 384 lineto
19383.2989 348 lineto
194137.2989 348 lineto
195closepath stroke
1960 0 0 nodecolor
19714 /Times-Roman set_font
19896.2989 362.3 moveto 28 (DNS) alignedtext
199grestore
200% import
201gsave
2021 setlinewidth
2030 0 0 nodecolor
204newpath 110.2989 297 moveto
205.2008 279 lineto
206110.2989 261 lineto
207220.397 279 lineto
208closepath stroke
2090 0 0 nodecolor
21014 /Times-Roman set_font
21158.2989 275.3 moveto 104 (gnunet-zoneimport) alignedtext
212grestore
213% DNS->import
214gsave
2151 setlinewidth
2160 0 0 edgecolor
217newpath 110.2989 347.9735 moveto
218110.2989 336.1918 110.2989 320.5607 110.2989 307.1581 curveto
219stroke
2200 0 0 edgecolor
221newpath 113.799 307.0033 moveto
222110.2989 297.0034 lineto
223106.799 307.0034 lineto
224closepath fill
2251 setlinewidth
226solid
2270 0 0 edgecolor
228newpath 113.799 307.0033 moveto
229110.2989 297.0034 lineto
230106.799 307.0034 lineto
231closepath stroke
2320 0 0 edgecolor
23314 /Times-Roman set_font
234110.2989 318.8 moveto 37 (import) alignedtext
235grestore
236% namestore
237gsave
2381 setlinewidth
2390 0 0 nodecolor
240159.2989 192 47.3916 18 ellipse_path stroke
2410 0 0 nodecolor
24214 /Times-Roman set_font
243130.7989 188.3 moveto 57 (namestore) alignedtext
244grestore
245% import->namestore
246gsave
2471 setlinewidth
2480 0 0 edgecolor
249newpath 119.7466 262.2255 moveto
250126.7274 249.831 136.3701 232.7103 144.3867 218.4767 curveto
251stroke
2520 0 0 edgecolor
253newpath 147.5178 220.0495 moveto
254149.3756 209.6188 lineto
255141.4186 216.6143 lineto
256closepath fill
2571 setlinewidth
258solid
2590 0 0 edgecolor
260newpath 147.5178 220.0495 moveto
261149.3756 209.6188 lineto
262141.4186 216.6143 lineto
263closepath stroke
2640 0 0 edgecolor
26514 /Times-Roman set_font
266138.2989 231.8 moveto 35 (export) alignedtext
267grestore
268% namecache
269gsave
2701 setlinewidth
2710 0 0 nodecolor
272300.2989 105 50.0912 18 ellipse_path stroke
2730 0 0 nodecolor
27414 /Times-Roman set_font
275269.7989 101.3 moveto 61 (namecache) alignedtext
276grestore
277% namestore->namecache
278gsave
2791 setlinewidth
2800 0 0 edgecolor
281newpath 184.1823 176.6464 moveto
282206.9544 162.5955 240.8544 141.6785 266.1545 126.0678 curveto
283stroke
2840 0 0 edgecolor
285newpath 268.04 129.0171 moveto
286274.7125 120.7873 lineto
287264.3642 123.0598 lineto
288closepath fill
2891 setlinewidth
290solid
2910 0 0 edgecolor
292newpath 268.04 129.0171 moveto
293274.7125 120.7873 lineto
294264.3642 123.0598 lineto
295closepath stroke
2960 0 0 edgecolor
29714 /Times-Roman set_font
298238.2989 144.8 moveto 74 (pre-populates) alignedtext
299grestore
300% zonemaster
301gsave
3021 setlinewidth
3030 0 0 nodecolor
304newpath 159.2989 123 moveto
30586.5718 105 lineto
306159.2989 87 lineto
307232.0259 105 lineto
308closepath stroke
3090 0 0 nodecolor
31014 /Times-Roman set_font
311127.7989 101.3 moveto 63 (zonemaster) alignedtext
312grestore
313% namestore->zonemaster
314gsave
3151 setlinewidth
3160 0 0 edgecolor
317newpath 159.2989 173.9735 moveto
318159.2989 162.1918 159.2989 146.5607 159.2989 133.1581 curveto
319stroke
3200 0 0 edgecolor
321newpath 162.799 133.0033 moveto
322159.2989 123.0034 lineto
323155.799 133.0034 lineto
324closepath fill
3251 setlinewidth
326solid
3270 0 0 edgecolor
328newpath 162.799 133.0033 moveto
329159.2989 123.0034 lineto
330155.799 133.0034 lineto
331closepath stroke
3320 0 0 edgecolor
33314 /Times-Roman set_font
334159.2989 144.8 moveto 41 (notifies) alignedtext
335grestore
336% gns
337gsave
3381 setlinewidth
3390 0 0 nodecolor
340newpath 386.2989 210 moveto
341353.957 192 lineto
342386.2989 174 lineto
343418.6408 192 lineto
344closepath stroke
3450 0 0 nodecolor
34614 /Times-Roman set_font
347376.7989 188.3 moveto 19 (gns) alignedtext
348grestore
349% gns->namecache
350gsave
3511 setlinewidth
3520 0 0 edgecolor
353newpath 373.8052 180.5028 moveto
354366.3078 173.5201 356.6389 164.3674 348.2989 156 curveto
355339.8869 147.5605 330.8812 138.1087 322.969 129.6563 curveto
356stroke
3570 0 0 edgecolor
358newpath 325.434 127.1675 moveto
359316.0586 122.2327 lineto
360320.3103 131.937 lineto
361closepath fill
3621 setlinewidth
363solid
3640 0 0 edgecolor
365newpath 325.434 127.1675 moveto
366316.0586 122.2327 lineto
367320.3103 131.937 lineto
368closepath stroke
3690 0 0 edgecolor
37014 /Times-Roman set_font
371348.2989 144.8 moveto 24 (uses) alignedtext
372grestore
373% dht
374gsave
3751 setlinewidth
3760 0 0 nodecolor
377272.2989 18 27 18 ellipse_path stroke
3780 0 0 nodecolor
37914 /Times-Roman set_font
380263.2989 14.3 moveto 18 (dht) alignedtext
381grestore
382% gns->dht
383gsave
3841 setlinewidth
3850 0 0 edgecolor
386newpath 385.181 174.2737 moveto
387383.0587 152.2164 376.9318 114.1509 359.2989 87 curveto
388344.9772 64.9477 321.2191 46.8067 302.1458 34.6694 curveto
389stroke
3900 0 0 edgecolor
391newpath 303.8469 31.6069 moveto
392293.4925 29.3628 lineto
393300.1875 37.5742 lineto
394closepath fill
3951 setlinewidth
396solid
3970 0 0 edgecolor
398newpath 303.8469 31.6069 moveto
399293.4925 29.3628 lineto
400300.1875 37.5742 lineto
401closepath stroke
4020 0 0 edgecolor
40314 /Times-Roman set_font
404376.2989 101.3 moveto 40 (queries) alignedtext
405grestore
406% dns2gns
407gsave
4081 setlinewidth
4090 0 0 nodecolor
410newpath 336.3104 284.5623 moveto
411287.2989 297 lineto
412238.2874 284.5623 lineto
413238.3331 264.4377 lineto
414336.2646 264.4377 lineto
415closepath stroke
4160 0 0 nodecolor
41714 /Times-Roman set_font
418264.7989 275.3 moveto 45 (dns2gns) alignedtext
419grestore
420% dns2gns->gns
421gsave
4221 setlinewidth
4230 0 0 edgecolor
424newpath 304.0929 264.2416 moveto
425321.1237 249.2751 347.504 226.0924 365.7671 210.0431 curveto
426stroke
4270 0 0 edgecolor
428newpath 368.323 212.4564 moveto
429373.5243 203.2262 lineto
430363.7022 207.1983 lineto
431closepath fill
4321 setlinewidth
433solid
4340 0 0 edgecolor
435newpath 368.323 212.4564 moveto
436373.5243 203.2262 lineto
437363.7022 207.1983 lineto
438closepath stroke
4390 0 0 edgecolor
44014 /Times-Roman set_font
441343.2989 231.8 moveto 38 (lookup) alignedtext
442grestore
443% cmdline
444gsave
4451 setlinewidth
4460 0 0 nodecolor
447newpath 478.0186 284.5623 moveto
448416.2989 297 lineto
449354.5791 284.5623 lineto
450354.6367 264.4377 lineto
451477.961 264.4377 lineto
452closepath stroke
4530 0 0 nodecolor
45414 /Times-Roman set_font
455385.7989 275.3 moveto 61 (gnunet-gns) alignedtext
456grestore
457% cmdline->gns
458gsave
4591 setlinewidth
4600 0 0 edgecolor
461newpath 411.2098 264.2416 moveto
462406.7547 251.3219 400.1883 232.2795 394.9156 216.9885 curveto
463stroke
4640 0 0 edgecolor
465newpath 398.0825 215.4359 moveto
466391.5138 207.1232 lineto
467391.4649 217.7179 lineto
468closepath fill
4691 setlinewidth
470solid
4710 0 0 edgecolor
472newpath 398.0825 215.4359 moveto
473391.5138 207.1232 lineto
474391.4649 217.7179 lineto
475closepath stroke
4760 0 0 edgecolor
47714 /Times-Roman set_font
478403.2989 231.8 moveto 38 (lookup) alignedtext
479grestore
480% libnss_gns
481gsave
4821 setlinewidth
4830 0 0 nodecolor
484newpath 475.6981 371.5623 moveto
485416.2989 384 lineto
486356.8996 371.5623 lineto
487356.9551 351.4377 lineto
488475.6427 351.4377 lineto
489closepath stroke
4900 0 0 nodecolor
49114 /Times-Roman set_font
492387.2989 362.3 moveto 58 (libnss_gns) alignedtext
493grestore
494% libnss_gns->cmdline
495gsave
4961 setlinewidth
4970 0 0 edgecolor
498newpath 416.2989 351.2416 moveto
499416.2989 339.2263 416.2989 321.9156 416.2989 307.2516 curveto
500stroke
5010 0 0 edgecolor
502newpath 419.799 307.1553 moveto
503416.2989 297.1553 lineto
504412.799 307.1553 lineto
505closepath fill
5061 setlinewidth
507solid
5080 0 0 edgecolor
509newpath 419.799 307.1553 moveto
510416.2989 297.1553 lineto
511412.799 307.1553 lineto
512closepath stroke
5130 0 0 edgecolor
51414 /Times-Roman set_font
515416.2989 318.8 moveto 43 (invokes) alignedtext
516grestore
517% proxy
518gsave
5191 setlinewidth
5200 0 0 nodecolor
521newpath 677.8617 284.5623 moveto
522587.2989 297 lineto
523496.7361 284.5623 lineto
524496.8206 264.4377 lineto
525677.7771 264.4377 lineto
526closepath stroke
5270 0 0 nodecolor
52814 /Times-Roman set_font
529538.7989 275.3 moveto 97 (gnunet-gns-proxy) alignedtext
530grestore
531% proxy->gns
532gsave
5331 setlinewidth
5340 0 0 edgecolor
535newpath 553.202 264.2416 moveto
536513.9908 247.2697 450.3696 219.7321 414.0521 204.0126 curveto
537stroke
5380 0 0 edgecolor
539newpath 415.1432 200.6711 moveto
540404.5757 199.9109 lineto
541412.3626 207.0952 lineto
542closepath fill
5431 setlinewidth
544solid
5450 0 0 edgecolor
546newpath 415.1432 200.6711 moveto
547404.5757 199.9109 lineto
548412.3626 207.0952 lineto
549closepath stroke
5500 0 0 edgecolor
55114 /Times-Roman set_font
552499.2989 231.8 moveto 38 (lookup) alignedtext
553grestore
554% zonemaster->dht
555gsave
5561 setlinewidth
5570 0 0 edgecolor
558newpath 177.2041 91.2146 moveto
559195.8835 76.8331 225.3438 54.1513 246.5248 37.8438 curveto
560stroke
5610 0 0 edgecolor
562newpath 248.689 40.5947 moveto
563254.4775 31.7209 lineto
564244.4186 35.0482 lineto
565closepath fill
5661 setlinewidth
567solid
5680 0 0 edgecolor
569newpath 248.689 40.5947 moveto
570254.4775 31.7209 lineto
571244.4186 35.0482 lineto
572closepath stroke
5730 0 0 edgecolor
57414 /Times-Roman set_font
575223.2989 57.8 moveto 52 (publishes) alignedtext
576grestore
577endpage
578showpage
579grestore
580%%PageTrailer
581%%EndPage: 1
582%%Trailer
583end
584restore
585%%EOF
diff --git a/doc/documentation/images/gns.jpg b/doc/documentation/images/gns.jpg
new file mode 100644
index 000000000..d71109b95
--- /dev/null
+++ b/doc/documentation/images/gns.jpg
Binary files differ
diff --git a/doc/documentation/images/gnunet-gtk-0-10.png b/doc/documentation/images/gnunet-gtk-0-10.png
deleted file mode 100644
index 3615849a7..000000000
--- a/doc/documentation/images/gnunet-gtk-0-10.png
+++ /dev/null
Binary files differ
diff --git a/doc/documentation/tutorial-examples/005.c b/doc/documentation/tutorial-examples/005.c
index 0c459f509..1b59f85a6 100644
--- a/doc/documentation/tutorial-examples/005.c
+++ b/doc/documentation/tutorial-examples/005.c
@@ -2,7 +2,8 @@ struct GNUNET_MQ_Envelope *env;
2struct GNUNET_MessageHeader *msg; 2struct GNUNET_MessageHeader *msg;
3 3
4env = GNUNET_MQ_msg_extra (msg, payload_size, GNUNET_MY_MESSAGE_TYPE); 4env = GNUNET_MQ_msg_extra (msg, payload_size, GNUNET_MY_MESSAGE_TYPE);
5memcpy (&msg[1], &payload, payload_size); 5GNUNET_memcpy (&msg[1],
6 &payload,
7 payload_size);
6// Send message via message queue 'mq' 8// Send message via message queue 'mq'
7GNUNET_mq_send (mq, env); 9GNUNET_mq_send (mq, env);
8