![Christian Grothoff - August 2013 - Berlin, Germany](https://upload.wikimedia.org/wikipedia/commons/d/d4/Christian_Grothoff_-_August_2013_-_Berlin%2C_Germany.png)
GNUnet is a
software framework
In computer programming, a software framework is an abstraction in which software, providing generic functionality, can be selectively changed by additional user-written code, thus providing application-specific software. It provides a standard ...
for
decentralized
Decentralization or decentralisation is the process by which the activities of an organization, particularly those regarding planning and decision making, are distributed or delegated away from a central, authoritative location or group.
Conce ...
,
peer-to-peer
Peer-to-peer (P2P) computing or networking is a distributed application architecture that partitions tasks or workloads between peers. Peers are equally privileged, equipotent participants in the network. They are said to form a peer-to-peer n ...
networking and an official
GNU
GNU () is an extensive collection of free software (383 packages as of January 2022), which can be used as an operating system or can be used in parts with other operating systems. The use of the completed GNU tools led to the family of operat ...
package. The framework offers
link encryption
Link encryption is an approach to communications security that encrypts and decrypts all network traffic at each network routing point (e.g. network switch, or node through which it passes) until arrival at its final destination. This repeated dec ...
,
peer discovery,
resource allocation
In economics, resource allocation is the assignment of available resources to various uses. In the context of an entire economy, resources can be allocated by various means, such as markets, or planning.
In project management, resource allocation ...
, communication over many transports (such as
TCP,
UDP,
HTTP
The Hypertext Transfer Protocol (HTTP) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, ...
,
HTTPS
Hypertext Transfer Protocol Secure (HTTPS) is an extension of the Hypertext Transfer Protocol (HTTP). It is used for secure communication over a computer network, and is widely used on the Internet. In HTTPS, the communication protocol is enc ...
,
WLAN
A wireless LAN (WLAN) is a wireless computer network that links two or more devices using wireless communication to form a local area network (LAN) within a limited area such as a home, school, computer laboratory, campus, or office building ...
and
Bluetooth
Bluetooth is a short-range wireless technology standard that is used for exchanging data between fixed and mobile devices over short distances and building personal area networks (PANs). In the most widely used mode, transmission power is limi ...
) and various basic
peer-to-peer
Peer-to-peer (P2P) computing or networking is a distributed application architecture that partitions tasks or workloads between peers. Peers are equally privileged, equipotent participants in the network. They are said to form a peer-to-peer n ...
algorithms for
routing
Routing is the process of selecting a path for traffic in a network or between or across multiple networks. Broadly, routing is performed in many types of networks, including circuit-switched networks, such as the public switched telephone netw ...
,
multicast
In computer networking, multicast is group communication where data transmission is addressed to a group of destination computers simultaneously. Multicast can be one-to-many or many-to-many distribution. Multicast should not be confused with ...
and
network size estimation
Network, networking and networked may refer to:
Science and technology
* Network theory, the study of graphs as a representation of relations between discrete objects
* Network science, an academic field that studies complex networks
Mathematics ...
.
GNUnet's basic network topology is that of a
mesh network. GNUnet includes a
distributed hash table
A distributed hash table (DHT) is a distributed system that provides a lookup service similar to a hash table: key–value pairs are stored in a DHT, and any participating node can efficiently retrieve the value associated with a given key. The m ...
(DHT) which is a
randomized
In common usage, randomness is the apparent or actual lack of pattern or predictability in events. A random sequence of events, symbols or steps often has no order and does not follow an intelligible pattern or combination. Individual rand ...
variant of
Kademlia
Kademlia is a distributed hash table for decentralized peer-to-peer computer networks designed by Petar Maymounkov and David Mazières in 2002. It specifies the structure of the network and the exchange of information through node lookups. Kademl ...
that can still efficiently route in
small-world network
A small-world network is a type of mathematical graph in which most nodes are not neighbors of one another, but the neighbors of any given node are likely to be neighbors of each other and most nodes can be reached from every other node by a sm ...
s. GNUnet offers a "
F2F topology" option for restricting connections to only the users' trusted friends. The users' friends' own friends (and so on) can then indirectly exchange files with the users' computer, never using its IP address directly.
GNUnet uses
Uniform resource identifier
A Uniform Resource Identifier (URI) is a unique sequence of characters that identifies a logical or physical resource used by web technologies. URIs may be used to identify anything, including real-world objects, such as people and places, conc ...
s (not approved by
IANA
The Internet Assigned Numbers Authority (IANA) is a standards organization that oversees global IP address allocation, autonomous system number allocation, root zone management in the Domain Name System (DNS), media types, and other Interne ...
, although an application has been made). GNUnet URIs consist of two major parts: the module and the module specific identifier. A GNUnet URI is of form
gnunet://module/identifier
where ''module'' is the module name and ''identifier'' is a module specific string.
The primary codebase is written in
C, but there are
bindings in other languages to produce an API for developing extensions in those languages. GNUnet is part of the
GNU Project
The GNU Project () is a free software, mass collaboration project announced by Richard Stallman on September 27, 1983. Its goal is to give computer users freedom and control in their use of their computers and computing devices by collaborati ...
. It has gained interest in the
hacker community after the
PRISM
Prism usually refers to:
* Prism (optics), a transparent optical component with flat surfaces that refract light
* Prism (geometry), a kind of polyhedron
Prism may also refer to:
Science and mathematics
* Prism (geology), a type of sedimentary ...
revelations.
GNUnet consists of several subsystems, of which essential ones are Transport and Core subsystems. Transport subsystem provides insecure link-layer communications, while Core provides peer discovery and encryption. On top of the core subsystem various applications are built.
GNUnet includes various P2P applications in the main distribution of the framework, including filesharing, chat and VPN; additionally, a few external projects (such as
secushare) are also extending the GNUnet infrastructure.
GNUnet is unrelated to the older
Gnutella
Gnutella is a peer-to-peer network protocol. Founded in 2000, it was the first decentralized peer-to-peer network of its kind, leading to other, later networks adopting the model.
In June 2005, Gnutella's population was 1.81 million computer ...
P2P protocol. Gnutella is not an official GNU project, while GNUnet is.
Transport
Originally, GNUnet used
UDP for underlying transport. Now GNUnet transport subsystem provides multiple options, such as TCP and SMTP.
The communication port, officially registered at
IANA
The Internet Assigned Numbers Authority (IANA) is a standards organization that oversees global IP address allocation, autonomous system number allocation, root zone management in the Domain Name System (DNS), media types, and other Interne ...
, is 2086 (
tcp +
udp).
Trust system
GNUnet provides trust system based on excess-based economic model. The idea of employing economic system is taken from
MojoNation
Mnet is software to run a peer-to-peer distributed data store for file sharing purpose. It aimed at substituting free sharing of digital resources, typical of P2P networks, with a market regulated by its own currency.
Mnet is a fork of the soft ...
network.
GNUnet network has no trusted entities so it is impossible to maintain global ''reputation''. Instead, each peer maintains its own ''trust'' for each of its local links.
When resources, such as bandwidth and CPU time, are in excess, peer provides them to all requesting neighbors without reducing trust or otherwise charging them. When a node is under stress it drops requests from its neighbor nodes having lower internal trust value. However, when peer has less resources than enough to fulfill everyone's requests, it denies requests of those neighbors that it trusts less and charges others by reducing their trust.
File sharing
The primary application at this point is
anonymous,
censorship
Censorship is the suppression of speech, public communication, or other information. This may be done on the basis that such material is considered objectionable, harmful, sensitive, or "inconvenient". Censorship can be conducted by governments ...
-resistant file-sharing, allowing users to anonymously publish or retrieve information of all kinds. The GNUnet protocol which provides anonymity is called GAP (GNUnet anonymity protocol). GNUnet FS can additionally make use of
GNU libextractor
GNU () is an extensive collection of free software (383 packages as of January 2022), which can be used as an operating system or can be used in parts with other operating systems. The use of the completed GNU tools led to the family of operat ...
to automatically annotate shared files with
metadata
Metadata is "data that provides information about other data", but not the content of the data, such as the text of a message or the image itself. There are many distinct types of metadata, including:
* Descriptive metadata – the descriptive ...
.
File encoding
Files shared with GNUnet are ECRS (An Encoding for Censorship-Resistant Sharing) coded.
All content is represented as GBlocks. Each GBlock contains 1024 bytes. There are several types of GBlocks, each of them serves a particular purpose. Any GBlock
is uniquely identified by its
RIPEMD-160 hash .
DBlocks store actual file contents and nothing else. File is split at 1024 byte boundaries and resulting chunks are stored in DBlocks. DBlocks are linked together into
Merkle tree
In cryptography and computer science, a hash tree or Merkle tree is a tree in which every "leaf" (node) is labelled with the cryptographic hash of a data block, and every node that is not a leaf (called a ''branch'', ''inner node'', or ''inode'') ...
by means of IBlocks that store DBlock identifiers.
Blocks are encrypted with a symmetric key derived from
when they are stored in the network.
Queries and replies
GNUnet Anonymity Protocol consists of queries and replies. Depending on load of the forwarding node, messages are forwarded to zero or more nodes.
Queries are used to search for content and request data blocks.
Query contains resource identifier, reply address, priority and TTL (Time-to-Live).
Resource identifier of datum
is a triple-hash
. Peer that replies to query provides
to prove that it indeed has the requested resource without providing
to intermediate nodes, so intermediate nodes can't decrypt
.
Reply address is the major difference compared to
Freenet
Freenet is a peer-to-peer platform for censorship-resistant, anonymous communication. It uses a decentralized distributed data store to keep and deliver information, and has a suite of free software for publishing and communicating on the Web ...
protocol. While in Freenet reply always propagates back using the same path as the query, in GNUnet the path may be shorter. Peer receiving a query may drop it, ''forward'' it without rewriting reply address or ''indirect'' it by replacing reply address with its own address. By indirecting queries peer provides
cover traffic for its own queries, while by forwarding them peer avoids being a link in reply propagation and preserves its bandwidth. This feature allows the user to trade anonymity for efficiency. User can specify an anonymity level for each publish, search and download operation. An anonymity level of ''zero'' can be used to select non-anonymous file-sharing. GNUnet's DHT infrastructure is only used if non-anonymous file-sharing is specified. The anonymity level determines how much cover traffic a peer must have to hide the user's own actions.
Priority specifies how much of its trust user wants to spend in case of resource shortage.
TTL is used to prevent queries from staying in the network for too long.
File sharing URIs
The ''fs'' module ''identifier'' consists of either ''chk'', ''sks'', ''ksk'' or ''loc'' followed by a slash and a category specific value. Most URIs contain hashes, which are encoded in
base32hex.
* ''chk'' identifies files, typically:
gnunet://fs/chk/ ile hash uery hash ile size in bytes/nowiki>
: File hash is the hash of the plaintext file, which allows decrypting it once it is downloaded. Query hash is the hash of topmost GBlock which allows downloading the whole tree of GBlocks that contain encrypted file. File size is required to determine the shape of the tree.
* ''sks'' identifies files within namespaces, typically:
gnunet://fs/sks/NAMESPACE/IDENTIFIER
* ''ksk'' identifies search queries, typically:
gnunet://fs/ksk/KEYWORDKEYWORD
Keyword may refer to:
Computing
* Keyword (Internet search), a word or phrase typically used by bloggers or online content creator to rank a web page on a particular topic
* Index term, a term used as a keyword to documents in an information syst ...
* ''loc'' identifies a datum on a specific machine, typically:
gnunet://fs/loc/PEER/QUERY.TYPE.KEY.SIZE
Examples
A type of GNUnet filesharing URI pointing to a specific copy of
GNU GPL
The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end users the four freedoms to run, study, share, and modify the software. The license was the first copyleft for general us ...
license text:
gnunet://fs/chk/9E4MDN4VULE8KJG6U1C8FKH5HA8C5CHSJTILRTTPGK8MJ6VHORERHE68JU8Q0FDTOH1DGLUJ3NLE99N0ML0N9PIBAGKG7MNPBTT6UKG.1I823C58O3LKS24LLI9KB384LH82LGF9GUQRJHACCUINSCQH36SI4NF88CMAET3T3BHI93D4S0M5CC6MVDL1K8GFKVBN69Q6T307U6O.17992
Another type of GNUnet filesharing URI, pointing to the search results of a search with keyword "gpl":
gnunet://fs/ksk/gpl
GNU Name System
GNUnet includes an implementation of the GNU Name System (GNS), a decentralized and censorship-resistant replacement for
DNS
The Domain Name System (DNS) is a hierarchical and distributed naming system for computers, services, and other resources in the Internet or other Internet Protocol (IP) networks. It associates various information with domain names assigned to ...
. In GNS, each user manages their own
zones
Zone or The Zone may refer to:
Places Climate and altitude zones
* Death zone (originally the lethal zone), altitudes above a certain point where the amount of oxygen is insufficient to sustain human life for an extended time span
* Frigid zone, ...
and can delegate subdomains to zones managed by other users. Lookups of records defined by other users are performed using GNUnet's DHT.
Protocol translation
GNUnet can tunnel IP traffic over the peer-to-peer network. If necessary, GNUnet can perform IPv4-IPv6
protocol translation in the process. GNUnet provides a
DNS Application-level gateway to proxy DNS requests and map addresses to the desired address family as necessary. This way, GNUnet offers a possible technology to facilitate
IPv6 transition. Furthermore, in combination with GNS, GNUnet's protocol translation system can be used to access hidden services — IP-based services that run locally at some peer in the network and which can only be accessed by resolving a GNS name.
Social API
Gabor X Toth published in early September 2013 a thesis to present the design of a
social messaging service for the GNUnet peer-to-peer framework that offers scalability, extensibility, and end-to-end encrypted communication. The scalability property is achieved through multicast message delivery, while extensibility is made possible by using
PSYC (Protocol for SYnchronous Conferencing), which provides an extensible
RPC (Remote Procedure Call) syntax that can evolve over time without having to upgrade the software on all nodes in the network. Another key feature provided by the PSYC layer are stateful multicast channels, which are used to store e.g. user profiles. End-to-end encrypted communication is provided by the mesh service of GNUnet, upon which the multicast channels are built. Pseudonymous users and social places in the system have cryptographical identities — identified by their public key — these are mapped to human memorable names using GNS (
GNU Name System), where each pseudonym has a zone pointing to its places.
That is the required building block for turning the GNUnet framework into a fully
peer-to-peer social networking platform.
Chat
A chat has been implemented in the CADET module, for which a
GTK
GTK (formerly GIMP ToolKit and GTK+) is a free and open-source cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both free and propriet ...
interface for
GNOME
A gnome is a mythological creature and diminutive spirit in Renaissance magic and alchemy, first introduced by Paracelsus in the 16th century and later adopted by more recent authors including those of modern fantasy literature. Its characte ...
exists, specifically designed for the emerging Linux phones (such as the
Librem 5
The Librem 5 is a smartphone manufactured by Purism that is part of their Librem line of products. The phone is designed with the goal of using free software whenever possible, includes PureOS, a Linux operating system, by default, and as of 2021 ...
or the
PinePhone).
GNUnet CADET for mobile Linux – Reddit
/ref>
See also
* InterPlanetary File System
The InterPlanetary File System (IPFS) is a protocol, hypermedia and file sharing peer-to-peer network for storing and sharing data in a distributed file system. IPFS uses content-addressing to uniquely identify each file in a global namespace ...
* Comparison of file-sharing applications
* Synchronous conferencing
Synchronous conferencing is the formal term used in computing, in particular in computer-mediated communication, collaboration and learning, to describe technologies informally known as online chat. It is sometimes extended to include audio/vid ...
Notes
References
Further references
*
*
*
*
*
*
*
*
*
External links
*
{{Cryptographic software
GNU Project software
Free file sharing software
Anonymity networks
Anonymous file sharing networks
Free software programmed in C
Cross-platform free software
Software using the GNU AGPL license
Key-based routing