INNER CODE UNIT · Python
secint
lschoe/mpyc · demos/SecretSantaExplained.py:38
secint = mpc.SecInt() # 32-bit secure MPyC integers
# Finally, we start the `mpc` runtime, which means that point-to-point connections between each pair of parties will be established.
# In[3]:
mpc.run(mpc.start()) # required only when run with multiple parties
# Insertion of this call ensures that the Python code can also be run with multiple parties, as shown at the end of this notebook.
# #### _Quick note on MPyC coroutines_
#
# All computations pertaining to secure integers of type `secint` are done asynchronously in MPyC. The implementation of MPyC builds heavily on Python's `asyncio` module. Secure computations in MPyC are in fact implemented as MPyC coroutines, which are a special type of Python coroutines.
#
# For example, consider the following code fragment.