Skip to content

SecurityRonin/mpc-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MPC Demo — Compute Without Revealing

Netlify Status

Interactive demonstration of Multi-Party Computation (MPC). Six participants compute their average age without anyone revealing their individual age.

Live Demo →

What It Teaches

MPC lets multiple parties compute a function on their combined data without any party revealing their input. This demo visualises a simplified protocol:

  1. Setup — 6 participants, ages hidden
  2. Mask — each adds a random number to their age, shares only the sum
  3. Pass — masked values are aggregated into a running total
  4. Unmask — random masks are subtracted from the total
  5. Result — the correct average is revealed, but no individual age was ever shown

Interactive Features

  • Click any participant to edit their age and replay
  • Try to Cheat — see what adjacent participants can deduce (the collusion weakness of simplified MPC)
  • Reset — start over with fresh random masks

Development

npm install
npx playwright install chromium
python3 -m http.server 3008 --directory web
# Open http://localhost:3008

Testing

npm test

18 Playwright E2E tests covering security headers, protocol steps, and interactive features.

Tech Stack

  • Vanilla HTML/CSS/JS (single file, no framework)
  • Playwright for E2E testing
  • Netlify for static deployment

Part of The Codebreakers

This demo accompanies The Codebreakers Part III: Distributed Trust & Confidential Computing — an introductory information security course by Albert Hui (Security Ronin).

Licence

MIT

About

Interactive Multi-Party Computation demo — compute the average age of a group without anyone revealing their age. Step-by-step protocol visualisation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors