Secure Multi-Party Computation

Compute the average salary without revealing any salary

Eight quantitative analysts want one number—their average salary—but no participant is willing to reveal an individual salary. This interactive demo shows a simple masked secure-sum protocol.

Interactive protocol

Pass a masked running total around the ring

Step 0 — all salaries are private.
VALUE TRAVELLING AROUND THE RING Nothing has been shared yet
Current sender Private salary stays local Masked value sent
Private inputs

Eight analyst salaries

Shown only for inspecting the simulation. In a real execution, each analyst knows only their own input.
Mathematics

The mask cancels out

Analyst 1 chooses a private random number R. After every participant adds salary sᵢ, the value returning to Analyst 1 is R + s₁ + s₂ + ··· + s₈. Subtracting R gives the total salary. Divide by 8 to obtain the average.

Security caveat

This simple ring protocol is not full MPC

If the two neighbors of one analyst collude, they can compare the value before and after that analyst's step and recover the analyst's salary. Production-grade MPC uses stronger techniques such as secret sharing and cryptographic protocols designed for explicit adversary models.

Concept reference: Secure multi-party computation — Wikipedia