Skip to content

Commit

Permalink
Finalize docs v0.10.
Browse files Browse the repository at this point in the history
  • Loading branch information
lschoe authored Apr 16, 2024
1 parent 5a7f5b6 commit 085790a
Show file tree
Hide file tree
Showing 21 changed files with 371 additions and 379 deletions.
14 changes: 3 additions & 11 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
<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.9)</font></td
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>mpyc</strong></big></big> (version 0.10)</font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="https://github.com/lschoe/mpyc/blob/v0.9/mpyc/__init__.py">github.com/lschoe/mpyc/blob/v0.9/mpyc/__init__.py</a></font></td></tr></table>
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="https://github.com/lschoe/mpyc/blob/v0.10/mpyc">github.com/lschoe/mpyc/blob/v0.10/mpyc</a></font></td></tr></table>
<p><tt>MPyC&nbsp;is&nbsp;a&nbsp;Python&nbsp;package&nbsp;for&nbsp;secure&nbsp;multiparty&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>
where&nbsp;parties&nbsp;interact&nbsp;by&nbsp;exchanging&nbsp;messages&nbsp;via&nbsp;peer-to-peer&nbsp;connections.<br>
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;integer&nbsp;and&nbsp;fixed-point&nbsp;arithmetic&nbsp;is&nbsp;supported&nbsp;for&nbsp;parameterized<br>
Secure&nbsp;integer&nbsp;and&nbsp;fixed-point&nbsp;arithmetic&nbsp;are&nbsp;supported&nbsp;for&nbsp;parameterized<br>
number&nbsp;ranges,&nbsp;also&nbsp;including&nbsp;support&nbsp;for&nbsp;comparison&nbsp;and&nbsp;bitwise&nbsp;operations.<br>
Secure&nbsp;finite&nbsp;field&nbsp;arithmetic&nbsp;is&nbsp;supported&nbsp;for&nbsp;fields&nbsp;of&nbsp;arbitrary&nbsp;order.<br>
Secure&nbsp;NumPy&nbsp;arrays&nbsp;over&nbsp;these&nbsp;basic&nbsp;types&nbsp;are&nbsp;available&nbsp;as&nbsp;well.<br>
Expand Down Expand Up @@ -62,14 +62,6 @@
<a href="mpyc.thresha.html">thresha</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<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="-get_arg_parser"><strong>get_arg_parser</strong></a>()</dt><dd><tt>Return&nbsp;parser&nbsp;for&nbsp;command&nbsp;line&nbsp;arguments&nbsp;passed&nbsp;to&nbsp;the&nbsp;MPyC&nbsp;runtime.</tt></dd></dl>
</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>
Expand Down
4 changes: 2 additions & 2 deletions docs/mpyc.__main__.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<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>.__main__</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="https://github.com/lschoe/mpyc/blob/v0.9/mpyc/__main__.py">github.com/lschoe/mpyc/blob/v0.9/mpyc/__main__.py</a></font></td></tr></table>
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="https://github.com/lschoe/mpyc/blob/v0.10/mpyc/__main__.py">github.com/lschoe/mpyc/blob/v0.10/mpyc/__main__.py</a></font></td></tr></table>
<p><tt>Support&nbsp;for&nbsp;natively&nbsp;asynchronous&nbsp;REPL&nbsp;with&nbsp;MPyC&nbsp;preloaded.<br>
&nbsp;<br>
To&nbsp;launch&nbsp;a&nbsp;natively&nbsp;asynch&nbsp;REPL&nbsp;with&nbsp;MPyC&nbsp;preloaded,&nbsp;run:<br>
To&nbsp;launch&nbsp;a&nbsp;natively&nbsp;async&nbsp;REPL&nbsp;with&nbsp;MPyC&nbsp;preloaded,&nbsp;run:<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;python&nbsp;-m&nbsp;mpyc<br>
&nbsp;<br>
Expand Down
62 changes: 53 additions & 9 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="https://github.com/lschoe/mpyc/blob/v0.9/mpyc/asyncoro.py">github.com/lschoe/mpyc/blob/v0.9/mpyc/asyncoro.py</a></font></td></tr></table>
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="https://github.com/lschoe/mpyc/blob/v0.10/mpyc/asyncoro.py">github.com/lschoe/mpyc/blob/v0.10/mpyc/asyncoro.py</a></font></td></tr></table>
<p><tt>This&nbsp;module&nbsp;provides&nbsp;basic&nbsp;support&nbsp;for&nbsp;asynchronous&nbsp;communication<br>
and&nbsp;computation&nbsp;of&nbsp;secret-shared&nbsp;values.</tt></p>
<p>
Expand All @@ -19,11 +19,10 @@

