Skip to content

Releases: lschoe/mpyc

Seventh major update

16 Apr 17:03
085790a
Compare
Choose a tag to compare
Seventh major update Pre-release
Pre-release

Major technical improvements:

  • Completed support of all MPC functionality when PRSS is disabled.
  • Continued development for secure Numpy arrays and vectorized implementations.
  • Facilitate uvloop on Linux/Mac and its counterpart Winloop on Windows as alt event loops for (potentially) better performance.
  • Secure fixed-point sine and cosine.

Command Line Interface:

  • Add --no-uvloop to disable load and use of uvloop (winloop) package.

More technical changes:

  • Numpy 2.0 ready.
  • Handle integral attribute for more secure Numpy array functions.
  • Use primes just below powers of 2 for finite fields using gmpy2.prev_prime().
  • Refactor mpyc.asyncoro:
    • moved PRSS details to mpyc.runtime,
    • moved base class SecureObject from mpyc.sectypes,
    • renamed SharesCounter to SharesTallier.
  • Demote use of mpc.run() in demos, easier for use with PyScript.
  • Optimize doubling Edwards extended coordinates.
  • Some SageMath-style methods for GFpX polynomials, e.g., monic(), reverse().
  • Enhance mpyc.mpctools.accumulate().
  • Lots of smaller enhancements.

Many thanks to Marc Damie, Emil Nikolov, and Stan Korzilius and for their collaboration and contributions.

Corresponds to package mpyc 0.10 on PyPI.

This should be the last MPyC release supporting Python 3.9 and NumPy 1.23, following SPEC 0 — Minimum Supported Dependencies.

Sixth major update: secure NumPy arrays

26 Feb 23:30
Compare
Choose a tag to compare
Pre-release

Many new types/functions/methods to support a substantial part of the NumPy array API.
Along with vectorized implementations of the corresponding protocols.

New mpyc.numpy module as stub to avoid a (hard) dependency for the numpy package.

New demos -- try all with np-run-all.{bat,sh}:

  • pseudoinverse.py implementing the Moore-Penrose pseudoinverse.
  • sha3.py for threshold SHA-3 hash functions.
  • np_bnnmnist.py, np_cnnmnist.py, np_id3gini.py, np_aes.py, np_onewayhashchains.py, np_lpsolver.py, np_lpsolverfxp.py reimplement existing demos with 2-fold to 18-fold speedups.

Command Line Interface:

  • Add -V option for MPyC version.
  • Add option --log-level ll with ll=debug/info(default)/warning/error.
  • Support for --output-windows on Linux/Mac.
  • Add -W w, --workers w to set number of worker threads per party (experimental, see below).
  • Add --no-numpy to disable load and use of numpy package.
  • Let --mix32-64bit also disable use of pickle for exchanging NumPy arrays.
  • Report bytes_sent by party (in debug mode: per destination party as well)

More technical changes:

  • Secure prime fields for any number of parties using subfields if order $p$ does not exceed number of parties $m$.
  • Vectorized modular exponentiation (experimental) using gmpy2's new function powmod_base_list().
  • Move import ssl to avoid dependency for PyScript.
  • Part of runtime setup moved to init module.
  • And lots of smaller things.

Docs:

  • Add "MPyC basics"
  • Add "Hacking MPyC"
  • Add MPyC command line documentation (using sphinx-argparse).

Corresponds to package mpyc 0.9 on PyPI.

This should be the last MPyC release supporting Python 3.8 and NumPy 1.21, following NumPy's deprecation policy.

Fifth major update

27 Dec 13:43
Compare
Choose a tag to compare
Fifth major update Pre-release
Pre-release

New modules:

  • mpyc.fingroups for finite groups (symmetric groups, quadratic residues, Schnorr groups, elliptic curves, class groups).
  • mpyc.secgroups for secure versions of finite groups by using mpc.SecGrp().
  • mpyc.__main__ for async REPL with top-level await and MPyC preloaded by using python -m mpyc.

New types/functions/methods:

  • mpyc.sectypes.SecureFloat for secure floating-point numbers by using mpc.SecFlt().
  • mpc.gcd(), mpc.gcdext(), mpc.inverse() for secure (extended) gcd and modular inverse.
  • mpyc.statistics module extended with secure quantiles(), covariance(), correlation(), linear_regression().
  • mpc.find() as secure generic search for first occurrence in a list.
  • mpyc.gmpy module extended with ratrec() and stubs for gmpy2 functions gcdext(), jacobi(), kronecker().
  • mpc.if_swap() as convenience function for secure (oblivious) conditional swap, slightly more efficient than using mpc.if_else().

New demos:

  • multilateration.py for privacy-preserving multilateration (MLAT), building on ridgeregression.py demo.
  • elgamal.py for threshold ElGamal built from MPyC (secure) finite groups.
  • dsa.py for threshold DSA and Schnorr signatures, reusing distributed key generation from elgamal.py.

