19 #ifndef __ABYSETUP_H__
20 #define __ABYSETUP_H__
22 #include "../util/typedefs.h"
23 #include "../util/crypto/crypto.h"
24 #include "../ot/naor-pinkas.h"
25 #include "../ot/ot-extension.h"
26 #include "../ot/xormasking.h"
27 #include "../ot/arithmtmasking.h"
28 #include "../DJN/djnparty.h"
29 #include "../DGK/dgkparty.h"
30 #include "../util/constants.h"
87 BOOL PrepareSetupPhase(vector<CSocket>& sockets);
88 BOOL PerformSetupPhase(vector<CSocket>& sockets);
91 void AddOTTask(
OTTask* task, uint32_t inverse) {
92 m_vOTTasks[inverse].push_back(task);
97 m_vPKMTGenTasks.push_back(task);
102 void AddSendTask(BYTE* sndbuf, uint64_t sndbytes);
103 void AddReceiveTask(BYTE* rcvbuf, uint64_t rcvbytes);
105 BOOL WaitForTransmissionEnd();
111 BOOL ThreadRunNPSnd(uint32_t exec);
112 BOOL ThreadRunNPRcv(uint32_t exec);
114 BOOL ThreadRunIKNPSnd(uint32_t exec);
115 BOOL ThreadRunIKNPRcv(uint32_t exec);
117 BOOL ThreadSendData(uint32_t exec);
118 BOOL ThreadReceiveData(uint32_t exec);
120 BOOL ThreadRunPaillierMTGen(uint32_t exec);
121 BOOL ThreadRunDGKMTGen(uint32_t threadid);
124 vector<vector<OTTask*> > m_vOTTasks;
126 vector<PKMTGenVals*> m_vPKMTGenTasks;
133 uint32_t m_nIKNPProgress;
137 uint32_t m_nNumOTThreads;
138 vector<CSocket> m_vSockets;
155 e_OTExt, e_NP, e_Send, e_Receive, e_Transmit, e_Stop, e_MTPaillier, e_MTDGK,
158 BOOL WakeupWorkerThreads(EJobType);
159 BOOL WaitWorkerThreads();
160 BOOL ThreadNotifyTaskDone(BOOL);
162 class CWorkerThread:
public CThread {
164 CWorkerThread(uint32_t i,
ABYSetup* callback) :
165 threadid(i), m_pCallback(callback) {
167 void PutJob(EJobType e) {
178 vector<CWorkerThread*> m_vThreads;
182 uint32_t m_nWorkingThreads;
183 BOOL m_bWorkerThreadSuccess;
187 #endif //__ABYSETUP_H__
Definition: abysetup.h:46
Definition: abysetup.h:59
Definition: djnparty.h:31
Definition: ot-extension.h:192
e_mt_gen_alg
Enumeration which defines the method that is used for arithmetic multiplication triple generation...
Definition: constants.h:55
Definition: ot-extension.h:67
Definition: abysetup.h:41
Definition: dgkparty.h:31
Definition: abysetup.h:72
Definition: abysetup.h:36
e_role
Defines the role of the party or the source / target for certain operations (e.g., input/output)
Definition: constants.h:139
Definition: abysetup.h:54
Definition: abysetup.h:77
Definition: maskingfunction.h:25
Definition: abysetup.h:67
Definition: cbitvector.h:123