19 #ifndef __BOOLSHARING_H__
20 #define __BOOLSHARING_H__
24 #include "../circuit/booleancircuits.h"
36 Sharing(role, sharebitlen, circuit, crypt) {
57 inline void UsedGate(uint32_t gateid);
59 void GetDataToSend(vector<BYTE*>& sendbuf, vector<uint32_t>& bytesize);
62 void EvaluateSIMDGate(uint32_t gateid);
65 return m_cBoolCircuit;
77 return m_nTotalNumMTs;
82 vector<uint32_t> GetNumOTs() {
95 uint32_t m_nNumANDSizes;
97 uint32_t m_nTotalNumMTs;
98 vector<uint32_t> m_nNumMTs;
102 vector<uint32_t> m_vMTStartIdx;
103 vector<uint32_t> m_vMTIdx;
104 vector<vector<uint32_t> > m_vANDGates;
105 vector<uint32_t> m_vInputShareGates;
106 vector<uint32_t> m_vOutputShareGates;
108 uint32_t m_nInputShareSndSize;
109 uint32_t m_nOutputShareSndSize;
111 uint32_t m_nInputShareRcvSize;
112 uint32_t m_nOutputShareRcvSize;
114 vector<CBitVector> m_vA;
115 vector<CBitVector> m_vB;
116 vector<CBitVector> m_vS;
117 vector<CBitVector> m_vC;
118 vector<CBitVector> m_vD_snd;
119 vector<CBitVector> m_vE_snd;
120 vector<CBitVector> m_vD_rcv;
121 vector<CBitVector> m_vE_rcv;
122 vector<CBitVector> m_vResA;
123 vector<CBitVector> m_vResB;
138 inline void ShareValues(uint32_t gateid);
143 inline void ReconstructValue(uint32_t gateid);
148 void AssignInputShares();
152 void AssignOutputShares();
158 inline void SelectiveOpen(uint32_t gateid);
163 inline void SelectiveOpenVec(uint32_t gateid);
171 void EvaluateANDGate();
177 inline void EvaluateXORGate(uint32_t gateid);
183 inline void EvaluateINVGate(uint32_t gateid);
189 inline void EvaluateCONVGate(uint32_t gateid);
195 inline void EvaluateConstantGate(uint32_t gateid);
199 void InitializeMTs();
Definition: booleancircuits.h:27
~BoolSharing()
Definition: boolsharing.h:41
void FinishSetupPhase(ABYSetup *setup)
Definition: boolsharing.cpp:100
void InstantiateGate(GATE *gate)
Definition: boolsharing.cpp:746
void FinishCircuitLayer()
Definition: boolsharing.cpp:476
uint32_t GetMaxCommunicationRounds()
Definition: boolsharing.h:72
uint32_t GetNumNonLinearOperations()
Definition: boolsharing.h:76
uint32_t GetMaxDepth()
Definition: circuit.h:70
void GetBuffersToReceive(vector< BYTE * > &rcvbuf, vector< uint32_t > &rcvbytes)
Definition: boolsharing.cpp:717
Sharing class. A virtual class that contains the methods which the sharing schemes have to implement...
void Reset()
Definition: boolsharing.cpp:910
void PrintPerformanceStatistics()
Definition: boolsharing.cpp:903
Definition: abycircuit.h:122
Definition: boolsharing.h:30
Definition: xormasking.h:24
void PerformSetupPhase(ABYSetup *setup)
Definition: boolsharing.cpp:97
void GetDataToSend(vector< BYTE * > &sendbuf, vector< uint32_t > &bytesize)
Definition: boolsharing.cpp:676
uint32_t AssignInput(CBitVector &input)
Definition: boolsharing.cpp:860
void EvaluateLocalOperations(uint32_t level)
Definition: boolsharing.cpp:227
void PrepareSetupPhase(ABYSetup *setup)
Definition: boolsharing.cpp:52
void EvaluateInteractiveOperations(uint32_t level)
Definition: boolsharing.cpp:266
BoolSharing(e_role role, uint32_t sharebitlen, ABYCircuit *circuit, crypto *crypt)
Definition: boolsharing.h:34
e_role
Defines the role of the party or the source / target for certain operations (e.g., input/output)
Definition: constants.h:139
uint32_t GetOutput(CBitVector &out)
Definition: boolsharing.cpp:886
const char * sharing_type()
Definition: boolsharing.h:87
void UsedGate(uint32_t gateid)
Definition: boolsharing.cpp:751
Definition: abycircuit.h:144
Definition: abysetup.h:77
Definition: abycircuit.h:137
void PrepareOnlinePhase()
Definition: boolsharing.cpp:157
Definition: cbitvector.h:123
Circuit * GetCircuitBuildRoutine()
Definition: boolsharing.h:64