MCPcopy Create free account
hub / github.com/data61/MP-SPDZ / Open

Function Open

Tools/Subroutines.cpp:38–59  ·  view source on GitHub ↗

Special version for octetStreams

Source from the content-addressed store, hash-verified

36
37// Special version for octetStreams
38void Open(vector< vector<octetStream> >& data,
39 const vector< vector<octetStream> >& Comm_data,
40 const vector<octetStream>& My_Open_data,
41 const Player& P,int num_runs,int dont)
42{
43 CODE_LOCATION
44 int my_number=P.my_num();
45 int num_players=P.num_players();
46 vector<octetStream> Open_data(num_players);
47 for (int i=0; i<num_runs; i++)
48 { if (i!=dont)
49 { Open_data[my_number]=My_Open_data[i];
50 P.Broadcast_Receive(Open_data);
51 for (int j=0; j<num_players; j++)
52 { if (j!=my_number)
53 { if (!Open(data[i][j],Comm_data[i][j],Open_data[j],j))
54 { throw invalid_commitment(); }
55 }
56 }
57 }
58 }
59}
60
61
62void Open(vector< vector<octetStream> >& data,

Callers 3

Open_ChallengeFunction · 0.70
Create_Random_SeedFunction · 0.70
Commit_And_Open_Function · 0.70

Calls 4

invalid_commitmentClass · 0.85
my_numMethod · 0.45
num_playersMethod · 0.45
Broadcast_ReceiveMethod · 0.45

Tested by

no test coverage detected