End-to-end encrypted relay service designed for MPC/TSS applications built using the noise protocol and websockets for the transport layer.
The service facilitates secure communication between peers but it does not handle public key exchange nor meeting points.
For clients to use the relay service they must know the public key of the server and the public keys of all the participants for a session.
Creating a meeting point that shares the session identifier between participants to execute an MPC/TSS protocol is left up to the application. Typically, this can be achieved by encoding the session identifier in a URL and sharing the URL with all the participants.
cargo install mpc-relay
The client implementation uses web-sys for webassembly and tokio-tungstenite for other platforms.
You will need the rust toolchain and a few other tools:
cargo install cargo-make
cargo install wasm-pack
Minimum supported rust version (MSRV) is 1.68.1.
First generate a keypair:
cargo run -- generate-keypair server.pem
Then start the server:
cargo run -- server config.toml
cargo make doc
Generate a server key for the test specs and print the public key:
cargo run -- generate-keypair tests/test.pem
Copy the hex-encoded public key into the file tests/server_public_key.txt
.
To run the tests using the native client:
cargo make test
To test the web client using webassembly, first start a test server:
cargo run -- server -b 127.0.0.1:8008 tests/config.toml
Now you can run the webassembly tests:
cargo make test-wasm
The driver crate is GPLv3 all other code is either MIT or Apache-2.0.