Skip to content

Commit

Permalink
Finalize version 0.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
lschoe committed Oct 1, 2018
1 parent 6655c2a commit 0e6aba0
Show file tree
Hide file tree
Showing 11 changed files with 81 additions and 62 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# MPyC -- Secure Multiparty Computation in Python.

MPyC supports secure *m*-party computation tolerating a dishonest minority of up to *t* passively corrupt parties,
where *m>=1* and *0 <= t <= (m-1)/2*. The underlying protocols are based on threshold secret sharing over prime
where *m &ge; 1* and *0 &le; t &le; (m-1)/2*. The underlying protocols are based on threshold secret sharing over prime
fields (using Shamir's threshold scheme as well as pseudorandom secret sharing).

The details of the secure computation protocols are mostly transparent due to the use of sophisticated operator overloading
Expand All @@ -19,7 +19,7 @@ See `demos` for usage examples.

## Notes:

1. Python 3.6 or higher required (Python 3.5 or lower is not sufficient).
1. Python 3.6+ (Python 3.5 or lower is not sufficient).

2. Installing package `gmpy2` is optional, but will considerably enhance the performance of `mpyc`.
On Linux, `pip install gmpy2` should do the job, but on Windows, this may fail with compiler errors.
Expand Down
4 changes: 2 additions & 2 deletions docs/mpyc.asyncoro.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="mpyc.html"><font color="#ffffff">mpyc</font></a>.asyncoro</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:c%3A%5Cusers%5Cberry%5Cappdata%5Croaming%5Cpython%5Cpython36%5Csite-packages%5Cmpyc-0.3-py3.6.egg%5Cmpyc%5Casyncoro.py">c:\users\berry\appdata\roaming\python\python36\site-packages\mpyc-0.3-py3.6.egg\mpyc\asyncoro.py</a></font></td></tr></table>
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:c%3A%5Cusers%5Cberry%5Cdocuments%5Cgithub%5Cmympyc%5Cmpyc%5Casyncoro.py">c:\users\berry\documents\github\mympyc\mpyc\asyncoro.py</a></font></td></tr></table>
<p><tt>This&nbsp;module&nbsp;provides&nbsp;the&nbsp;basic&nbsp;support&nbsp;for&nbsp;asynchronous&nbsp;communication&nbsp;and<br>
computation&nbsp;of&nbsp;secret-shared&nbsp;values.</tt></p>
<p>
Expand Down Expand Up @@ -140,7 +140,7 @@
&nbsp;<br>
An&nbsp;MPC&nbsp;coroutine&nbsp;is&nbsp;evaluated&nbsp;asychronously,&nbsp;returning&nbsp;empty&nbsp;placeholders.<br>
The&nbsp;type&nbsp;of&nbsp;the&nbsp;placeholders&nbsp;is&nbsp;defined&nbsp;either&nbsp;by&nbsp;a&nbsp;return&nbsp;annotation<br>
of&nbsp;the&nbsp;form&nbsp;-&gt;&nbsp;expression&nbsp;or&nbsp;by&nbsp;the&nbsp;first&nbsp;await&nbsp;expression&nbsp;in&nbsp;f.<br>
of&nbsp;the&nbsp;form&nbsp;"-&gt;&nbsp;expression"&nbsp;or&nbsp;by&nbsp;the&nbsp;first&nbsp;await&nbsp;expression&nbsp;in&nbsp;f.<br>
Return&nbsp;annotations&nbsp;can&nbsp;only&nbsp;be&nbsp;used&nbsp;for&nbsp;static&nbsp;types.</tt></dd></dl>
<dl><dt><a name="-returnType"><strong>returnType</strong></a>(rettype=None, *args)</dt><dd><tt>Define&nbsp;return&nbsp;type&nbsp;for&nbsp;MPC&nbsp;coroutines.<br>
&nbsp;<br>
Expand Down
2 changes: 1 addition & 1 deletion docs/mpyc.gmpy.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="mpyc.html"><font color="#ffffff">mpyc</font></a>.gmpy</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:c%3A%5Cusers%5Cberry%5Cappdata%5Croaming%5Cpython%5Cpython36%5Csite-packages%5Cmpyc-0.3-py3.6.egg%5Cmpyc%5Cgmpy.py">c:\users\berry\appdata\roaming\python\python36\site-packages\mpyc-0.3-py3.6.egg\mpyc\gmpy.py</a></font></td></tr></table>
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:c%3A%5Cusers%5Cberry%5Cdocuments%5Cgithub%5Cmympyc%5Cmpyc%5Cgmpy.py">c:\users\berry\documents\github\mympyc\mpyc\gmpy.py</a></font></td></tr></table>
<p><tt>This&nbsp;module&nbsp;collects&nbsp;all&nbsp;gmpy2&nbsp;functions&nbsp;used&nbsp;by&nbsp;MPyC.<br>
&nbsp;<br>
Stubs&nbsp;of&nbsp;limited&nbsp;functionality&nbsp;and&nbsp;efficiency&nbsp;are&nbsp;provided<br>
Expand Down
4 changes: 2 additions & 2 deletions docs/mpyc.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>mpyc</strong></big></big> (version 0.3)</font></td
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>mpyc</strong></big></big> (version 0.4)</font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:c%3A%5Cusers%5Cberry%5Cappdata%5Croaming%5Cpython%5Cpython36%5Csite-packages%5Cmpyc-0.3-py3.6.egg%5Cmpyc%5C__init__.py">c:\users\berry\appdata\roaming\python\python36\site-packages\mpyc-0.3-py3.6.egg\mpyc\__init__.py</a></font></td></tr></table>
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:c%3A%5Cusers%5Cberry%5Cdocuments%5Cgithub%5Cmympyc%5Cmpyc%5C__init__.py">c:\users\berry\documents\github\mympyc\mpyc\__init__.py</a></font></td></tr></table>
<p><tt>MPyC&nbsp;is&nbsp;a&nbsp;Python&nbsp;package&nbsp;for&nbsp;secure&nbsp;multi-party&nbsp;computation&nbsp;(MPC).<br>
&nbsp;<br>
MPyC&nbsp;provides&nbsp;a&nbsp;runtime&nbsp;for&nbsp;performing&nbsp;computations&nbsp;on&nbsp;secret-shared&nbsp;values,<br>
Expand Down
10 changes: 5 additions & 5 deletions docs/mpyc.pfield.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="mpyc.html"><font color="#ffffff">mpyc</font></a>.pfield</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:c%3A%5Cusers%5Cberry%5Cappdata%5Croaming%5Cpython%5Cpython36%5Csite-packages%5Cmpyc-0.3-py3.6.egg%5Cmpyc%5Cpfield.py">c:\users\berry\appdata\roaming\python\python36\site-packages\mpyc-0.3-py3.6.egg\mpyc\pfield.py</a></font></td></tr></table>
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:c%3A%5Cusers%5Cberry%5Cdocuments%5Cgithub%5Cmympyc%5Cmpyc%5Cpfield.py">c:\users\berry\documents\github\mympyc\mpyc\pfield.py</a></font></td></tr></table>
<p><tt>This&nbsp;module&nbsp;supports&nbsp;Galois&nbsp;(finite)&nbsp;fields&nbsp;of&nbsp;prime&nbsp;order.<br>
&nbsp;<br>
Function&nbsp;GF&nbsp;creates&nbsp;types&nbsp;implementing&nbsp;prime&nbsp;fields.<br>
Expand Down Expand Up @@ -91,9 +91,9 @@

<dl><dt><a name="PrimeFieldElement-__rmul__"><strong>__rmul__</strong></a> = <a href="#PrimeFieldElement-__mul__">__mul__</a>(self, other)</dt></dl>

<dl><dt><a name="PrimeFieldElement-__rsub__"><strong>__rsub__</strong></a>(self, other)</dt><dd><tt>Subtraction&nbsp;(reflected&nbsp;argument&nbsp;version).</tt></dd></dl>
<dl><dt><a name="PrimeFieldElement-__rsub__"><strong>__rsub__</strong></a>(self, other)</dt><dd><tt>Subtraction&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="PrimeFieldElement-__rtruediv__"><strong>__rtruediv__</strong></a>(self, other)</dt><dd><tt>Division&nbsp;(reflected&nbsp;argument&nbsp;version).</tt></dd></dl>
<dl><dt><a name="PrimeFieldElement-__rtruediv__"><strong>__rtruediv__</strong></a>(self, other)</dt><dd><tt>Division&nbsp;(with&nbsp;reflected&nbsp;arguments).</tt></dd></dl>

<dl><dt><a name="PrimeFieldElement-__sub__"><strong>__sub__</strong></a>(self, other)</dt><dd><tt>Subtraction.</tt></dd></dl>

Expand All @@ -109,13 +109,13 @@

<hr>
Class methods defined here:<br>
<dl><dt><a name="PrimeFieldElement-to_bytes"><strong>to_bytes</strong></a>(values)<font color="#909090"><font face="helvetica, arial"> from <a href="builtins.html#type">builtins.type</a></font></font></dt><dd><tt>Return&nbsp;an&nbsp;array&nbsp;of&nbsp;bytes&nbsp;representing&nbsp;the&nbsp;given&nbsp;list&nbsp;of&nbsp;values.<br>
<dl><dt><a name="PrimeFieldElement-to_bytes"><strong>to_bytes</strong></a>(x)<font color="#909090"><font face="helvetica, arial"> from <a href="builtins.html#type">builtins.type</a></font></font></dt><dd><tt>Return&nbsp;an&nbsp;array&nbsp;of&nbsp;bytes&nbsp;representing&nbsp;the&nbsp;given&nbsp;list&nbsp;of&nbsp;values&nbsp;x.<br>
&nbsp;<br>
Values&nbsp;are&nbsp;either&nbsp;integers&nbsp;or&nbsp;field&nbsp;elements.</tt></dd></dl>

<hr>
Static methods defined here:<br>
<dl><dt><a name="PrimeFieldElement-from_bytes"><strong>from_bytes</strong></a>(data)</dt><dd><tt>Return&nbsp;the&nbsp;list&nbsp;of&nbsp;elements&nbsp;represented&nbsp;by&nbsp;the&nbsp;given&nbsp;array&nbsp;of&nbsp;bytes.</tt></dd></dl>
<dl><dt><a name="PrimeFieldElement-from_bytes"><strong>from_bytes</strong></a>(data)</dt><dd><tt>Return&nbsp;the&nbsp;list&nbsp;of&nbsp;integers&nbsp;represented&nbsp;by&nbsp;the&nbsp;given&nbsp;array&nbsp;of&nbsp;bytes.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
Expand Down
47 changes: 29 additions & 18 deletions docs/mpyc.runtime.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="mpyc.html"><font color="#ffffff">mpyc</font></a>.runtime</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:c%3A%5Cusers%5Cberry%5Cappdata%5Croaming%5Cpython%5Cpython36%5Csite-packages%5Cmpyc-0.3-py3.6.egg%5Cmpyc%5Cruntime.py">c:\users\berry\appdata\roaming\python\python36\site-packages\mpyc-0.3-py3.6.egg\mpyc\runtime.py</a></font></td></tr></table>
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:c%3A%5Cusers%5Cberry%5Cdocuments%5Cgithub%5Cmympyc%5Cmpyc%5Cruntime.py">c:\users\berry\documents\github\mympyc\mpyc\runtime.py</a></font></td></tr></table>
<p><tt>The&nbsp;MPyC&nbsp;runtime&nbsp;module&nbsp;is&nbsp;used&nbsp;to&nbsp;execute&nbsp;secure&nbsp;multiparty&nbsp;computations.<br>
&nbsp;<br>
Parties&nbsp;perform&nbsp;computations&nbsp;on&nbsp;secret-shared&nbsp;values&nbsp;by&nbsp;exchanging&nbsp;messages.<br>
Expand All @@ -33,8 +33,9 @@
</td><td width="25%" valign=top><a href="os.html">os</a><br>
<a href="secrets.html">secrets</a><br>
<a href="mpyc.sectypes.html">mpyc.sectypes</a><br>
<a href="sys.html">sys</a><br>
</td><td width="25%" valign=top><a href="mpyc.thresha.html">mpyc.thresha</a><br>
<a href="ssl.html">ssl</a><br>
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
<a href="mpyc.thresha.html">mpyc.thresha</a><br>
<a href="time.html">time</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
Expand Down Expand Up @@ -64,7 +65,7 @@
the&nbsp;list&nbsp;of&nbsp;parties,&nbsp;etc.,&nbsp;and&nbsp;handles&nbsp;secret-shared&nbsp;values&nbsp;of&nbsp;type&nbsp;Share.<br>
&nbsp;<br>
1-party&nbsp;case&nbsp;is&nbsp;supported&nbsp;(with&nbsp;option&nbsp;to&nbsp;disable&nbsp;asynchronous&nbsp;evaluation).<br>
Threshold&nbsp;0&nbsp;(no&nbsp;corrupted&nbsp;parties)&nbsp;is&nbsp;supported&nbsp;for&nbsp;n-party&nbsp;case&nbsp;as&nbsp;well<br>
Threshold&nbsp;0&nbsp;(no&nbsp;corrupted&nbsp;parties)&nbsp;is&nbsp;supported&nbsp;for&nbsp;m-party&nbsp;case&nbsp;as&nbsp;well<br>
to&nbsp;enable&nbsp;distributed&nbsp;computation&nbsp;(without&nbsp;secret&nbsp;sharing).<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
Expand All @@ -90,7 +91,11 @@

<dl><dt><a name="Runtime-in_prod"><strong>in_prod</strong></a>(self, x, y)</dt><dd><tt>Secure&nbsp;dot&nbsp;product&nbsp;of&nbsp;x&nbsp;and&nbsp;y&nbsp;(one&nbsp;resharing).</tt></dd></dl>

<dl><dt><a name="Runtime-input"><strong>input</strong></a>(self, a, senders=None)</dt><dd><tt>Input&nbsp;a&nbsp;to&nbsp;the&nbsp;computation.</tt></dd></dl>
<dl><dt><a name="Runtime-input"><strong>input</strong></a>(self, x, senders=None)</dt><dd><tt>Input&nbsp;x&nbsp;to&nbsp;the&nbsp;computation.<br>
&nbsp;<br>
Value&nbsp;x&nbsp;is&nbsp;a&nbsp;secure&nbsp;number,&nbsp;or&nbsp;a&nbsp;list&nbsp;of&nbsp;secure&nbsp;numbers.<br>
The&nbsp;senders&nbsp;are&nbsp;the&nbsp;parties&nbsp;that&nbsp;provide&nbsp;an&nbsp;input.<br>
The&nbsp;default&nbsp;is&nbsp;to&nbsp;let&nbsp;every&nbsp;party&nbsp;be&nbsp;a&nbsp;sender.</tt></dd></dl>

<dl><dt><a name="Runtime-invert"><strong>invert</strong></a>(self, a)</dt><dd><tt>Secure&nbsp;logical&nbsp;inverse&nbsp;(not)&nbsp;of&nbsp;bit&nbsp;a.</tt></dd></dl>

Expand Down Expand Up @@ -120,19 +125,23 @@

<dl><dt><a name="Runtime-or_"><strong>or_</strong></a>(self, a, b)</dt><dd><tt>Secure&nbsp;logical&nbsp;or&nbsp;of&nbsp;bits&nbsp;a&nbsp;and&nbsp;b.</tt></dd></dl>

<dl><dt><a name="Runtime-output"><strong>output</strong></a>(self, a, receivers=None, threshold=None)</dt><dd><tt>Output&nbsp;the&nbsp;value&nbsp;of&nbsp;a&nbsp;to&nbsp;the&nbsp;receivers&nbsp;specified.</tt></dd></dl>
<dl><dt><a name="Runtime-output"><strong>output</strong></a>(self, x, receivers=None, threshold=None)</dt><dd><tt>Output&nbsp;the&nbsp;value&nbsp;of&nbsp;x&nbsp;to&nbsp;the&nbsp;receivers&nbsp;specified.<br>
&nbsp;<br>
Value&nbsp;x&nbsp;is&nbsp;a&nbsp;secure&nbsp;number,&nbsp;or&nbsp;a&nbsp;list&nbsp;of&nbsp;secure&nbsp;numbers.<br>
The&nbsp;receivers&nbsp;are&nbsp;the&nbsp;parties&nbsp;that&nbsp;will&nbsp;obtain&nbsp;the&nbsp;output.<br>
The&nbsp;default&nbsp;is&nbsp;to&nbsp;let&nbsp;every&nbsp;party&nbsp;be&nbsp;a&nbsp;receiver.</tt></dd></dl>

<dl><dt><a name="Runtime-pow"><strong>pow</strong></a>(self, a, n)</dt><dd><tt>Secure&nbsp;exponentation&nbsp;of&nbsp;a&nbsp;to&nbsp;public&nbsp;power&nbsp;n.</tt></dd></dl>
<dl><dt><a name="Runtime-pow"><strong>pow</strong></a>(self, a, b)</dt><dd><tt>Secure&nbsp;exponentation&nbsp;a&nbsp;raised&nbsp;to&nbsp;the&nbsp;power&nbsp;of&nbsp;b,&nbsp;for&nbsp;public&nbsp;integer&nbsp;b.</tt></dd></dl>

<dl><dt><a name="Runtime-prod"><strong>prod</strong></a>(self, x)</dt><dd><tt>Secure&nbsp;product&nbsp;of&nbsp;all&nbsp;elements&nbsp;in&nbsp;x&nbsp;(in&nbsp;log_2&nbsp;len(x)&nbsp;rounds).</tt></dd></dl>

<dl><dt><a name="Runtime-random"><strong>random</strong></a>(self, sftype, max=None)</dt><dd><tt>Secure&nbsp;random&nbsp;value&nbsp;of&nbsp;the&nbsp;given&nbsp;type&nbsp;in&nbsp;the&nbsp;given&nbsp;range.</tt></dd></dl>

<dl><dt><a name="Runtime-random_bit"><strong>random_bit</strong></a>(self, sftype)</dt><dd><tt>Secure&nbsp;random&nbsp;bit&nbsp;of&nbsp;the&nbsp;given&nbsp;type.</tt></dd></dl>
<dl><dt><a name="Runtime-random_bit"><strong>random_bit</strong></a>(self, sftype, signed=False)</dt><dd><tt>Secure&nbsp;random&nbsp;bit&nbsp;of&nbsp;the&nbsp;given&nbsp;type.</tt></dd></dl>

<dl><dt><a name="Runtime-random_bits"><strong>random_bits</strong></a>(self, sftype, m)</dt><dd><tt>m&nbsp;secure&nbsp;random&nbsp;bits&nbsp;of&nbsp;the&nbsp;given&nbsp;type.</tt></dd></dl>
<dl><dt><a name="Runtime-random_bits"><strong>random_bits</strong></a>(self, sftype, n, signed=False)</dt><dd><tt>n&nbsp;secure&nbsp;random&nbsp;bits&nbsp;of&nbsp;the&nbsp;given&nbsp;type.</tt></dd></dl>

<dl><dt><a name="Runtime-randoms"><strong>randoms</strong></a>(self, sftype, m, max=None)</dt><dd><tt>m&nbsp;secure&nbsp;random&nbsp;values&nbsp;of&nbsp;the&nbsp;given&nbsp;type&nbsp;in&nbsp;the&nbsp;given&nbsp;range.</tt></dd></dl>
<dl><dt><a name="Runtime-randoms"><strong>randoms</strong></a>(self, sftype, n, max=None)</dt><dd><tt>n&nbsp;secure&nbsp;random&nbsp;values&nbsp;of&nbsp;the&nbsp;given&nbsp;type&nbsp;in&nbsp;the&nbsp;given&nbsp;range.</tt></dd></dl>

<dl><dt><a name="Runtime-reciprocal"><strong>reciprocal</strong></a>(self, a)</dt><dd><tt>Secure&nbsp;reciprocal&nbsp;(multiplicative&nbsp;inverse)&nbsp;of&nbsp;a,&nbsp;for&nbsp;non-zero&nbsp;a.</tt></dd></dl>

Expand All @@ -146,7 +155,7 @@

<dl><dt><a name="Runtime-shutdown"><strong>shutdown</strong></a>(self)</dt><dd><tt>Shutdown&nbsp;the&nbsp;MPC&nbsp;runtime.<br>
&nbsp;<br>
Close&nbsp;all&nbsp;connections.</tt></dd></dl>
Close&nbsp;all&nbsp;connections,&nbsp;if&nbsp;any.</tt></dd></dl>

<dl><dt><a name="Runtime-start"><strong>start</strong></a>(self)</dt><dd><tt>Start&nbsp;the&nbsp;MPC&nbsp;runtime.<br>
&nbsp;<br>
Expand All @@ -172,15 +181,17 @@
Static methods defined here:<br>
<dl><dt><a name="Runtime-SecFld"><strong>SecFld</strong></a>(p=None, l=None)</dt><dd><tt>Secure&nbsp;prime&nbsp;field&nbsp;of&nbsp;l-bit&nbsp;order&nbsp;p.</tt></dd></dl>

<dl><dt><a name="Runtime-SecFxp"><strong>SecFxp</strong></a>(l=None, f=None, n=2)</dt><dd><tt>Secure&nbsp;l-bit&nbsp;fixed-point&nbsp;numbers&nbsp;with&nbsp;f-bit&nbsp;fractional&nbsp;part.</tt></dd></dl>
<dl><dt><a name="Runtime-SecFxp"><strong>SecFxp</strong></a>(l=None, f=None, p=None, n=2)</dt><dd><tt>Secure&nbsp;l-bit&nbsp;fixed-point&nbsp;numbers&nbsp;with&nbsp;f-bit&nbsp;fractional&nbsp;part.<br>
&nbsp;<br>
NB:&nbsp;if&nbsp;dividing&nbsp;secure&nbsp;fixed-point&nbsp;numbers,&nbsp;make&nbsp;sure&nbsp;that&nbsp;l&nbsp;=~&nbsp;2f.</tt></dd></dl>

<dl><dt><a name="Runtime-SecInt"><strong>SecInt</strong></a>(l=None, n=2)</dt><dd><tt>Secure&nbsp;l-bit&nbsp;integers.</tt></dd></dl>
<dl><dt><a name="Runtime-SecInt"><strong>SecInt</strong></a>(l=None, p=None, n=2)</dt><dd><tt>Secure&nbsp;l-bit&nbsp;integers.</tt></dd></dl>

<dl><dt><a name="Runtime-coroutine"><strong>coroutine</strong></a> = mpc_coro(f)</dt><dd><tt>Decorator&nbsp;turning&nbsp;coroutine&nbsp;f&nbsp;into&nbsp;an&nbsp;MPC&nbsp;coroutine.<br>
&nbsp;<br>
An&nbsp;MPC&nbsp;coroutine&nbsp;is&nbsp;evaluated&nbsp;asychronously,&nbsp;returning&nbsp;empty&nbsp;placeholders.<br>
The&nbsp;type&nbsp;of&nbsp;the&nbsp;placeholders&nbsp;is&nbsp;defined&nbsp;either&nbsp;by&nbsp;a&nbsp;return&nbsp;annotation<br>
of&nbsp;the&nbsp;form&nbsp;-&gt;&nbsp;expression&nbsp;or&nbsp;by&nbsp;the&nbsp;first&nbsp;await&nbsp;expression&nbsp;in&nbsp;f.<br>
of&nbsp;the&nbsp;form&nbsp;"-&gt;&nbsp;expression"&nbsp;or&nbsp;by&nbsp;the&nbsp;first&nbsp;await&nbsp;expression&nbsp;in&nbsp;f.<br>
Return&nbsp;annotations&nbsp;can&nbsp;only&nbsp;be&nbsp;used&nbsp;for&nbsp;static&nbsp;types.</tt></dd></dl>

<dl><dt><a name="Runtime-gather"><strong>gather</strong></a> = gather_shares(*obj)</dt><dd><tt>Return&nbsp;all&nbsp;the&nbsp;results&nbsp;for&nbsp;the&nbsp;given&nbsp;futures&nbsp;(shared&nbsp;values).</tt></dd></dl>
Expand All @@ -204,15 +215,15 @@
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>

<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-generate_configs"><strong>generate_configs</strong></a>(n, addresses)</dt><dd><tt>Generate&nbsp;party&nbsp;configurations.<br>
<td width="100%"><dl><dt><a name="-generate_configs"><strong>generate_configs</strong></a>(m, addresses)</dt><dd><tt>Generate&nbsp;party&nbsp;configurations.<br>
&nbsp;<br>
Generates&nbsp;n&nbsp;party&nbsp;configurations&nbsp;with&nbsp;thresholds&nbsp;0&nbsp;up&nbsp;to&nbsp;(n-1)//2.<br>
Generates&nbsp;m&nbsp;party&nbsp;configurations&nbsp;with&nbsp;thresholds&nbsp;0&nbsp;up&nbsp;to&nbsp;(m-1)//2.<br>
addresses&nbsp;is&nbsp;a&nbsp;list&nbsp;of&nbsp;'(host,&nbsp;port)'&nbsp;pairs,&nbsp;specifying&nbsp;the<br>
hostnames&nbsp;and&nbsp;port&nbsp;numbers&nbsp;for&nbsp;each&nbsp;party.&nbsp;Moreover,&nbsp;the&nbsp;keys<br>
used&nbsp;in&nbsp;pseudorandom&nbsp;secret&nbsp;sharing&nbsp;(PRSS)&nbsp;are&nbsp;generated.<br>
&nbsp;<br>
The&nbsp;n&nbsp;party&nbsp;configurations&nbsp;are&nbsp;returned&nbsp;as&nbsp;a&nbsp;list&nbsp;of&nbsp;ConfigParser<br>
instances,&nbsp;which&nbsp;be&nbsp;saved&nbsp;in&nbsp;n&nbsp;separate&nbsp;INI-files.</tt></dd></dl>
The&nbsp;m&nbsp;party&nbsp;configurations&nbsp;are&nbsp;returned&nbsp;as&nbsp;a&nbsp;list&nbsp;of&nbsp;ConfigParser<br>
instances,&nbsp;which&nbsp;be&nbsp;saved&nbsp;in&nbsp;m&nbsp;separate&nbsp;INI-files.</tt></dd></dl>
<dl><dt><a name="-setup"><strong>setup</strong></a>()</dt><dd><tt>Setup&nbsp;a&nbsp;runtime.</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
Expand Down
Loading

0 comments on commit 0e6aba0

Please sign in to comment.