Anonymours communication system with multi-device support.
Final Project for UCSC CSE 108C
./sparta
- The core SPARTA implementation which runs completely inside an enclave.
./trojan
- GRPC proxy to allow clients to connect with sparta.
./athens
- CLI and Proxy code to interact with trojan.
./agora - agora = meeting place
- the common crate that defines some constants about the entire system
./sator - sator = seeding place
- Benchmarking harness for sparta's performance
Note: If you have any trouble with the following instructions, please email me at sjammish@ucsc.edu.
-
Create an AWS Nitro EC2 instance
aws ec2 run-instances --image-id ami-04acda42f3629e02b --count 1 --instance-type m5.xlarge --key-name \<Your key name here\> --enclave-options "Enabled=true"
Here are the AWS docs
- Expand the root partition of your EC2 instance to atleast 32GB. (Probably want to use the console for this)
Here are the AWS docs
- Configure Security Groups for your EC2 instance by allowing traffic in and out of port 50051 for all tcp traffic coming from anywhere, also probably on port 22 to allow for ssh.
Here are the AWS docs
-
Connect to your EC2 instance via ssh Here are the AWS docs
-
Install the Just command runner
# create ~/bin
mkdir -p ~/bin
# download and extract just to ~/bin/just
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to ~/bin
# add `~/bin` to the paths that your shell searches for executables
# this line should be added to your shells initialization file,
# e.g. `~/.bashrc` or `~/.zshrc`
export PATH="$PATH:$HOME/bin"
# just should now be executable
just --help -
Run
just init, which will install the necessary packages for you. -
Then run
just sparta, which will start both the enclave and the trojan proxy for you.
- Set the constants you want for the system in
./agora/src/lib.rs. - Run
just killto kill the enclave and trojan if you already have them running. - Run
just spartato compile sparta with the new constants. - Run
just benchto run the benchmark
- Ensure you have sparta running.
- Set the
TROJAN_IPvariable in./agora/src/lib.rsto the public ip address of your EC2 instance. - Ensure you have the right ports open for your instance, as mentioned earlier.
- Install rust on the computer you want to run the proxy on.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Install the protobuf compiler for your system.
https://grpc.io/docs/protoc-installation/
- Install the just command runner on your local computer.
cargo install just
-
Run
just proxy create-userto create your user -
Run
just cli registeron any device you want to use. -
Run
just proxy add-device -k <KEY>where KEY is the output of the previous command. -
Run
just proxy run -hto see what arguments the run command takes in. -
Run
just proxy run ....with whichever args you like! -
Run
just cli -hto see what options you have from the cli! -
Use however you want now!