You are here

About GNUnet

GNUnet is a mesh routing layer for end-to-end encrypted networking and a framework for distributed applications designed to replace the old insecure Internet protocol stack.

In other words, GNUnet provides a strong foundation of free software for a global, distributed network that provides security and privacy. Along with an application for secure publication of files, it has grown to include all kinds of basic applications for the foundation of a GNU internet.

GNUnet is an official GNU package. GNUnet can be downloaded from GNU and the GNU mirrors.

Read more Friday, February 19, 2010 - 22:34 Christian Grothoff

libbrandt GSoC final evaluation

The Google Summer of Code is about to end and it's time for an update on the libbrandt development.

The code can be cloned from this repository:
git clone git://gnunet.org/libbrandt

Since the midterm evaluation I implemented the public outcome version of the algorithm for first price auctions and worked on the public library API. The public outcome algorithm uses libgnunetutil to compute a discrete logarithm and can be tested by calling `make check`. The API is not quite finished, so libbrandt is not yet in a usable state for applications. However I will continue to work on libbrandt and a GNUnet service using it in my upcoming masters thesis. The main features missing from the original plan for GSoC are:

  • M+1st price auction algorithm
  • Final API

A few minor todos are also left directly in the code, search for \todo or look at the todo list in the documentation.

The code is mostly documented, you can build the html documentation with doxygen by calling make full from the doc directory. Simple examples of how to use the code can be seen in the test_brandt.c and test_crypto.c files.

I also did a talk about libbrandt at the GNU hacker meeting last week. I'll edit this post to include the link to the recording after it is published.

I thank my Mentor Christian Grothoff for his guidance, technical insights and also some help with setting up the GNU autotools build system.

Read more Tuesday, August 23, 2016 - 09:20 Markus Teich

Rust implementation of GNUnet with GSoC - Final-term

This is the final week of the gnunet-rs project with Google Summer of Code. It has been challenging but also exceptionally rewarding. I hope to explain the final product and then touch on the future work. The repository can be found here, and my previous blog post here.

During the first half of GSoC working period, I changed the peerinfo service to use asynchronous IO (using gjio). I continued on that path and added two more services to make use of asynchronous IO - identity and GNS. I won't cover the complete API in this blog post since their usage can be found in the documentation comments in the code (cargo doc can be used to generate html docs); there are also a lot of examples. But I will highlight one of them because it demonstrates the strengths of a promise based API.

async::EventLoop::top_level(|wait_scope| -> Result {
    // set up and configuration code omitted
    let mut gns = GNS::connect(&config, &network)
            .wait(wait_scope, &mut event_port).unwrap();
    let promises = vec!["gnu.org", "gnunet.org", "freebsd.org"]
            .into_iter().map(|d| {
        gns.lookup(::std::rc::Rc::new(d.to_string()),
                   public_key,
                   gns::RecordType::A,
                   gns::LocalOptions::LocalMaster,
                   None)
    });
    let addresses = async::Promise::all(promises)
            .wait(wait_scope, &mut event_port).unwrap();
    println!("{:?}", addresses);
    Ok(())
}).expect("top_level");

This piece of code creates a vector of promises to the GNS lookup results, and then the all function transforms it into a promise to a vector of the results. Finally we wait for all the promises to resolve.

The all function is useful for aggregating the result of multiple promises, methods such as then and map (not demonstrated here) give the user a composible way to chain promises together. Overall, using these functions and the promise API, we arrive at an elegant and safe way to write asynchronous code.

Moving the original blocking API into an asynchronous API is certainly a step forward. However, Rust is evolving rapidly (impl Trait return just landed in Nightly), especially regarding asynchronous IO libraries (recently futures-rs was announced which feature "zero-cost futures and streams"). So there is still a lot to be explored regarding the API design.

I'd like to thank Jeff for being my mentor. Completing this project would not have been possible without his guidance and the insightful discussions.

Read more Wednesday, August 17, 2016 - 05:41 kc1212

libbrandt GSoC midterm status update

Heyho,

the GSoC midterm evaluation finished this week and it's time for a status update on the libbrandt auctioning library project.

In the past few weeks we decided to switch from RSA like crypto to Ed25519 due to performance reasons and it's generally more modern approach. Therefore we don't use libpari anymore, but libgcrypt instead. Ed25519 also has no need to validate each input value from other protocol participants.

Then I translated the three zero knowledge proofs and the first price auction protocol with a private outcome from this paper to Ed25519 and implemented them including unit tests. If you want to check out the source code, git clone git://gnunet.org/libbrandt. The majority of the current code can be found in crypto.c, the unit tests are in test_crypto.c

The next steps are to implement the higher level messaging state machine and the public library interface.

Read more Wednesday, June 29, 2016 - 12:54 Markus Teich

Rust implementation of GNUnet with GSoC - Mid-term progress

The GSoC mid-term evaluation is happening now, so this is a good time to write up the work I've done so far. My contributions are threefold. The files mentioned below can be found in the async branch (https://github.com/kc1212/gnunet-rs/tree/async).