<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="https://docs.python.org/3/library/functools.html">functools</a><br>
<a href="https://docs.python.org/3/library/itertools.html">itertools</a><br>
</td><td width="25%" valign=top><a href="https://docs.python.org/3/library/struct.html">struct</a><br>
<a href="https://docs.python.org/3/library/sys.html">sys</a><br>
</td><td width="25%" valign=top><a href="https://docs.python.org/3/library/traceback.html">traceback</a><br>
<a href="https://docs.python.org/3/library/typing.html">typing</a><br>
<a href="https://docs.python.org/3/library/struct.html">struct</a><br>
</td><td width="25%" valign=top><a href="https://docs.python.org/3/library/sys.html">sys</a><br>
<a href="https://docs.python.org/3/library/traceback.html">traceback</a><br>
</td><td width="25%" valign=top><a href="https://docs.python.org/3/library/typing.html">typing</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
Expand All @@ -38,6 +37,12 @@
<dt><font face="helvetica, arial"><a href="mpyc.asyncoro.html#MessageExchanger">MessageExchanger</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="https://docs.python.org/3/library/functions.html#object">builtins.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="mpyc.asyncoro.html#SecureObject">SecureObject</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
Expand All @@ -64,7 +69,7 @@
&nbsp;<br>
The&nbsp;connection&nbsp;between&nbsp;the&nbsp;two&nbsp;parties&nbsp;will&nbsp;be&nbsp;set&nbsp;up&nbsp;with&nbsp;one&nbsp;party<br>
listening&nbsp;(as&nbsp;server)&nbsp;for&nbsp;the&nbsp;other&nbsp;party&nbsp;to&nbsp;connect&nbsp;(as&nbsp;client).<br>
If&nbsp;peer_pid=None,&nbsp;party&nbsp;rt.pid&nbsp;starts&nbsp;as&nbsp;server&nbsp;and&nbsp;the&nbsp;peer&nbsp;start&nbsp;as<br>
If&nbsp;peer_pid=None,&nbsp;party&nbsp;rt.pid&nbsp;starts&nbsp;as&nbsp;server&nbsp;and&nbsp;the&nbsp;peer&nbsp;starts&nbsp;as<br>
client,&nbsp;and&nbsp;the&nbsp;other&nbsp;way&nbsp;around&nbsp;otherwise.&nbsp;Once&nbsp;the&nbsp;connection&nbsp;is&nbsp;made,<br>
the&nbsp;client&nbsp;will&nbsp;immediately&nbsp;send&nbsp;its&nbsp;pid&nbsp;to&nbsp;the&nbsp;server.</tt></dd></dl>

Expand Down Expand Up @@ -92,8 +97,8 @@
<dl><dt><a name="MessageExchanger-send"><strong>send</strong></a>(self, pc, payload)</dt><dd><tt>Send&nbsp;payload&nbsp;labeled&nbsp;with&nbsp;pc&nbsp;to&nbsp;the&nbsp;peer.<br>
&nbsp;<br>
Message&nbsp;format&nbsp;consists&nbsp;of&nbsp;three&nbsp;parts:<br>
&nbsp;1.&nbsp;payload_size&nbsp;(4&nbsp;bytes&nbsp;unsigned&nbsp;int)<br>
&nbsp;2.&nbsp;pc&nbsp;(8&nbsp;bytes&nbsp;signed&nbsp;int)<br>
&nbsp;1.&nbsp;pc&nbsp;(8&nbsp;bytes&nbsp;signed&nbsp;int)<br>
&nbsp;2.&nbsp;payload_size&nbsp;(4&nbsp;bytes&nbsp;unsigned&nbsp;int)<br>
&nbsp;3.&nbsp;payload&nbsp;(byte&nbsp;string&nbsp;of&nbsp;length&nbsp;payload_size).</tt></dd></dl>

<hr>
Expand Down Expand Up @@ -144,6 +149,44 @@
&nbsp;<br>
See&nbsp;<a href="#MessageExchanger-pause_writing">pause_writing</a>()&nbsp;for&nbsp;details.</tt></dd></dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="SecureObject">class <strong>SecureObject</strong></a>(<a href="https://docs.python.org/3/library/functions.html#object">builtins.object</a>)</font></td></tr>

