A Distributed Metadata-Private Messaging System
SOSP Paper: Nirvan Tyagi, Yossi Gilad, Derek Leung, Matei Zaharia, and Nickolai Zeldovich. Stadium: A Distributed Metadata-Private Messaging System. SOSP 2017.
ePrint: Nirvan Tyagi, Yossi Gilad, Derek Leung, Matei Zaharia, and Nickolai Zeldovich. Stadium: A Distributed Metadata-Private Messaging System. Cryptology ePrint Archive, Report 2016/943. http://eprint.iacr.org/2016/943. 2016.
The system consists of several main components. A participating stadium server must deploy a shuffle server, shuffle client, and the stadium server and stadium coordinator.
This system also contains an optimized version of Stephanie Bayer and Jens Groth's verifiable shuffle.
Bayer and Groth Verifiable Shuffles: Stephanie Bayer and Jens Groth. Efficient zero-knowledge argument for correctness of a shuffle. EUROCRYPT 2012.
The original version of the verifiable shuffle is here. Our modified version of the verified shuffle is here and mirrored here.
We modified Bayer and Groth's verifiable shuffle, decreasing latency by more than an order of magnitude. We optimized the shuffle by applying the following improvements:
- Added OpenMP directives to optimize key operations, such as Brickell et al.'s multi-exponentiation routines.
- Replaced the use of integers with Moon and Langley's implementation of Bernstein's curve25519 group. (We avoid point compression and decompression in intermediary operations to improve speed.)
- Improved point serialization and deserialization with byte-level representations of the data.
- Taking into account different performance profile of curve25519, replaced some multi-exponentiation routines with naive version and tweaked multi-exponentiation window sizes. The bottleneck for the shuffle is currently in multi-exponentiation routines.
- Added some more small optimizations (e.g. powers of 2, reduce dynamic memory allocations, etc.)
This setup describes a deployment on an Ubuntu machine. Adapt commands as needed for another OS
- Install dependencies from
apt
. sudo apt-get install make, g++, libssl-dev, libgmp3-dev, libboost-all-dev, libtool - Install NTL and add to library path. Do not install
libntl-dev
fromapt
! That version of the library is not thread-safe, which will cause mysterious crashes. Make sure to build it from source.
wget http://www.shoup.net/ntl/ntl-9.8.1.tar.gz
gunzip ntl-9.8.1.tar.gz
tar xf ntl-9.8.1.tar
cd ntl-9.8.1/src
./configure NTL_THREADS=on NTL_GMP_LIP=on NTL_THREAD_BOOST=on SHARED=on
make
sudo make install
export LD_LIBRARY_PATH=/usr/local/lib/:\$LD_LIBRARY_PATH
- Set up your go workspace with src, bin, and pkg directories as outlined here
- Clone Stadium repository within workspace.
git clone https://github.com/nirvantyagi/stadium.git
- Build verifiable shuffle library and add to library path.
cd stadium/groth
make clean; make lib
chmod +x libshuffle.so
sudo cp libshuffle.so /usr/local/lib/
- Build Stadium binaries.
go install stadium/groth stadium/stadium stadium/coordinator stadium/server`
The following commands must be run from a directory that contains stadium/groth/config
.
If you have your go workspace bin in bath, cd stadium/groth
to run, else copy stadium/groth/config
to whatever directory you will run the binaries from.
In 4 different terminals, run each of the following commands.
server -conf config/three-server.conf -id 0
server -conf config/three-server.conf -id 1
server -conf config/three-server.conf -id 2
coordinator -conf config/three-server.conf
Steps for benchmarking the groth
crypto library:
-
Follow the same instructions for Installing Stadium dependencies.
-
Build and run the benchmark.
Go to stadium/groth/
and run make test
. This will produce the test, which you can run with ./test
.
- Benchmarking on AWS
Helper scripts you may find useful lie inside aws/
. Note that you will need to configure your own AWS account and certificates to run the benchmarks.