1. Packed message structs
GNUnet messages are represented by packed C structures. Serialisation and deserialisation are thus straightforward, messages are simply sent byte for byte over the network. gnunet-rs did not do this initially. So I ported a couple of message structures from the C code into Rust and implemented ways to easily construct and send those messages. In the future we hope to automatically generate message structures from the C code using bindgen when it supports packed structures (https://github.com/crabtw/rust-bindgen/issues/351).

2. Removed dynamic links with the GNUnet C library
Previously gnunet-rs links with the C library to use the functions for converting between GNUnet's ASCII encoding and binary value. Linking with the C library only for a couple of functions creates unnecessary overhead. The Java library also doesn't link against the C library. Thus I ported those functions to Rust and wrote some simple test cases for them, those can be found in src/util/string.rs. This removes the need for linking with the C library.

3. Asynchronous peerinfo library with gjio
Finally, the most important contribution is asynchronous support using gjio (https://github.com/dwrensha/gjio). gjio is a high-level asynchronous IO library based on event loop and promises. It supports most of the features in the GNUnet Scheduler such as timeout, cancellation and so on.

Currently three public functions for peerinfo are provided.

pub fn iterate_peers(cfg: &Cfg, network: &Network)
-> Promise<Peers, IteratePeersError>
pub fn get_peer(cfg: &Cfg, network: &Network, pk_string: String)
-> Promise<(Option<PeerIdentity>, Option<Hello>), NextPeerError>
pub fn self_id(cfg: &Cfg, network: &Network)
-> Promise<PeerIdentity, TransportServiceInitError>

Since they all return Promises<T, E>, we can perform asynchronous operations by creating multiple promises, chain them together if necessary, finally wait for all of them to evaluate. For instance, to check whether two specific peers are online, we can write the following.

EventLoop::top_level(|wait_scope| -> Result<(), ::std::io::Error> {
// setup config, network, etc.
let promise1 = get_peer(&config, &network, pk_string1)
let promise2 = get_peer(&config, &network, pk_string2)
let result = Promise::all(vec![promise1, promise2].into_iter()).wait(wait_scope, &mut event_port)
// process result
}

More usage examples can be found under examples/example-list-peers.rs.

The work so far presents a proof of concept of accessing the peerinfo service asynchronously. That is exactly what I aimed to achieve by mid-term evaluation in my original proposal.

However, the work is far from over. iterate_peers doesn't return an Iterator, the user must manually evaluate the promise on every iteration and check whether it has reached the end, I'm hoping to make it into Iterator trait. The current API was designed without paying much attention to the existing C or Java API, I'd like to introduce some consistency with the existing API both in terms of naming and functionality. The tests and documentation I have at the moment are minimal, so some work needs to be done to improve on those fronts. Finally, I'd like to implement a couple of other subsystems such as GNS and/or statistics.

Fortunately, summer holidays are finally starting in a couple of weeks, which substantially increases the amount of time that I can spend on GNUnet. I'm looking forward to the next 8 weeks!

Kelong

Read more Wednesday, June 22, 2016 - 10:17 kc1212

GNU Hacker Meeting August 16-20 2016 (Rennes)

GHM 2016 is over, we'll try to post the talks here soon.

Read more Thursday, May 26, 2016 - 15:38 Christian Grothoff

Rust implementation of GNUnet with GSoC

Hello,

I will be participating in Google Summer of Code this year with GNUnet. The project is on improving the Rust implementation of GNUnet utils. The primary objective is to add asynchronous IO in a way that is general, extensible and resemble the original GNUnet API. More details can be found here - https://summerofcode.withgoogle.com/projects/#6454361462931456

Jeff Burdges is my mentor and I will be working closely with him on this project.

All the code I produce will be on my own fork of gnunet-rs (on the gsoc branch) which can be found here - https://github.com/kc1212/gnunet-rs

Kelong

Read more Wednesday, May 25, 2016 - 12:18 kc1212

libbrandt GSoC kickoff

Heyho,

I was accepted for a Google Summer of Code project and will be developing an auctioning library. During the community bonding period I have so far read four papers relevant to the topic, choosen a few algorithms with slightly different properties which I want to implement and reconstructed one of them within the pari/gp CLI (see attachment). I also started with a first draft of the library interface which will be published in a git repository shortly.

I also made some decisions with my mentor, Christian Grothoff regarding implementation details and project goals:

  • The library will be called libbrandt in honor of Felix Brandt who developed the algorithms that will be used.
  • We want to support first price and (M+1)st price auctions.
  • The outcome of the auction can either be private (only revealed to the seller and winners) or public, choosen by the seller at auction creation time.
  • Selling multiple instances of the same item to the same agent will not be supported as the buyer can just place an arbitrary amount of bids by creating sibling agents.
  • Tie breaking is planned to favor the agent who registered first for an auction giving a motivation to potential buyers to sign up early.
  • Currency and actual price mapping is left to the library user.
Read more Tuesday, May 17, 2016 - 22:07 Markus Teich

Pages

Subscribe to Front page feed