<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="#SecureObject">SecureObject</a>(value=None)<br>
&nbsp;<br>
A&nbsp;secret-shared&nbsp;<a href="https://docs.python.org/3/library/functions.html#object">object</a>.<br>
&nbsp;<br>
An&nbsp;MPC&nbsp;protocol&nbsp;operates&nbsp;on&nbsp;secret-shared&nbsp;objects&nbsp;of&nbsp;type&nbsp;<a href="#SecureObject">SecureObject</a>.<br>
The&nbsp;basic&nbsp;Python&nbsp;operators&nbsp;are&nbsp;overloaded&nbsp;by&nbsp;<a href="#SecureObject">SecureObject</a>&nbsp;classes.<br>
An&nbsp;expression&nbsp;like&nbsp;a&nbsp;*&nbsp;b&nbsp;will&nbsp;create&nbsp;a&nbsp;new&nbsp;<a href="#SecureObject">SecureObject</a>,&nbsp;which&nbsp;will<br>
eventually&nbsp;contain&nbsp;the&nbsp;product&nbsp;of&nbsp;a&nbsp;and&nbsp;b.&nbsp;The&nbsp;product&nbsp;is&nbsp;computed<br>
asynchronously,&nbsp;using&nbsp;an&nbsp;instance&nbsp;of&nbsp;a&nbsp;specific&nbsp;cryptographic&nbsp;protocol.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="SecureObject-__bool__"><strong>__bool__</strong></a>(self)</dt><dd><tt>Use&nbsp;of&nbsp;secret-shared&nbsp;objects&nbsp;in&nbsp;Boolean&nbsp;expressions&nbsp;makes&nbsp;no&nbsp;sense.</tt></dd></dl>

<dl><dt><a name="SecureObject-__deepcopy__"><strong>__deepcopy__</strong></a>(self, memo)</dt><dd><tt>Let&nbsp;SecureObjects&nbsp;behave&nbsp;as&nbsp;immutable&nbsp;objects.<br>
&nbsp;<br>
Introduced&nbsp;for&nbsp;github.com/meilof/oblif.</tt></dd></dl>

<dl><dt><a name="SecureObject-__init__"><strong>__init__</strong></a>(self, value=None)</dt><dd><tt>Initialize&nbsp;share.<br>
&nbsp;<br>
If&nbsp;value&nbsp;is&nbsp;None&nbsp;(default),&nbsp;the&nbsp;<a href="#SecureObject">SecureObject</a>&nbsp;starts&nbsp;out&nbsp;as&nbsp;an&nbsp;empty<br>
placeholder&nbsp;(implemented&nbsp;as&nbsp;a&nbsp;Future).</tt></dd></dl>

<dl><dt><a name="SecureObject-set_share"><strong>set_share</strong></a>(self, value)</dt><dd><tt>Set&nbsp;share&nbsp;to&nbsp;the&nbsp;given&nbsp;value.<br>
&nbsp;<br>
The&nbsp;share&nbsp;is&nbsp;set&nbsp;directly&nbsp;(or&nbsp;recursively,&nbsp;for&nbsp;a&nbsp;composite&nbsp;<a href="#SecureObject">SecureObject</a>),<br>
using&nbsp;callbacks&nbsp;if&nbsp;value&nbsp;contains&nbsp;Futures&nbsp;that&nbsp;are&nbsp;not&nbsp;yet&nbsp;done.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>share</strong></dt>
</dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
Expand All @@ -159,6 +202,7 @@
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>
<dl><dt><a name="-mpc_coro_no_pc"><strong>mpc_coro_no_pc</strong></a>(func)</dt></dl>
<dl><dt><a name="-returnType"><strong>returnType</strong></a>(*args, wrap=True)</dt><dd><tt>Define&nbsp;return&nbsp;type&nbsp;for&nbsp;MPyC&nbsp;coroutines.<br>
&nbsp;<br>
Used&nbsp;in&nbsp;first&nbsp;await&nbsp;expression&nbsp;in&nbsp;an&nbsp;MPyC&nbsp;coroutine.</tt></dd></dl>
Expand Down
Loading

0 comments on commit 085790a

Please sign in to comment.