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

Method extend

OT/OTExtensionWithMatrix.cpp:146–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146void OTExtensionWithMatrix::extend(int nOTs_requested,
147 const BitVector& newReceiverInput, bool hash)
148{
149 CODE_LOCATION
150 protocol_agreement();
151
152 if (use_kos())
153 {
154 extend_correlated(nOTs_requested, newReceiverInput);
155 if (hash)
156 hash_outputs(nOTs_requested);
157 return;
158 }
159
160#ifdef USE_KOS
161 assert(use_kos());
162#else
163 resize(nOTs_requested);
164
165 if (nOTs_requested == 0)
166 return;
167
168 if (not channel)
169 channel = new osuCrypto::Channel(ot_extension_ios, new PlayerCtSocket(*player));
170
171 if (player->my_num())
172 {
173 soft_sender(nOTs_requested);
174 soft_receiver(nOTs_requested, newReceiverInput);
175 }
176 else
177 {
178 soft_receiver(nOTs_requested, newReceiverInput);
179 soft_sender(nOTs_requested);
180 }
181
182 channel->send("hello", 6);
183 char buf[6];
184 channel->recv(buf, 6);
185 assert(string(buf, 5) == string("hello"));
186#endif
187}
188
189#ifndef USE_KOS
190void OTExtensionWithMatrix::soft_sender(size_t n)

Callers 4

initMethod · 0.45
multiplyForBitsMethod · 0.45
multiplyForMixedMethod · 0.45
multiplyForTriplesMethod · 0.45

Calls 3

my_numMethod · 0.45
sendMethod · 0.45
recvMethod · 0.45

Tested by

no test coverage detected