Privately Matching Patients to Therapists using MPC
Go to file
Sam A. 05c5f6f5ec
Publish project report
2023-05-31 23:43:23 +02:00
ansible Upgrade MP-SPDZ in Ansible too 2023-05-14 22:08:20 +02:00
src Edit 2023-05-15 00:07:42 +02:00
.gitignore Make shuffle patient data and use it for therapists 2023-05-03 17:01:29 +02:00
.gitmodules Add shell script to run programs 2023-03-29 17:19:52 +02:00
LICENSE Add LICENSE 2023-05-14 18:44:30 +02:00 Add note about dataset size 2023-05-15 05:34:30 +02:00
report.pdf Publish project report 2023-05-31 23:43:23 +02:00

Bachelor Project

  • Title: Privately Matching Patients to Therapists using MPC
  • Programme: B.Sc. in Software Development
  • University: IT-University of Copenhagen


This is the repository for the code accompanying my bachelor project. The source code is located in the src/ directory. The version of MP-SPDZ used is v0.3.6.

The ansible/ directory contains an Ansible playbook that provisions three servers ready to use with MP-SPDZ. It also contains a Vagrantfile that can be used to provision three virtual machines using VirtualBox.

How to run computation locally

This guide assumes an Ubuntu 22.04 environment and is only tested with such system. Make sure to have GNU Make installed.

  1. Clone this repository and run git submodule update --init to clone MP-SDPZ as a submodule.
  2. Navigate to src/.
  3. Run make -j$(nproc) to install dependencies and compile MP-SPDZ.
  4. Run make gale_shapley.mpc to compile the program.
  5. Run ./ 50 to randomly generate data for the computation.
  6. Run ./ to run the computation with three MPC parties locally in the background. The computation will print output to src/out-p${n}.txt (n = #party, ./ -k to kill computation).


git submodule update --init
cd src/
make -j$(nproc)
make gale_shapley.mpc
./ 50

If you want to change the size of the dataset, you need to change the MATCHING_SIZE constant in gale_shapley.mpc as well.


This project is licensed under the BSD 3-Clause license.

MP-SPDZ is licensed under the BSD 3-Clause license. It is linked to this Git repository as a submodule.