next up previous
Next: About this document ... Up: Protocol Structure Previous: Header

Body

The body of the protocol consists of a list of calculations and operations each party carries out given the initialization parameters. Parties may select random field elements, compute specific values, send values to other parties or return specific values. Single operations may be looped.

A select statement randomly selects an element from a specified field and assigns it to a given variable name. Selection may be looped using a for statement:

PartyName selects var in FieldName
PartyName selects var[counter] in FieldName for counter := num1 to num2

Computes statements assign the result of an expression to a variable name. Computations may also be looped:

PartyName computes var := Expression
PartyName computes var[counter] := Expression for counter := num1 to num2

Send statements send a particular variable to a specified party. An as operator may specify what the local variable name will be for the receiving party:

PartyName sends var to PartyName2 PartyName sends var as var2 to PartyName2

Return statements just specify a variable name. There may be multiple return statements to return multiple values:

PartyName returns var
PartyName returns var2

Actions for identical multiple parties may be designated using an every keyword:

every PartyName[counter] computes var[counter] := Expression
PartyName sends var[counter] to every MultiParty[counter]

This example will illustrate all the main operations. Alice selects a random $ x$ and an array of $ n$ values in $ \mathbb{Z}_p$. Alice then computes $ (x+1)*[\frac{y_i}{-2}]^3 \bmod p$ for each $ i$ and sends the result to each of $ n$ identical players. The receiving players return both the received value and its hash:

\framebox{
\vbox{
\textbf{protocol} Example2 \\
parameters (n, p) \\
\textbf{p...
...Player[i] \textbf{returns} z \\
\textbf{every} Player[i] \textbf{returns} w
}
}


next up previous
Next: About this document ... Up: Protocol Structure Previous: Header
Stephen Weis 2002-06-10