pub trait Protocol<I: 'static + Send, O: 'static + Debug + Send> {
    fn run_party(
        self,
        id: usize,
        n_parties: usize,
        this_party: Party,
        input: I
    ) -> (PartyStats, O); fn evaluate(
        self,
        n_parties: usize,
        inputs: Vec<I>
    ) -> (Vec<PartyStats>, Vec<O>)
    where
        Self: 'static + Copy + Send
, { ... } }
Expand description

A multi-party computation protocol, where each party takes in an input of type I and computes an output of type O. The code a party runs should be implemented in the run_party method. The Protocol should implement the Copy trait, as the run_party method will be called with a fresh copy of the Protocol (and its parameters) for each invocation.

Required Methods

Code to run one party in the protocol. The party gets a new copy of this protocol.

Provided Methods

Evaluates the protocol for a given number of parties n_parties, each with the input provided by the inputs field.

Implementors