Skip to content
/ mpc-uov Public

Thresholdized UOV signature scheme implementation using MPyC. Based on the “Share the MAYO: thresholdizing MAYO” paper, this repo implements a post-quantum, multi-party, threshold digital signature protocol.

Notifications You must be signed in to change notification settings

Dioprz/mpc-uov

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Thresholdized UOV Signature Scheme with MPyC

This project implements a thresholdized version of the Unbalanced Oil and Vinegar (UOV) digital signature scheme using the MPyC secure multi-party computation (MPC) framework. UOV is a multivariate quadratic (MQ) signature protocol and a candidate in the NIST Post-Quantum Cryptography Standardization process.

This implementation is based on the paper Share the MAYO: thresholdizing MAYO by Sofia Celi, Daniel Escudero, and Guilhem Niot

Features

  • Thresholdized UOV: The signing key is distributed among multiple parties; a threshold of parties must collaborate to generate a valid signature.
  • Secure Multi-Party Computation: Built on MPyC, enabling distributed trust and privacy-preserving computation.
  • Post-Quantum Security: UOV is designed to resist attacks from quantum computers.
  • Flexible Parameters: Easily configure the number of parties, threshold, and UOV parameters.

Stack

  • MPyC (Multi-Party Computation in Python)
  • numpy (matrix and vector operations)
  • gmpy2 (arbitrary precision arithmetic)
  • implicit-globals (for field context management)
  • uvloop (optional, for faster event loops on non-Windows)

Installation

With Nix (recommended for Nix/NixOS users)

nix develop

This will provide a shell with all dependencies available.

With uv

pip install uv
uv venv
uv pip install .

Or, using plain pip:

python3 -m venv .venv
source .venv/bin/activate
pip install .

Usage

Single-Party (Demo)

python3 -m src.main

Multi-Party (MPC) Usage

To run with N parties, open N shells and run in each:

python3 -m src.main -M<N> -I<id>

where <N> is the number of parties and <id> is the party index (0 to N-1).

Example (N=3):

python3 -m src.main -M3 -I0
python3 -m src.main -M3 -I1
python3 -m src.main -M3 -I2

Threshold Option

You can set the threshold t (number of parties required to sign) with the -T<t> flag:

python3 -m src.main -M5 -T2 -I0

where 0 <= t < n/2.

Developer Notes

  • The src/mp-spdz/ folder contains an early attempt at implementing the protocol using the MP-SPDZ framework. This approach was discontinued in favor of MPyC, which offers a more Pythonic and flexible library interface, making development and experimentation easier.
  • The main protocol logic is in src/main.py and supporting modules in src/.

For more technical/developer details, see DEVELOPER.md.

About

Thresholdized UOV signature scheme implementation using MPyC. Based on the “Share the MAYO: thresholdizing MAYO” paper, this repo implements a post-quantum, multi-party, threshold digital signature protocol.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published