In our recent post, Threshold Cryptography III, we discussed how the challenge of constructing a threshold variant of ECDSA was addressed in the GG18 [3] through the use of the Multiplicative-to-Additive (MtA) protocol. This MtA protocol is employed in the initial 3 rounds of the 9-round threshold ECDSA protocol implemented in Binance tss-lib [1].
In this post, we provide a detailed examination of the MtA protocol, which utilizes the additively homomorphic properties of the Paillier encryption scheme to facilitate the exchange of encrypted secret shares among the participating parties.
Paillier Encryption Scheme
The Paillier additive homomorphic encryption scheme is employed in the MtA protocol to encrypt and decrypt exchanged secret shares. It supports additive homomorphism over a large modulus (typically of 2048 bits in size), which is substantially larger than the scalar field of the Secp256k1 elliptic curve. Homomorphic encryption is a term that simply means we are able to perform the operations on the encrypted message without requiring decryption, thereby preserving the confidentiality of the original message during computation.
Paillier Key Generation
Generate two large primes KaTeX can only parse string typed expression
P, KaTeX can only parse string typed expression
Q (called safe primes, for example, of 1024 bits), where KaTeX can only parse string typed expression
P=2p+1, KaTeX can only parse string typed expression
Q=2q+1 and both KaTeX can only parse string typed expression
p, KaTeX can only parse string typed expression
q are primes. The Paillier public key is KaTeX can only parse string typed expression
N=P⋅Q (i.e., an RSA modulus) and an additional public value KaTeX can only parse string typed expression
Γ=N+1, the private key is the Carmichael function of KaTeX can only parse string typed expression
N, KaTeX can only parse string typed expression
λ(N)=lcm(P−1,Q−1)=2pq, where KaTeX can only parse string typed expression
lcm() is the function to compute the least common multiple of two integers.
Encryption
Given a message (plaintext) KaTeX can only parse string typed expression
m∈ZN, the encryption KaTeX can only parse string typed expression
EN(m) of the message KaTeX can only parse string typed expression
m is called a ciphertext KaTeX can only parse string typed expression
c=ΓmxN KaTeX can only parse string typed expression
∈ZN2, where KaTeX can only parse string typed expression
x is a randomly generated integer that is coprime with KaTeX can only parse string typed expression
N.
Decryption
Given a ciphertext KaTeX can only parse string typed expression
c in the multiplicative group KaTeX can only parse string typed expression
ZN2∗ (elements in KaTeX can only parse string typed expression
ZN2 that has inverse), the decryption KaTeX can only parse string typed expression
DN2(c) of KaTeX can only parse string typed expression
c is KaTeX can only parse string typed expression
L(Γλ(N))L(cλ(N)) mod KaTeX can only parse string typed expression
N, where KaTeX can only parse string typed expression
L is a function defined as KaTeX can only parse string typed expression
L(u)=Nu−1 over KaTeX can only parse string typed expression
u∈ZN2 such that KaTeX can only parse string typed expression
u=1 mod KaTeX can only parse string typed expression
N.
Correctness of Encryption and Decryption
Decryption in the Paillier encryption scheme is the inverse of encryption, which means that applying the decryption function KaTeX can only parse string typed expression
DN2 to a ciphertext KaTeX can only parse string typed expression
c=EN(m) yields the original message:
KaTeX can only parse string typed expression
DN2(EN(m))=m.
Given the Paillier encryption function:
KaTeX can only parse string typed expression
EN(m)=ΓmxN mod N2=(1+N)mxN mod N2.
, using the binomial expansion of KaTeX can only parse string typed expression
(1+N)m mod KaTeX can only parse string typed expression
N2, and eliminating the terms divisible by KaTeX can only parse string typed expression
N2 gives us KaTeX can only parse string typed expression
(1+N)m mod KaTeX can only parse string typed expression
N2 KaTeX can only parse string typed expression
=(1+mN+⋯) mod KaTeX can only parse string typed expression
N2 KaTeX can only parse string typed expression
=1+mN, the ciphertext becomes KaTeX can only parse string typed expression
c=EN(m)=ΓmxN mod KaTeX can only parse string typed expression
N2 KaTeX can only parse string typed expression
=(1+mN)xN mod KaTeX can only parse string typed expression
N2.
For decryption,
KaTeX can only parse string typed expression
L(Γλ(N))L(cλ(N))=((1+N)λ(N)−1)/N(((1+mN)xN)λ(N)−1)/N,
applying the binomial expansion on the numerator and the denominator with modulus KaTeX can only parse string typed expression
N2, then the numerator is
KaTeX can only parse string typed expression
N((1+mN)xN)λ(N) mod N2−1=N(1+mλ(N)N)xλ(N)N mod N2−1,
and the denominator is
KaTeX can only parse string typed expression
N(1+N)λ(N) mod N2−1=N(1+λ(N)N)−1=λ(N).
By Carmichael's theorems, for any KaTeX can only parse string typed expression
x∈ZN∗, it holds that KaTeX can only parse string typed expression
xλ(N)=1 mod KaTeX can only parse string typed expression
N. Applying this result within the numerator and leveraging the binomial expansion, we obtain KaTeX can only parse string typed expression
xλ(N)N=1 mod KaTeX can only parse string typed expression
N2.
As a result, the exponentiated ciphertext KaTeX can only parse string typed expression
cλ(N)
simplifies such that the numerator in the decryption function becomes KaTeX can only parse string typed expression
mλ(N).
Therefore, the decryption function evaluates as:
KaTeX can only parse string typed expression
L(Γλ(N))L(cλ(N))=λ(N)mλ(N)=m mod N, which correctly recovers the original message KaTeX can only parse string typed expression
m.
Additive Homomorphism
The Paillier encryption scheme supports additive homomorphism over the message space KaTeX can only parse string typed expression
ZN. Specifically, given any two messages KaTeX can only parse string typed expression
m1,m2∈ZN, and two ciphertexts KaTeX can only parse string typed expression
c1,c2∈ZN2∗ such that KaTeX can only parse string typed expression
c1=EN(m1), KaTeX can only parse string typed expression
c2=EN(m2), the Paillier encryption satisfies:
KaTeX can only parse string typed expression
EN(m1+m2 mod N)=EN(m1)⋅EN(m2) mod N2
where the multiplication KaTeX can only parse string typed expression
⋅ is performed in the multiplicative group KaTeX can only parse string typed expression
ZN2∗. For two messages KaTeX can only parse string typed expression
m1 and KaTeX can only parse string typed expression
m2, the ciphertexts are KaTeX can only parse string typed expression
c1=EN(m1)=Γm1x1N mod KaTeX can only parse string typed expression
N2, KaTeX can only parse string typed expression
c2=EN(m2)=Γm2x2N mod KaTeX can only parse string typed expression
N2.
Then
KaTeX can only parse string typed expression
EN(m1)⋅EN(m2) mod N2=Γm1x1NΓm2x2N mod N2=Γm1+m2(x1x2)N mod N2,
which is KaTeX can only parse string typed expression
EN(m1+m2 mod N).
MtA Protocol
While the 3-round MtA protocol was briefly introduced in the previous post, we now provide a more detailed description in the context of the Paillier cryptosystem, including the associated range proofs over encrypted secret shares. In addition to the previously defined RSA modulus used in the Paillier encryption scheme, each party KaTeX can only parse string typed expression
Pi is also instantiated with an auxiliary RSA module KaTeX can only parse string typed expression
N^i along with two values KaTeX can only parse string typed expression
h1i, KaTeX can only parse string typed expression
h2i in KaTeX can only parse string typed expression
ZN^i∗, which are required for creating range proofs based on commitment schemes.
Assume that each party possesses the Paillier public key and corresponding RSA modulus, with all public parameters securely generated, publicly disclosed, and verified by other parties. The MtA protocol executes between any two parties, typically denoted Alice and Bob. Recall that the goal of MtA protocol is to redistribute the multiplicative shares KaTeX can only parse string typed expression
a,b into additive shares KaTeX can only parse string typed expression
α,β such that KaTeX can only parse string typed expression
a⋅b=α+β mod q, where KaTeX can only parse string typed expression
q is the scalar field of the Secp256k1 curve.
The following steps are based on the interactive algorithms defined in GG18 [3], where the sender (Prover) and receiver (Verifier) engage in a sequence of message exchanges. In practical implementations, these interactive protocols are typically converted into non-interactive counterparts using the Fiat–Shamir transformation, thereby removing the need for back-and-forth communication while preserving soundness in the random oracle model.
Round 1
The initiator (i.e., Alice) of MtA(MtAwc) protocol performs the following operations.
- Encrypts the secret share
KaTeX can only parse string typed expression
a with its Paillier public key KaTeX can only parse string typed expression
A using the Paillier encryption scheme.
- Creates a range proof of
KaTeX can only parse string typed expression
a to prove she knows KaTeX can only parse string typed expression
a<q3.
- Sends the encrypted share
KaTeX can only parse string typed expression
cA=EA(a) and the range proof of KaTeX can only parse string typed expression
a to Bob via p2p.
Refer to GG18 [3], Page 9:

