Skip to content

Instantly share code, notes, and snippets.

@tarassh
tarassh / mta_protocol.py
Created August 4, 2025 18:04
Multiplicative-to-Additive Conversion (MtA)
#!/usr/bin/env python3
"""
Multiplication-to-Addition (MtA) Protocol Implementation
This implements a secure two-party protocol that converts multiplication into addition.
The protocol allows two parties with private inputs a and b to compute additive shares
s1 and s2 such that s1 + s2 = a * b mod q, without revealing their inputs to each other.
The MtA protocol is a fundamental building block in multi-party computation (MPC) systems,
enabling secure multiplication operations in protocols like ECDSA threshold signatures.