9 releases

0.2.1 Feb 15, 2024
0.2.0 Nov 23, 2023
0.1.7 Jun 15, 2022
0.1.6 Sep 17, 2021
0.1.1 Jan 24, 2021

#215 in Asynchronous

Download history 228/week @ 2023-12-23 385/week @ 2023-12-30 633/week @ 2024-01-06 780/week @ 2024-01-13 479/week @ 2024-01-20 917/week @ 2024-01-27 983/week @ 2024-02-03 1068/week @ 2024-02-10 1416/week @ 2024-02-17 1024/week @ 2024-02-24 1636/week @ 2024-03-02 1737/week @ 2024-03-09 1960/week @ 2024-03-16 1447/week @ 2024-03-23 1113/week @ 2024-03-30 861/week @ 2024-04-06

5,582 downloads per month
Used in 6 crates (5 directly)

MIT/Apache

63KB
1K SLoC

round-based


lib.rs:

License: MIT Docs Crates io

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 abstractions Stream and Sink 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

Dependencies

~2.4–4.5MB
~85K SLoC