Fourth major update
Pre-release
Pre-release
New methods, mostly for mpyc.runtime.Runtime
alias mpc
:
mpc.sorted()
,mpyc.seclist.sort()
, using__lt__()
as fundamental comparison operator, just as in Python.mpc.argmin/argmax()
methods.mpc.all/any()
, for any iterable likempc.min/max/sum/prod()
now do as well.mpc.transfer()
for public communication of pickable objects, including objects with (dynamic) MPyC types.
Demos:
- New
unanimous.py
for unanimous voting (generalized matchmaking) between t+1 voters and t extra parties for maximal privacy. - Revamped
lpsolver(fxp).py
demos now have.csv
datasets nicely rendered on GitHub, with objective function as "header" row. - Prettify MNIST digit printing on console.
- Use
mpc.transfer()
in demoshelloworld.py
,parallelsort.py
,bnnmnist.py
,cnnmnist.py
, andridgeregresssion.py
.
Technical changes:
- Automatic type conversion for
b = mpc.output(a)
, e.g.,a
of typeSecFxp
tob
of typefloat
(set flagraw
to override). - New SecureObject hierarchy in
mpyc.sectypes
(NB: base classSecureObject
instead ofShare
with slotshare
instead ofdf
). - Hopping program counter of constant size (8 bytes on 64-bit Python, 4 bytes on 32-bit Python).
- Use of gmpy2 is now optional via the
--no-gmpy2
command line option. - Enhancements to
mpc.to_bits()
andmpc.convert()
. - Add exception handling for MPyC coroutines, e.g., suppressing spurious
'Task was destroyed but it is pending!'
messages. - Plus lots of other things.
Many thanks to @b-kamphorst, @niekbouman, @skorzili, @ThomasTNO, and @toonsegers for their recent contributions.
Corresponds to package mpyc 0.7 on PyPI.