Skip to content
Marcella Hastings edited this page Nov 5, 2020 · 2 revisions

MPyC is a python library for secure computation. It provides an easy pythonic interface for fast prototyping and execution in the semi-honest model.

The library uses mostly information-theoretically secure primitives based on Shamir secret sharing. A few primitives use pseudo-random secret sharing for better efficiency (this option can be turned off for a "fully" IT-secure protocol, but either way, it's quantum secure). Communication channels use SSL.

It has extensive support for arithmetic operations and also provides a secure list type.

New evaluation criteria

Threshold: MPyC uses protocols based on Shamir secret sharing. The sharing interface lets users directly specify the desired threshold. See documentation, including the random_split function.

Usability

MPyC is definitely beginner-friendly. It's easy to prototype and run MPC operations with just a little Python and asynch experience.

The library is extremely easy to install. We still provide a docker container, but you can see the install.sh script is just 4 lines.

The library is reasonably well documented. It includes lots of sample code, including several fully documented iPython (?) notebooks that explain different choices of the library and demonstrate the functionality. There is also a bunch of auto-generated documentation online. This covers most of the library's functionality. Only complaint is that it's not searchable---you have to click through the modules to find what you need.

Error messages are OK. Sometimes they get convoluted due to Python asynch, but this is not the library's fault.

There is a silent failure when values overflow their bounds. Notably, this can happen during operations between two values that do fit within their field. For example, comparing two 64-bit numbers that use most of those bits to hold values can cause overflow and a non-boolean result. I think it breaks MPC security guarantees to provide a runtime error about this, but noting how much 'free space' different operations need could be useful for debugging.

Links