Giter Site home page Giter Site logo

weikengchen / pung Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pung-project/pung

0.0 3.0 0.0 59 KB

Pung: a fully untrusted private communication system

License: Creative Commons Zero v1.0 Universal

Rust 88.92% Cap'n Proto 0.38% Python 3.83% C++ 6.87%

pung's Introduction

Pung: Unobservable communication over fully untrusted infrastructure

Build Status

Pung is a (research) communication system where users can privately talk to each other over a fully untrusted channel. In particular, Pung provably hides all content and metadata in a conversation while withstanding global adversaries. See our paper for details about the protocol and its guarantees.

Compiling Pung

Pung is written in Rust and compiles under the nightly compiler (nighly is required for our benchmarking framework). If you wish to use the nightly compiler as default simply run:

$ rustup install nightly
$ rustup default nightly

Alternatively, you can run the following from the Pung directory to set the nightly compiler only for Pung.

$ rustup install nightly
$ rustup override set nightly

Dependencies

Pung depends on Cap'n Proto for message serialization, and a modified version of XPIR. To get both dependencies simply run the following within Pung's directory:

$ git submodule init
$ git submodule update

Installing Cap'n Proto

$ cd deps/capnproto/c++
$ ./setup-autotools.sh
$ autoreconf -i
$ ./configure
$ make check
$ sudo make install

Installing XPIR's dependencies

XPIR depends on boost >= 1.55, gmp, and mpfr. You can install them as follows.

Ubuntu 14.04 (or later) / Debian:

$ sudo apt-get install libboost1.55-all-dev libmpfr-dev libgmp-dev

Arch:

$ sudo pacman -S boost mpfr gmp

Gentoo:

$ sudo emerge dev-libs/boost dev-libs/mpfr dev-libs/gmp

Note: there is no need to compile or install XPIR. It will be built and linked automatically when Pung is compiled (see below).

Compiling Pung's binaries

To compile Pung with debug symbols simply run: $ cargo build. The resulting binaries will be: target/debug/client and target/debug/server. To compile PUng with compiler optimizations run: $ cargo build --release. The resulting binaries will be: target/release/client and target/release/server.

Running Pung's microbenchmarks

All our microbenchmarks are found in the benches folder. We use the [Criterion] (https://github.com/japaric/criterion.rs) library to measure all running times and provide useful statistics.

To run all microbenchmarks, simply type: $ cargo bench -- --test --nocapture bench. The results will be found in the .criterion folder.

To run a single (or a set of) microbenchmark, simply type: $ cargo bench -- --test --nocapture [PREFIX]. Where [PREFIX] is a prefix of the name of the microbenchmark(s) that you wish to run. For instance, since all our microbenchmarks start with "bench", using "bench" as the prefix runs all of them. However, if one wished to only run the PIR microbenchmarks it is sufficient to pass in "bench_pir" as the prefix.

Running Pung

The first step is to launch the server (the -m flag tells it to expect 2 messages each round):

$ ./target/release/server -m 2

Pass in --help to see available options. The second step is to launch the client:

$ ./target/release/client -n "user1" -p "user2" -x "secret" -r 10 &
$ ./target/release/client -n "user2" -p "user1" -x "secret" -r 10

The above will run two clients with ids "user1" and "user2" that will communicate with each other using secret "secret" for 10 rounds. One can also run a single client by having it talk to itself (i.e., passing the same argument to -n and -p for the client and setting the server to expect only one message: -m 1).

Pass in --help to see available options. It is important that the client and the server are run with the same options (e.g., retrieval type, optimization, number of buckets).

See launch_clients.py and launch_servers.py in scripts for instructions on how to run multiple clients and servers.

pung's People

Contributors

sga001 avatar srinathtv avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.