Module mpc

Module mpc 

Source
Expand description

Party of MPC protocol

MpcParty is party of MPC protocol, connected to network, ready to start carrying out the protocol.

use round_based::{Incoming, Outgoing};

async fn keygen<M>(party: M, i: u16, n: u16) -> Result<KeyShare>
where
    M: round_based::Mpc<Msg = KeygenMsg>
{
    // ...
}
async fn connect() ->
    impl futures::Stream<Item = Result<Incoming<KeygenMsg>>>
        + futures::Sink<Outgoing<KeygenMsg>, Error = Error>
        + Unpin
{
    // ...
}

let delivery = connect().await;
let party = round_based::mpc::connected(delivery);

let keyshare = keygen(party, i, n).await?;

Re-exports§

pub use self::party::Halves;
pub use self::party::MpcParty;

Modules§

party
Provides MpcParty, default engine for MPC protocol execution that implements Mpc and MpcExecution traits

Traits§

Mpc
Abstracts functionalities needed for creating an MPC protocol execution.
MpcExecution
Abstracts functionalities needed for MPC protocol execution
ProtocolMsg
Message of MPC protocol
RoundMsg
Round message
SendMany
Buffer, optimized for sending many messages at once

Functions§

connected
Construct an MpcParty that can be used to carry out MPC protocol
connected_halves
Construct an MpcParty that can be used to carry out MPC protocol

Type Aliases§

CompleteRoundErr
Alias to <<M as Mpc>::Exec as MpcExecution>::CompleteRoundErr<E>