Closed f-hy closed 2 months ago
You can do something similar to Programs/Source/breast_logistic.mpc
by branching on command-line arguments:
if 'party0' in program.args:
a = sfix.input_tensor_via(0, pd.read_csv('a.csv'))
b = sfix.input_tensor_via(1, shape=a_shape)
elif 'party1' in program.args:
a = sfix.input_tensor_via(0, shape=b_shape)
b = sfix.input_tensor_via(1, pd.read_csv('b.csv'))
The you compile using ./compile.py <program> party0
on one side and ./compile.py <program> party1
on the other side before running ./<protocol-party.x> <program>-party0
and ./<protocol-party.x> <program>-party1
.
It helps a lot, thanks!
I get it again, thanks a lot!
Import a piece of data from each of the two parties (using csv as an example, if the two files are a.csv and b.csv respectively, and the input sides are A and B respectively), A cannot see b.csv and B cannot see a.csv, in this case, how to input the data separately? Do I need to divide into multiple mpc files and run mpc files step by step? In the following code, only when both parties have both a.csv and b.csv then code can run successfully, but I want party A to only have a.csv and party B to only have b.csv, and it still run successfully, I mean, I want each party to protect his data, so what can I do to get such result?(Note that I don't want to use Player-Data/Input-P0-0 or use
-I
as input to get data from each party)