Skip to content

Commit

Permalink
Add seclists and finalize docs v0.6. (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
lschoe authored Dec 31, 2019
1 parent 89c5b98 commit 4e68b81
Show file tree
Hide file tree
Showing 23 changed files with 1,897 additions and 528 deletions.
2 changes: 1 addition & 1 deletion demos/cnnmnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

def scale_to_int(f):
if secnum.field.frac_length == 0:
scale = lambda a: secnum(round(a * f))
scale = lambda a: secnum(int(round(a * f))) # force Python integers
else:
scale = secnum
return np.vectorize(scale)
Expand Down
20 changes: 11 additions & 9 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<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.5)</font></td
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>mpyc</strong></big></big> (version 0.6)</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%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>
Expand All @@ -16,9 +16,9 @@
The&nbsp;MPC&nbsp;protocols&nbsp;are&nbsp;based&nbsp;on&nbsp;Shamir's&nbsp;threshold&nbsp;secret&nbsp;sharing&nbsp;scheme<br>
and&nbsp;withstand&nbsp;passive&nbsp;adversaries&nbsp;controlling&nbsp;less&nbsp;than&nbsp;half&nbsp;of&nbsp;the&nbsp;parties.<br>
&nbsp;<br>
Secure&nbsp;finite&nbsp;field&nbsp;arithmetic&nbsp;is&nbsp;supported&nbsp;for&nbsp;fields&nbsp;of&nbsp;prime&nbsp;order<br>
and&nbsp;fields&nbsp;of&nbsp;characteristic&nbsp;two.&nbsp;Secure&nbsp;integer&nbsp;and&nbsp;fixed-point&nbsp;arithmetic<br>
is&nbsp;supported&nbsp;for&nbsp;parameterized&nbsp;number&nbsp;ranges,&nbsp;also&nbsp;including&nbsp;support<br>
Secure&nbsp;finite&nbsp;field&nbsp;arithmetic&nbsp;is&nbsp;supported&nbsp;for&nbsp;fields&nbsp;of&nbsp;arbitrary&nbsp;order,&nbsp;as<br>
long&nbsp;as&nbsp;the&nbsp;order&nbsp;exceeds&nbsp;the&nbsp;number&nbsp;of&nbsp;parties.&nbsp;Secure&nbsp;integer&nbsp;and&nbsp;fixed-point<br>
arithmetic&nbsp;is&nbsp;supported&nbsp;for&nbsp;parameterized&nbsp;number&nbsp;ranges,&nbsp;also&nbsp;including&nbsp;support<br>
for&nbsp;comparison&nbsp;and&nbsp;bitwise&nbsp;operations.<br>
These&nbsp;operations&nbsp;are&nbsp;all&nbsp;available&nbsp;via&nbsp;Python's&nbsp;operator&nbsp;overloading.<br>
Some&nbsp;operations&nbsp;for&nbsp;container&nbsp;datatypes&nbsp;holding&nbsp;secret-shared&nbsp;data&nbsp;items<br>
Expand All @@ -31,20 +31,22 @@

<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="mpyc.asyncoro.html">asyncoro</a><br>
<a href="mpyc.bfield.html">bfield</a><br>
<a href="mpyc.gf2x.html">gf2x</a><br>
<a href="mpyc.finfields.html">finfields</a><br>
<a href="mpyc.gfpx.html">gfpx</a><br>
</td><td width="25%" valign=top><a href="mpyc.gmpy.html">gmpy</a><br>
<a href="mpyc.pfield.html">pfield</a><br>
<a href="mpyc.mpctools.html">mpctools</a><br>
<a href="mpyc.random.html">random</a><br>
</td><td width="25%" valign=top><a href="mpyc.runtime.html">runtime</a><br>
<a href="mpyc.seclists.html">seclists</a><br>
<a href="mpyc.sectypes.html">sectypes</a><br>
</td><td width="25%" valign=top><a href="mpyc.statistics.html">statistics</a><br>
<a href="mpyc.thresha.html">thresha</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>

<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>__license__</strong> = 'Apache License 2.0'</td></tr></table>
<td width="100%"><strong>__license__</strong> = 'MIT License'</td></tr></table>
</body></html>
19 changes: 9 additions & 10 deletions docs/mpyc.asyncoro.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<font color="#000000" face="helvetica, arial"><a name="SharesExchanger">class <strong>SharesExchanger</strong></a>(<a href="asyncio.protocols.html#Protocol">asyncio.protocols.Protocol</a>)</font></td></tr>

