19 #ifndef __YAOSHARING_H__
20 #define __YAOSHARING_H__
23 #include "../util/yaokey.h"
24 #include "../circuit/booleancircuits.h"
25 #include "../util/constants.h"
27 #define FIXED_KEY_GARBLING
37 #define KEYS_PER_GATE_IN_TABLE 2
48 Sharing(role, sharebitlen, circuit, crypt) {
58 virtual void Reset() = 0;
69 virtual void UsedGate(uint32_t gateid) = 0;
71 virtual void GetDataToSend(vector<BYTE*>& sendbuf, vector<uint32_t>& bytesize) = 0;
139 #ifdef FIXED_KEY_GARBLING
void PrintPerformanceStatistics()
Definition: yaosharing.cpp:85
virtual void PrepareSetupPhase(ABYSetup *setup)=0
uint64_t m_nANDWindowCtr
Definition: yaosharing.h:136
uint32_t m_nSecParamIters
Definition: yaosharing.h:134
virtual void FinishSetupPhase(ABYSetup *setup)=0
virtual void FinishCircuitLayer()=0
Definition: booleancircuits.h:27
void PrintKey(BYTE *key)
Definition: yaosharing.cpp:78
uint32_t m_nANDGates
Definition: yaosharing.h:103
CBitVector m_vClientInputKeys
Definition: yaosharing.h:118
uint32_t m_nClientInputBits
Definition: yaosharing.h:117
uint32_t GetMaxDepth()
Definition: circuit.h:70
vector< GATE * > m_vANDGates
Definition: yaosharing.h:107
void Init()
Definition: yaosharing.cpp:21
Sharing class. A virtual class that contains the methods which the sharing schemes have to implement...
~YaoSharing()
Definition: yaosharing.h:53
BYTE * m_bZeroBuf
Definition: yaosharing.h:129
virtual void EvaluateLocalOperations(uint32_t gateid)=0
uint32_t GetMaxCommunicationRounds()
Definition: yaosharing.h:77
BYTE * m_bTempKeyBuf
Definition: yaosharing.h:130
Definition: abycircuit.h:122
virtual void GetBuffersToReceive(vector< BYTE * > &rcvbuf, vector< uint32_t > &rcvbytes)=0
AES_KEY_CTX * m_kGarble
Definition: yaosharing.h:141
vector< GATE * > m_vOutputShareGates
Definition: yaosharing.h:109
Circuit * GetCircuitBuildRoutine()
Definition: yaosharing.h:86
Definition: xormasking.h:24
CBitVector m_vGarbledCircuit
Definition: yaosharing.h:126
virtual void PerformSetupPhase(ABYSetup *setup)=0
uint64_t m_nGarbledTableCtr
Definition: yaosharing.h:127
uint32_t m_nConversionInputBits
Definition: yaosharing.h:120
uint64_t m_nRemANDGates
Definition: yaosharing.h:137
Definition: yaosharing.h:42
YaoSharing(e_role role, uint32_t sharebitlen, ABYCircuit *circuit, crypto *crypt)
Definition: yaosharing.h:47
uint32_t m_nOutputShareRcvSize
Definition: yaosharing.h:115
virtual uint32_t GetOutput(CBitVector &out)=0
virtual uint32_t AssignInput(CBitVector &input)=0
e_role
Defines the role of the party or the source / target for certain operations (e.g., input/output)
Definition: constants.h:139
XORMasking * fMaskFct
Definition: yaosharing.h:106
virtual void PrepareOnlinePhase()=0
BOOL EncryptWire(BYTE *c, BYTE *p, uint32_t id)
Definition: yaosharing.cpp:41
virtual void GetDataToSend(vector< BYTE * > &sendbuf, vector< uint32_t > &bytesize)=0
void EvaluateSIMDGate(uint32_t gateid)
uint32_t m_nInputShareSndSize
Definition: yaosharing.h:111
virtual void InstantiateGate(GATE *gate)=0
BooleanCircuit * m_cBoolCircuit
Definition: yaosharing.h:132
uint32_t GetNumNonLinearOperations()
Definition: yaosharing.h:81
BYTE * m_bResKeyBuf
Definition: yaosharing.h:140
CBitVector m_vServerInputKeys
Definition: yaosharing.h:124
YaoKey * m_pKeyOps
Definition: yaosharing.h:102
virtual void UsedGate(uint32_t gateid)=0
uint32_t m_nXORGates
Definition: yaosharing.h:104
Definition: abycircuit.h:144
uint32_t m_nOutputShareSndSize
Definition: yaosharing.h:112
uint32_t m_nServerInputBits
Definition: yaosharing.h:123
Definition: abysetup.h:77
uint32_t m_nInputShareRcvSize
Definition: yaosharing.h:114
Definition: cbitvector.h:123