Mentions légales du service

Skip to content

MP-SPDZ Installation and Configuration

CANSIZ Sergen requested to merge feature/399-mpspdz-installation into develop

This merge request contains following changes:

  • Adds MP-SPDZ version v0.3.4 as submodule in modules/MP-SPDZ
  • Creates script called fedbiomed_configure_secagg for installing or configuring binaries/scripts of MP-SPDZ
  • Creates script called fedbiomed_mpc for compling, executing mpc scripts and protocols

Please see last part of README.md file for instructions of configuration

Things to Test and Review

  • Configuring MP-SDPZ using the script fedbiomed_configure_secagg, for macOS and Linux
  • Testing fedbiomed_mpc script to compile mpc script or execute mpc protocols. Here are a few usage example
    • Run fedbiomed_mpc --help for instuctions and usage,
      • fedbiomed_mpc compile --help
      • fedbiomed_mpc exec --help
      • fedbiomed_mpc shamir-server-key --help
    • Compile option fedbiomed_mpc compile
      • Takes --script as an option to declare the script to be complied e.g. fedbiomed_mpc compile --script server_key -N 3
      • Complie option will automatically add --prime=$longprime option
      • You can also pass extra arguments that can be used for compilation e.g fedbiomed_mpc compile --script -R 256. Make sure that the option is valid for the script for example option -N for server_key is mandatory.
    • Exec option fedbiomed_mpc exec
      • Exec option is design to execute any available protocol of MP-SPDZ in Fed-BioMed (currently only shamir).
      • Usage fedbiomed_mpc exec shamir-party [EXTRA_ARGS]. Extra arguments should be valid for the protocol. These arguments will be directly passed to shamir-party.x binary file. It means that fedbiomed_mpc exec shamir-party 0 -OF Player-Data/output is equal to ./shamir-party.x 0 -OF Player-Data/output.
      • Example:
        • party 0 : ./scripts/fedbiomed_mpc exec --protocol shamir-party 0 server_key -ip Player-Data/test_ip_assigned -OF Player-Data/Output-Test -N 3
        • party 1: ./scripts/fedbiomed_mpc exec --protocol shamir-party 1 server_key -ip Player-Data/test_ip_assigned -IF Player-Data/Server-Key-Input -N 3
        • party 2: ./scripts/fedbiomed_mpc exec --protocol shamir-party 2 server_key -ip Player-Data/test_ip_assigned -IF Player-Data/Server-Key-Input -N 3
    • Shamir-Server-Key option
      • This option is a wrapper of compile and exec option that first compiles server_key.mpc and executes shamir-party. It is desinged for executing server-key computation from node and researcher easily.
      • Example:
        • party 0: ./scripts/fedbiomed_mpc shamir-server-key -pn 0 -aip ./modules/MP-SPDZ/Player-Data/test_ip_assigned -of ./modules/MP-SPDZ/Player-Data/Output-Test -nop 3
        • party 1: ./scripts/fedbiomed_mpc shamir-server-key -pn 1 -aip ./modules/MP-SPDZ/Player-Data/test_ip_assigned -if ./modules/MP-SPDZ/Player-Data/Server-Key-Input -nop 3
        • party 2: ./scripts/fedbiomed_mpc shamir-server-key -pn 2 -aip ./modules/MP-SPDZ/Player-Data/test_ip_assigned -if ./modules/MP-SPDZ/Player-Data/Server-Key-Input -nop 3
      • Please see details by running ./scripts/fedbiomed_mpc shamir-server-key --help

Guidelines for MR review

General:

Specific to some cases:

  • update all conda envs consistently (development and vpn, Linux and MacOS)
  • if modified researcher (eg new attributes in classes) check if breakpoint needs update (breakpoint/load_breakpoint in Experiment(), save_state/load_state in aggregators, strategies, secagg, etc.)
Edited by Riccardo Taiello

Merge request reports