SPDZ & Arithmetic MPC over Secret Shares
Perform joint addition and multiplication on secret-shared integers.
SPDZ & Arithmetic MPC over Secret Shares is a free Cryptology Academy lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cryptology Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Arithmetic vs Boolean MPC
Boolean MPC works on bits (XOR/AND). Arithmetic MPC works on integers or field elements, supporting addition and multiplication directly. Better for ML and statistics applications.
Additive Secret Sharing over Z_p
A value x ∈ Z_p is shared as x = x_1 + x_2 + ... + x_n mod p. Addition of shared values is free: each party adds their shares locally. No communication needed.
Beaver Multiplication Triples
To multiply shares [a] and [b], parties pre-distribute a Beaver triple ([a_t], [b_t], [c_t]) where c_t = a_t·b_t. Online multiplication uses one round of communication.
SPDZ Protocol Overview
SPDZ (Damgård et al. 2012) = "Somewhat Homomorphic Encryption-based Distributed Zero-Knowledge". Offline phase generates authenticated triples via SHE. Online phase is fast additive-share evaluation.
Message Authentication Codes in SPDZ
Each share is accompanied by a MAC: MAC(x_i) = α·x mod p where α is a global secret key. This prevents malicious parties from corrupting their shares undetected.
Offline Phase: Generating Triples
SPDZ offline uses Somewhat Homomorphic Encryption (BGV/BFV). Parties homomorphically multiply their shares to produce authenticated Beaver triples. This phase is compute-intensive but parallelisable.
Online Phase: Fast Multiplication
Given triple ([a],[b],[c]) and inputs [x],[y]: reveal d=x-a and e=y-b (masked, so no info leak). Then [x·y] = [c] + d·[b] + e·[a] + d·e. One round of communication.
MASCOT: OT-Based Offline Phase
MASCOT replaces the SHE offline with OT extension, producing triples faster for small fields. It is the preferred offline for 2-party SPDZ.
Applying SPDZ: Private Statistics
Multiple hospitals compute average patient age without sharing records. Each encodes its data as arithmetic shares. SPDZ evaluates sum and count; parties learn only the ratio.
Performance and Scalability
SPDZ-2k (Cramer et al. 2018) extends to Z_{2^k} for machine-learning-friendly fixed-point arithmetic. The MP-SPDZ library benchmarks at 1M multiplications/second over LAN for 2 parties.
Knowledge Check
What is the purpose of Beaver multiplication triples in arithmetic MPC?
Lesson Recap
Arithmetic MPC uses additive shares over Z_p. Addition is free; multiplication uses Beaver triples in one round. SPDZ adds MACs for malicious security. MASCOT uses OT for fast triple generation. MP-SPDZ brings these to practice.
Frequently asked questions
Is the “SPDZ & Arithmetic MPC over Secret Shares” lesson free?
Yes — the full text of “SPDZ & Arithmetic MPC over Secret Shares” is free to read here on the web, and the Cryptology Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cryptology Academy course, upgrade to CoddyKit PRO.
What will I learn in “SPDZ & Arithmetic MPC over Secret Shares”?
Perform joint addition and multiplication on secret-shared integers. You practise Cryptology Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Cryptology Academy?
No prior experience is required. Cryptology Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “SPDZ & Arithmetic MPC over Secret Shares” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Cryptology Academy lesson?
Yes. Every Cryptology Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- MPC Problem & Yao's Garbled Circuits
- GMW Protocol & Oblivious Transfer
- SPDZ & Arithmetic MPC over Secret Shares
- MPC Applications: Private Set Intersection & ML