Expand description
An MPC framework that unifies and simplifies the way of developing and working with multiparty protocols (e.g. threshold signing, random beacons, etc.).
§Goals
- Async friendly
Async is the most simple and efficient way of doing networking in Rust - Simple, configurable
Protocol can be carried out in a few lines of code: check out examples. - Independent of networking layer
We use abstractionsStream
andSink
to receive and send messages.
§Networking
In order to run an MPC protocol, transport layer needs to be defined. All you have to do is to
implement Delivery
trait which is basically a stream and a sink for receiving and sending messages.
Message delivery should meet certain criterias that differ from protocol to protocol (refer to the documentation of the protocol you’re using), but usually they are:
- Messages should be authenticated
Each message should be signed with identity key of the sender. This implies having Public Key Infrastructure. - P2P messages should be encrypted
Only recipient should be able to learn the content of p2p message - Broadcast channel should be reliable
Some protocols may require broadcast channel to be reliable. Simply saying, when party receives a broadcast message over reliable channel it should be ensured that everybody else received the same message.
§Features
sim
enables protocol execution simulation, seesim
modulesim-async
enables protocol execution simulation with tokio runtime, seesim::async_env
module
state-machine
provides ability to carry out the protocol, defined as async function, via Sync API, seestate_machine
modulederive
is needed to useProtocolMessage
proc macroruntime-tokio
enables tokio-specific implementation of async runtime
§Join us in Discord!
Feel free to reach out to us in Discord!
Re-exports§
pub use futures_util::Sink;
pub use futures_util::SinkExt;
pub use futures_util::Stream;
pub use futures_util::StreamExt;
pub use self::party::Mpc;
pub use self::party::MpcParty;
pub use self::rounds_router::ProtocolMessage;
pub use self::rounds_router::RoundMessage;
Modules§
- Party of MPC protocol
- Routes incoming MPC messages between rounds
- Async runtime abstraction
- sim
sim
Multiparty protocol simulation - state_
machine state-machine
Wraps the protocol defined as async function and provides sync API to execute it
Structs§
- Incoming message
- Outgoing message
Enums§
- Destination of an outgoing message
- Message type (broadcast or p2p)
Traits§
- Networking abstraction
Type Aliases§
- ID of received message
- Index of party involved in the protocol
Derive Macros§
- Protocol
Message derive
DerivesProtocolMessage
andRoundMessage
traits