19 #ifndef __ABYPARTY_H__
20 #define __ABYPARTY_H__
22 #include "../util/typedefs.h"
23 #include "../util/crypto/crypto.h"
24 #include "../circuit/abycircuit.h"
25 #include "../util/socket.h"
26 #include "../util/thread.h"
27 #include "../util/cbitvector.h"
29 #include "../sharing/sharing.h"
30 #include "../sharing/boolsharing.h"
32 #include "../util/timer.h"
33 #include "../sharing/yaoclientsharing.h"
34 #include "../sharing/yaoserversharing.h"
35 #include "../sharing/arithsharing.h"
37 #include "../util/yaokey.h"
40 #include "../util/connection.h"
57 vector<Sharing*>& GetSharings() {
68 double GetTiming(ABYPHASE phase);
74 BOOL InitCircuit(uint32_t bitlen);
76 BOOL EstablishConnection();
78 BOOL ABYPartyListen();
79 BOOL ABYPartyConnect();
81 BOOL AssignInputValues();
82 BOOL EvaluateCircuit();
85 void BuildBoolMult(uint32_t bitlen, uint32_t resbitlen, uint32_t nvals);
86 void BuildBoolAdd(uint32_t bitlen, uint32_t nvals);
88 void InstantiateGate(uint32_t gateid);
89 void UsedGate(uint32_t gateid);
91 BOOL PerformInteraction();
92 BOOL ThreadSendValues();
93 BOOL ThreadReceiveValues();
102 void PrintPerformanceStatistics();
108 vector<CSocket> m_vSockets;
113 uint32_t m_nNumOTThreads;
115 uint32_t m_nHelperThreads;
121 uint32_t m_nMyNumInBits;
126 uint32_t m_nSizeOfVal;
132 BYTE* m_cConstantInsecureSeed;
134 vector<Sharing*> m_vSharings;
139 e_Party_Comm, e_Party_Stop,
142 class CPartyWorkerThread:
public CThread {
144 CPartyWorkerThread(uint32_t
id,
ABYParty* callback) :
145 threadid(
id), m_pCallback(callback) {
148 void PutJob(EPartyJobType e) {
156 EPartyJobType m_eJob;
159 BOOL WakeupWorkerThreads(EPartyJobType);
160 BOOL WaitWorkerThreads();
161 BOOL ThreadNotifyTaskDone(BOOL);
163 vector<CPartyWorkerThread*> m_vThreads;
167 uint32_t m_nWorkingThreads;
168 BOOL m_bWorkerThreadSuccess;
172 #endif //__ABYPARTY_H__
Definition: abyparty.h:52
Contains all methods that are processed during the setup phase of ABY.
Definition: abycircuit.h:122
e_mt_gen_alg
Enumeration which defines the method that is used for arithmetic multiplication triple generation...
Definition: constants.h:55
Definition: constants.h:57
e_role
Defines the role of the party or the source / target for certain operations (e.g., input/output)
Definition: constants.h:139
Definition: typedefs.h:79
Definition: abycircuit.h:144
Definition: abysetup.h:77
Definition: cbitvector.h:123