19 #ifndef __YAOSERVERSHARING_H__
20 #define __YAOSERVERSHARING_H__
47 YaoSharing(role, sharebitlen, circuit, crypt) {
66 void SendConversionValues(uint32_t gateid);
75 void GetDataToSend(vector<BYTE*>& sendbuf, vector<uint32_t>& bytesize);
93 vector<CBitVector> m_vROTMasks;
94 uint32_t m_nClientInputKexIdx;
95 uint32_t m_nClientInputKeyCtr;
98 vector<CBitVector> m_vClientKeySndBuf;
107 vector<GATE*> m_vServerOutputGates;
109 uint32_t m_nOutputShareRcvCtr;
111 uint64_t m_nPermBitCtr;
112 uint32_t m_nServerInBitCtr;
114 uint32_t m_nServerKeyCtr;
115 uint32_t m_nClientInBitCtr;
117 uint8_t* m_bLMaskBuf[2];
118 uint8_t* m_bRMaskBuf[2];
120 uint8_t* m_bOKeyBuf[2];
124 vector<uint32_t> m_vClientInputGate;
125 deque<input_gate_val_t> m_vPreSetInputGates;
126 deque<a2y_gate_pos_t> m_vPreSetA2YPositions;
127 e_role* m_vOutputDestionations;
128 uint32_t m_nOutputDestionationsCtr;
143 void CreateRandomWireKeys(
CBitVector& vec, uint32_t numkeys);
148 void CreateAndSendGarbledCircuit(
ABYSetup* setup);
152 void ReceiveGarbledCircuit();
158 void EvaluateInputGate(uint32_t gateid);
164 void EvaluateXORGate(
GATE* gate);
170 void EvaluateANDGate(
GATE* gate);
176 void EvaluateSIMDGate(uint32_t gateid);
182 void EvaluateInversionGate(
GATE* gate);
188 void EvaluateConversionGate(uint32_t gateid);
196 void CreateGarbledTable(
GATE* ggate, uint32_t pos,
GATE* gleft,
GATE* gright);
201 void PrecomputeGC(deque<uint32_t>& queue);
204 void CollectClientOutputShares();
210 void EvaluateOutputGate(
GATE* gate);
216 void SendServerInputKey(uint32_t gateid);
221 void SendClientInputKey(uint32_t gateid);
225 void AssignOutputShares();
void EvaluateInteractiveOperations(uint32_t gateid)
Definition: yaoserversharing.cpp:181
void GetDataToSend(vector< BYTE * > &sendbuf, vector< uint32_t > &bytesize)
Definition: yaoserversharing.cpp:661
void Reset()
Definition: yaoserversharing.cpp:968
const char * sharing_type()
Definition: yaoserversharing.h:81
Definition: yaoserversharing.h:40
Sharing class. A virtual class that contains the methods which the sharing schemes have to implement...
void InstantiateGate(GATE *gate)
Definition: yaoserversharing.cpp:843
Definition: abycircuit.h:122
uint32_t AssignInput(CBitVector &input)
Definition: yaoserversharing.cpp:925
~YaoServerSharing()
Definition: yaoserversharing.h:54
void FinishCircuitLayer()
Definition: yaoserversharing.cpp:689
uint32_t GetOutput(CBitVector &out)
Definition: yaoserversharing.cpp:951
YaoServerSharing(e_role role, uint32_t sharebitlen, ABYCircuit *circuit, crypto *crypt)
Definition: yaoserversharing.h:46
Definition: yaosharing.h:42
void PrepareSetupPhase(ABYSetup *setup)
Definition: yaoserversharing.cpp:56
void FinishSetupPhase(ABYSetup *setup)
Definition: yaoserversharing.cpp:137
void PerformSetupPhase(ABYSetup *setup)
Definition: yaoserversharing.cpp:129
void EvaluateLocalOperations(uint32_t gateid)
Definition: yaoserversharing.cpp:177
e_role
Defines the role of the party or the source / target for certain operations (e.g., input/output)
Definition: constants.h:139
void PrepareOnlinePhase()
Definition: yaoserversharing.cpp:275
void GetBuffersToReceive(vector< BYTE * > &rcvbuf, vector< uint32_t > &rcvbytes)
Definition: yaoserversharing.cpp:791
Definition: abycircuit.h:144
Definition: abysetup.h:77
void UsedGate(uint32_t gateid)
Definition: yaoserversharing.cpp:853
Definition: cbitvector.h:123
Definition: yaoserversharing.h:31