Technical changes:

  • Command line option --no-prss for disabling PRSS (e.g., demos {helloworld,oneliners,ot,unanimous,parallelsort}.py do not use PRSS).
  • Command line option --mix32-64bit (and environment variable MPYC_MIX32_64BIT) for 32-bit/64-bit compatibility mode (e.g., to mix with MPyC parties running on a 32-bit Raspberry Pi OS).
  • Drop limitation to m=256 parties (see, e.g., demo helloworld.py).
  • Use pyOpenSSL only via cryptography package for generating X.509 certificates, also upgrading incl. dummy .crt files from version 1 to 3.
  • Toward favoring hashable over mutable for finite fields.
  • Add Read the Docs badge, .readthedocs.yaml and check if environment variable READTHEDOCS=True for generating Sphinx-based documentation on Read the Docs (including an overview of the MPyC demos).
  • Add .gitattributes for platform-dependent line endings in .bat and .sh files.
  • And other things.

Many thanks to Niek Bouman, Stan Korzilius, Daniel Moser, Toon Segers, Meilof Veeningen, and Thijs Veugen for (continuous) collaboration.

Corresponds to package mpyc 0.8 on PyPI.

This will be the last release of MPyC supporting Python 3.6 and Python 3.7.
As of December 23, 2021 Python 3.6 has reached end-of-life (see Python Developer’s Guide), and Numpy dropped support for Python 3.7 on December 26, 2021 (see [NumPy version support]*https://numpy.org/neps/nep-0029-deprecation_policy.html)). Also PyPy is expected to fully support Python 3.8 in the course of 2022 (see PyPy - Features).

Fourth major update

31 Oct 17:33
Compare
Choose a tag to compare
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 like mpc.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 demos helloworld.py, parallelsort.py, bnnmnist.py, cnnmnist.py, and ridgeregresssion.py.

Technical changes:

  • Automatic type conversion for b = mpc.output(a), e.g., a of type SecFxp to b of type float (set flag raw to override).
  • New SecureObject hierarchy in mpyc.sectypes (NB: base class SecureObject instead of Share with slot share instead of df).
  • 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() and mpc.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.

Third major update

31 Dec 13:21
4e68b81
Compare
Choose a tag to compare
Third major update Pre-release
Pre-release

Added five new modules:

  • mpyc.gfpx (replaces mpyc.gf2x) for polynomial arithmetic over arbitrary prime fields.
  • mpyc.finfields (replaces mpyc.bfield and mpyc.pfield) to support arbitrary extension fields next to binary fields and prime fields.
  • mpyc.mpctools for reduce and accumulate with log round complexity.
  • mpyc.statistics modelled after Python's statistics module.
  • mpyc.seclists for secure lists with oblivious access and updates.

Also added rudimentary secure conversions (between secure int/fxp/fld), support for async with MPyC runtime, secure unit vectors, secure abs, pos, and efficient min&max. Plus technical enhancements throughout, e.g., now supporting up to 256 parties, and some secure fixed-point arithmetic enhancements.

Added four new demos:

  • kmsurvival.py for secure Kaplan-Meier survival analysis plus notebook KaplanMeierSurvivalExplained.ipynb.
  • ridgeregression.py for secure ridge regression (and linear regression).
  • helloworld.py as "do nothing" demo, but with explanation how to run with up to 256 parties on Linux and Windows.
  • oneliners.py couple of nice MPyC oneliners.

Also extended explanation in OT and ID3 decision tree demos.

Other changes:

  • Change from Apache 2.0 to MIT license.
  • Ensure pypy compatibility.
  • Create .travis.yml workflow, including test coverage.
  • Add "launch binder" badge, Travis CI badge, codecov badge, and PyPI badge.
  • Enable docs via https://lschoe.github.io/mpyc.
  • Added MPyC logo in SVG and LaTeX-tikz.
  • Add basic Linux scripts for docs, tests.
  • Most data files are now in GitHub friendly csv.

Corresponds to package mpyc 0.6 on PyPI.

Second major update

10 Mar 21:37
019207e
Compare
Choose a tag to compare
Second major update Pre-release
Pre-release

Added secure binary fields (module mpyc.bfield) and binary polynomials (module mpyc.gf2x).
New module mpyc.random with various secure distributions, mimicking Python's random module.
Revised core modules, dynamic PRSS setup (no static keys anymore), program counter as tuple.
Added if_else() for efficient oblivious selection.
General integer division (//, %, divmod()) with public divisor for secure ints and fxps.
Codestyle: pycodestyle, pylint.
New demos: AES and one-way hash chains, binarized neural network for MNIST.
Use of top-level await in Jupyter notebooks.
Enhanced command-line interface, with simplified Windows batch files and Unix shell scripts.

Corresponds to package mpyc 0.5 on PyPI.

First major update

01 Oct 08:19
Compare
Choose a tag to compare
First major update Pre-release
Pre-release

Major changes involve exact/integer division, SecFxp.
SSL support added. Streamlined command line arguments (-H help added).
Handling input(), output() enhanced.
Switched from n-party to m-party for true multiparty computation;)

Corresponds to package mpyc 0.4 on PyPI.

First public version

20 Jun 12:19
5fbb742
Compare
Choose a tag to compare
First public version Pre-release
Pre-release

First public version (alpha) including several demos.

Corresponds to package mpyc 0.3 on PyPI.