<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="#SharesExchanger">SharesExchanger</a>(peer_pid=None)<br>
<td colspan=2><tt><a href="#SharesExchanger">SharesExchanger</a>(rt,&nbsp;peer_pid=None)<br>
&nbsp;<br>
Send&nbsp;and&nbsp;receive&nbsp;shares.<br>
&nbsp;<br>
Expand All @@ -58,15 +58,15 @@
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="SharesExchanger-__init__"><strong>__init__</strong></a>(self, peer_pid=None)</dt><dd><tt>Initialize&nbsp;self.&nbsp;&nbsp;See&nbsp;help(type(self))&nbsp;for&nbsp;accurate&nbsp;signature.</tt></dd></dl>
<dl><dt><a name="SharesExchanger-__init__"><strong>__init__</strong></a>(self, rt, peer_pid=None)</dt><dd><tt>Initialize&nbsp;self.&nbsp;&nbsp;See&nbsp;help(type(self))&nbsp;for&nbsp;accurate&nbsp;signature.</tt></dd></dl>

<dl><dt><a name="SharesExchanger-close_connection"><strong>close_connection</strong></a>(self)</dt><dd><tt>Close&nbsp;connection&nbsp;with&nbsp;the&nbsp;peer.</tt></dd></dl>

<dl><dt><a name="SharesExchanger-connection_lost"><strong>connection_lost</strong></a>(self, exc)</dt><dd><tt>Called&nbsp;when&nbsp;the&nbsp;connection&nbsp;is&nbsp;lost&nbsp;or&nbsp;closed.<br>
<dl><dt><a name="SharesExchanger-connection_lost"><strong>connection_lost</strong></a>(self, exc)</dt><dd><tt>Called&nbsp;when&nbsp;the&nbsp;connection&nbsp;with&nbsp;the&nbsp;peer&nbsp;is&nbsp;lost&nbsp;or&nbsp;closed.<br>
&nbsp;<br>
The&nbsp;argument&nbsp;is&nbsp;an&nbsp;exception&nbsp;object&nbsp;or&nbsp;None&nbsp;(the&nbsp;latter<br>
meaning&nbsp;a&nbsp;regular&nbsp;EOF&nbsp;is&nbsp;received&nbsp;or&nbsp;the&nbsp;connection&nbsp;was<br>
aborted&nbsp;or&nbsp;closed).</tt></dd></dl>
If&nbsp;the&nbsp;connection&nbsp;is&nbsp;closed&nbsp;normally&nbsp;(during&nbsp;shutdown)&nbsp;then&nbsp;exc&nbsp;is&nbsp;None.<br>
Otherwise,&nbsp;if&nbsp;the&nbsp;connection&nbsp;is&nbsp;lost&nbsp;unexpectedly,&nbsp;exc&nbsp;may&nbsp;indicate&nbsp;the<br>
cause&nbsp;(but&nbsp;exc&nbsp;is&nbsp;None&nbsp;is&nbsp;still&nbsp;possible).</tt></dd></dl>

<dl><dt><a name="SharesExchanger-connection_made"><strong>connection_made</strong></a>(self, transport)</dt><dd><tt>Called&nbsp;when&nbsp;a&nbsp;connection&nbsp;is&nbsp;made.<br>
&nbsp;<br>
Expand Down Expand Up @@ -137,10 +137,10 @@
<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="-gather_shares"><strong>gather_shares</strong></a>(*obj)</dt><dd><tt>Gather&nbsp;all&nbsp;results&nbsp;for&nbsp;the&nbsp;given&nbsp;futures&nbsp;(shared&nbsp;values).</tt></dd></dl>
<td width="100%"><dl><dt><a name="-gather_shares"><strong>gather_shares</strong></a>(rt, *obj)</dt><dd><tt>Gather&nbsp;all&nbsp;results&nbsp;for&nbsp;the&nbsp;given&nbsp;futures&nbsp;(shared&nbsp;values).</tt></dd></dl>
<dl><dt><a name="-mpc_coro"><strong>mpc_coro</strong></a>(func, pc=True)</dt><dd><tt>Decorator&nbsp;turning&nbsp;coroutine&nbsp;func&nbsp;into&nbsp;an&nbsp;MPyC&nbsp;coroutine.<br>
&nbsp;<br>
An&nbsp;MPyC&nbsp;coroutine&nbsp;is&nbsp;evaluated&nbsp;asychronously,&nbsp;returning&nbsp;empty&nbsp;placeholders.<br>
An&nbsp;MPyC&nbsp;coroutine&nbsp;is&nbsp;evaluated&nbsp;asynchronously,&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;func.<br>
Return&nbsp;annotations&nbsp;can&nbsp;only&nbsp;be&nbsp;used&nbsp;for&nbsp;static&nbsp;types.</tt></dd></dl>
Expand All @@ -154,6 +154,5 @@
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>

<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>pc_level</strong> = 0<br>
<strong>runtime</strong> = None</td></tr></table>
<td width="100%"><strong>runtime</strong> = None</td></tr></table>
</body></html>
147 changes: 0 additions & 147 deletions docs/mpyc.bfield.html

This file was deleted.

Loading

0 comments on commit 4e68b81

Please sign in to comment.