The range proof proceeds as follows on Page 28 of GG18 [3]:

Round 2
Upon receiving the encrypted share KaTeX can only parse string typed expression
cA and the range proof,
- Bob verifies the range proof as in the above algorithm.
- If the verification succeeds, Bob then randomly generates
KaTeX can only parse string typed expression
β′∈Zq5.
- Computes
KaTeX can only parse string typed expression
cB=(cA)b⋅EA(β′)=EA(ab+β′) (in a different notation) and sets its secret share as KaTeX can only parse string typed expression
β=−β′ mod KaTeX can only parse string typed expression
q.
- Creates a Bob proof for MtA to prove
KaTeX can only parse string typed expression
b<q3, KaTeX can only parse string typed expression
β′<q7, or a Bob proof for MtAwc (MtA with check) to prove KaTeX can only parse string typed expression
b<q3, KaTeX can only parse string typed expression
β′<q7 and he also knows KaTeX can only parse string typed expression
b, as shown in the following algorithm.
- Sends encrypted share
KaTeX can only parse string typed expression
cB and the Bob proof to Alice via p2p.
Refer to GG18 [3], Page 9:

Refer to GG18 [3], Page 31 for range proof in MtA:

Refer to GG18 [3], Page 30 for range proof in MtAwc:

Round 3
Upon receiving the encrypted share KaTeX can only parse string typed expression
cB and the Bob proof,
- Alice verifies the Bob proof as in the above algorithms.
- If the verification succeeds, Alice decrypts
KaTeX can only parse string typed expression
cB to obtain KaTeX can only parse string typed expression
α′ with its Paillier private key and sets KaTeX can only parse string typed expression
α=α′ mod KaTeX can only parse string typed expression
q as its additive share.
Refer to GG18 [3], Page 9:

