Trait mpc_bench::Protocol [−][src]
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, 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.