Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sum array example #67

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Sum array example #67

wants to merge 4 commits into from

Conversation

jimouris
Copy link

@jimouris jimouris commented Dec 6, 2018

Add an external-IO use-case (as mentioned in issue #66 )

Each client sends an array (ExternalIO/sum-client-array.cpp) to the players (Programs/Source/sum-array.mpc), players compute the sum of the arrays (using MPC) and return it to the clients.

Example:
data1.txt has [1, 2, 3, 4, 5]
data2.txt has [6, 7, 8, 9, 10]

Usage:

./Scripts/setup-online.sh
./compile.py sum-array
./Scripts/run-online.sh sum-array

./sum-client-array.x 123 2 ./ExternalIO/data1.txt 0
./sum-client-array.x 456 2 ./ExternalIO/data2.txt 1

And the result:

Array with sum of clients arrays is :
7 9 11 13 15 

@mkskeller
Copy link
Contributor

Hi, I'm reluctant the merge this, not because of its content but firstly because SPDZ-2 is considered inactive and secondly because I'm not affiliated with Bristol anymore. However, I'm happy to look into it if you get it to work in https://github.com/n1analytics/mp-spdz. MP-SPDZ preserves all the functionality of SPDZ-2, so I don't see a reason why it shouldn't work.

@jimouris
Copy link
Author

Hi, despite the fact that the repository is considered inactive, I thought that an array example would be useful to exist. Anyway, I will create a similar PR in MP-SPDZ when I have the time to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants