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.
Eight analyst salaries
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.
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.