19 #ifndef __ARITHSHARING_H__
20 #define __ARITHSHARING_H__
24 #include "../circuit/arithmeticcircuits.h"
36 Sharing(role, sharebitlen, circuit, crypt) {
62 void GetDataToSend(vector<BYTE*>& sendbuf, vector<uint32_t>& bytesize);
78 return m_cArithCircuit;
113 uint32_t m_nNumCONVs;
115 uint32_t m_nTypeBitLen;
116 uint64_t m_nTypeBitMask;
118 vector<uint32_t> m_vMTStartIdx;
119 vector<uint32_t> m_vMTIdx;
120 vector<GATE*> m_vMULGates;
121 vector<GATE*> m_vInputShareGates;
122 vector<GATE*> m_vOutputShareGates;
123 vector<GATE*> m_vCONVGates;
125 uint32_t m_nInputShareSndCtr;
126 uint32_t m_nOutputShareSndCtr;
128 uint32_t m_nInputShareRcvCtr;
129 uint32_t m_nOutputShareRcvCtr;
131 vector<CBitVector> m_vA;
132 vector<CBitVector> m_vB;
133 vector<CBitVector> m_vS;
134 vector<CBitVector> m_vC;
135 vector<CBitVector> m_vD_snd;
136 vector<CBitVector> m_vE_snd;
137 vector<CBitVector> m_vD_rcv;
138 vector<CBitVector> m_vE_rcv;
139 vector<CBitVector> m_vResA;
140 vector<CBitVector> m_vResB;
151 vector<CBitVector> m_vConversionMasks;
155 uint32_t m_nConvShareIdx;
156 uint32_t m_nConvShareSndCtr;
157 uint32_t m_nConvShareRcvCtr;
162 void ShareValues(
GATE* gate);
167 void ReconstructValue(
GATE* gate);
171 void AssignInputShares();
176 void AssignOutputShares();
182 void SelectiveOpen(
GATE* gate);
191 void EvaluateADDGate(
GATE* gate);
195 void EvaluateMULGate();
200 void AssignConversionShares();
205 void AssignServerConversionShares();
210 void AssignClientConversionShares();
212 #ifdef VERIFY_ARITH_MT
214 void VerifyArithMT(
ABYSetup* setup);
224 void ComputeMTsFromOTs();
228 void FinishMTGeneration();
Definition: arithsharing.h:31
void GetDataToSend(vector< BYTE * > &sendbuf, vector< uint32_t > &bytesize)
Definition: arithsharing.cpp:731
const char * sharing_type()
Definition: arithsharing.h:82
void EvaluateINVGate(GATE *gate)
Definition: arithsharing.cpp:715
uint32_t GetMaxDepth()
Definition: circuit.h:70
void EvaluateSIMDGate(uint32_t gateid)
Definition: arithsharing.cpp:856
Sharing class. A virtual class that contains the methods which the sharing schemes have to implement...
void PrepareSetupPhase(ABYSetup *setup)
Definition: arithsharing.cpp:70
void EvaluateInteractiveOperations(uint32_t gateid)
Definition: arithsharing.cpp:294
void FinishSetupPhase(ABYSetup *setup)
Definition: arithsharing.cpp:145
uint32_t GetMaxCommunicationRounds()
Definition: arithsharing.h:68
Definition: abycircuit.h:122
uint32_t GetNumNonLinearOperations()
Definition: arithsharing.h:72
e_mt_gen_alg
Enumeration which defines the method that is used for arithmetic multiplication triple generation...
Definition: constants.h:55
void GetBuffersToReceive(vector< BYTE * > &rcvbuf, vector< uint32_t > &rcvbytes)
Definition: arithsharing.cpp:788
void InstantiateGate(GATE *gate)
Definition: arithsharing.cpp:840
ArithSharing(e_role role, uint32_t sharebitlen, ABYCircuit *circuit, crypto *crypt, e_mt_gen_alg mt_alg)
Definition: arithsharing.h:35
void EvaluateLocalOperations(uint32_t gateid)
Definition: arithsharing.cpp:256
uint32_t AssignInput(CBitVector &input)
Definition: arithsharing.cpp:990
uint32_t GetOutput(CBitVector &out)
Definition: arithsharing.cpp:1016
void FinishCircuitLayer()
Definition: arithsharing.cpp:477
e_role
Defines the role of the party or the source / target for certain operations (e.g., input/output)
Definition: constants.h:139
void PrintPerformanceStatistics()
Definition: arithsharing.cpp:1035
void Reset()
Definition: arithsharing.cpp:1040
void EvaluateCONVGate(GATE *gate)
Definition: arithsharing.cpp:399
Definition: abycircuit.h:144
Definition: abysetup.h:77
void PerformSetupPhase(ABYSetup *setup)
Definition: arithsharing.cpp:140
void UsedGate(uint32_t gateid)
Definition: arithsharing.cpp:846
void PrepareOnlinePhase()
Definition: arithsharing.cpp:232
Definition: arithmeticcircuits.h:27
Definition: cbitvector.h:123
Circuit * GetCircuitBuildRoutine()
Definition: arithsharing.h:77
~ArithSharing()
Definition: arithsharing.h:42