Skip to content

Latest commit

 

History

History
 
 

array-shuffle

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Oblivious Array Shuffling Demo

Description and guide for performing an oblivious random shuffling of a shared array under MPC

Protocol

Each party inputs an array of length n. The protocol concatenates the arrays and shuffles them in random order, such that the order of the resulting array is not known by any party until it is opened and revealed.

Running Demo

  1. Running a server:

    node demos/shuffle-array/server.js
  2. Either open browser based parties by going to http://localhost:8080/demos/shuffle-array/client.html in the browser, or a node.js party by running

    node demos/shuffle-array/party.js <input> [<party count> [<computation_id> [<party id>]]]]'
  3. Running tests: run the following. Note that you do not need to have the server running when running the tests; they run the server on their own.

    npm run-script test-demo -- demos/shuffle-array/test.js

File structure

The demo consists of the following parts:

  1. Server script: server.js
  2. Web Based Party: Made from the following files:
    • client.html: UI for the browser.
    • client.js: Handlers for UI buttons and input validations.
  3. Node.js-Based Party:
    • party.js: Main entry point. Parses input from the command line and initializes the computation.
  4. The MPC protocol: Implemented in mpc.js. This file is used in both the browser and node.js versions of the demo.
  5. test.js: mocha unit tests.
  6. Documentation:
    • This README.md file. ``