At the conclusion of the MtA(MtAwc) protocols, Alice and Bob collaboratively converts the multiplicative share KaTeX can only parse string typed expression
a⋅b into additive shares KaTeX can only parse string typed expression
α and KaTeX can only parse string typed expression
β such that:
KaTeX can only parse string typed expression
a⋅b=α+β mod q
where:
KaTeX can only parse string typed expression
α∈Zq is known only to Alice;
KaTeX can only parse string typed expression
β∈Zq is known only to Bob;
- and
KaTeX can only parse string typed expression
q is the scalar field of the Secp256k1 curve.
The resulting additive sharing ensures that neither party learns the value of KaTeX can only parse string typed expression
a⋅b directly, preserving the secrecy of their respective inputs.
Conclusion
This post reviewed the MtA(MtAwc) protocols instantiated using the Paillier additively homomorphic encryption scheme, under the assumption that all participants possess securely generated, publicly known, and mutually verified Paillier public keys and RSA modulus. The verification of these parameters is a non-trivial task, requiring a series of zero-knowledge proofs to ensure their correctness and compliance with cryptographic security requirements. The details of these verification procedures will be discussed in the next post.
References
- Binance: https://github.com/bnb-chain/tss-lib
- Binance: Binance Open-Sources Threshold Signature Scheme Library
- Rosario Gennaro, Steven Goldfeder, 2018: Fast Multiparty Threshold ECDSA with Fast Trustless Setup (GG18)
- Ran Canetti, Rosario Gennaro, Steven Goldfeder, Nikolaos Makriyannis, Udi Peled, 2021: UC Non-Interactive, Proactive, Threshold ECDSA with Identifiable Aborts (CGGMP21)