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

Function Open_Challenge

Tools/Subroutines.cpp:109–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107
108
109int Open_Challenge(vector<unsigned int>& e,vector<octetStream>& Open_e,
110 const vector<octetStream>& Comm_e,
111 const Player& P,int num_runs)
112{
113 CODE_LOCATION
114 // Now open the challenge commitments and determine which run was for real
115 P.Broadcast_Receive(Open_e);
116
117 int challenge=0;
118 octetStream ee;
119 for (int i = 0; i < P.num_players(); i++)
120 { if (i != P.my_num())
121 { if (!Open(ee,Comm_e[i],Open_e[i],i))
122 { throw invalid_commitment(); }
123 ee.get(e[i]);
124 }
125 challenge+=e[i];
126 }
127 challenge = challenge % num_runs;
128
129 return challenge;
130}
131
132
133void Create_Random_Seed(octet* seed, const PlayerBase& P, int len,

Callers 2

covert_generationFunction · 0.85
Run_Gen_ProtocolFunction · 0.85

Calls 5

invalid_commitmentClass · 0.85
OpenFunction · 0.70
num_playersMethod · 0.45
my_numMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected