Git Product home page Git Product logo

riffle's Introduction

Riffle

This is a research prototype of Riffle, an anonymous communication system presented at PETS2016. This models the performance of the system and carries out the core parts of the protocol, but not necessarily in a secure way. In other words, this prototype implements most of what's described in the paper, but does NOT make any guarantees about security. It is almost certainly full of security bugs. Please do not adapt this code to use for real anonymous communication.

Requirements

Requires Go 1.5 or later for building the code, and the scripts are written for python2 (not 3).

It uses the DeDis Kyber library as well as SecretBox of NaCl and sha3.

Components

  • server: the mixing servers in the network (assumed to be handful many)

  • client: the clients who either send or receive messages

Building Riffle

Build the two by running

$ go install ./client ./server

Running tests

Clients can run in two modes: file sharing and microblogging.

File sharing

For file sharing, we assume each client has a file and they download a file. This prototype assumes the "optimal" case, in that in each round, there is a 1 to 1 mapping between files and clients. In a real implementation where this is not the case, there are a few solutions, the easiest being having the client request the file again if the file (block) is not available at the end of the round (but these solutions have not been implemented in this mode). In each round, a chunk of file is uploaded.

To run this, you need to first generate the files. To do so, run

$ python2 ./scripts/gen_file.py <num_clients> <num_blocks> <block_size> <dst_dir>
  • num_clients: number of clients in the system, and thus number of files to generate

  • num_blocks: number of blocks (chunks) in a file, and thus number of rounds

  • block_size: size of each block. This needs to be the same as the block size in params.go in lib.

  • dst_dir: destination folder for all the files. You will want to just create a folder (e.g., called files).

Microblogging

For microblogging, each client submits a small message, and the result is broadcast to everyone. Currently, it just sends random messages.

Running a local test

You can run a local test, where each server runs on a port on localhost, by running

$ python2 ./scripts/test_local.py <num_servers> <num_clients> <mode> <file_dir>
  • num_servers: number of servers in the test

  • num_clients: number of clients

  • mode: 'm' for microblogging test, and 'f' for file sharing test

  • file_dir: where the files are, if running file sharing test. Should be the same as dst_dir for gen_file script.

Running remote test

Coming soon. A modified version of the local test script can do this easily.

riffle's People

Contributors

davidlazar avatar kwonalbert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

riffle's Issues

The source code has no license

The lack of license means All rights reserved and it may affect the adoption (for example, porting the ode to other languages or distributing the code).

1)cannot find afs/client and 2)g.Secret undefined

go get github.com/dedis/crypto
go get golang.org/x/crypto/nacl/secretbox
go get golang.org/x/crypto/sha3
go get github.com/dedis/crypto/random

cd riffle
go build
test.go:9:2: cannot find package "afs/client" in any of:
from $GOROOT
from $GOPATH

cd server
go build server.go
./utils.go:96: g.Secret undefined (type abstract.Group has no field or method Secret)
./utils.go:114: g.Secret undefined (type abstract.Group has no field or method Secret)
./utils.go:129: g.Secret undefined (type abstract.Group has no field or method Secret)
./utils.go:136: undefined: abstract.Secret

[Discussion] Situation Report / ROADMAP

Hi, Albert!

I'm very interested in this project, can you describe your vision for it?

For instance, should I expect that this repo will become part of a a 'project' in the traditional F/OSS sense (ex., Tor, I2P, IPFS, etc.)? Or, is it simply a sandbox for your own academic experiments?

Not that there's a right answer, but as a potential contributor I'd love to know more about your plans here.

Thanks!
R

Add usage section to README.md

Running the client or server results in a failure to read the "servers file". A sample of this file as well as a more detailed explanation of the command line arguments would be helpful.

gen_file.py seems to generate some random files to serve, but it's not obvious what to do with them. What values should we choose for block size and chunks?

spawn_remote.py provides some clues, though it references stuff on your AFS we probably don't have access to.

Also add a link to your paper.

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.