19 #ifndef __ARITHMETICCIRCUITS_H_
20 #define __ARITHMETICCIRCUITS_H_
22 #include "../util/typedefs.h"
43 uint32_t PutMULGate(uint32_t left, uint32_t right);
44 uint32_t PutADDGate(uint32_t left, uint32_t right);
46 uint32_t PutINGate(uint32_t nvals,
e_role src);
47 share* PutINGate(uint32_t nvals, uint64_t val, uint32_t bitlen,
e_role role);
48 share* PutINGate(uint32_t nvals, uint8_t* val, uint32_t bitlen,
e_role role);
49 share* PutINGate(uint32_t nvals, uint32_t* val, uint32_t bitlen,
e_role role);
50 template<
class T> uint32_t PutINGate(uint32_t nvals, T val);
51 template<
class T> uint32_t PutINGate(uint32_t nvals, T val,
e_role role);
52 uint32_t PutOUTGate(uint32_t parent,
e_role dst);
55 share* PutCallbackGate(
share* in, uint32_t rounds,
void (*callback)(
GATE*,
void*),
void* infos, uint32_t nvals);
57 uint32_t PutINVGate(uint32_t parentid);
58 uint32_t PutCONVGate(vector<uint32_t>& parentids);
63 cerr <<
"SUB not implemented in arithmetic sharing" << endl;
67 cerr <<
"AND not implemented in arithmetic sharing" << endl;
71 cerr <<
"XOR not implemented in arithmetic sharing" << endl;
75 cerr <<
"Sub not implemented in arithmetic sharing" << endl;
81 cerr <<
"GE not implemented in arithmetic sharing" << endl;
85 cerr <<
"EQ not implemented in arithmetic sharing" << endl;
89 cerr <<
"MUX not implemented in arithmetic sharing" << endl;
93 cerr <<
"Y2B not implemented in arithmetic sharing" << endl;
97 cerr <<
"B2Y not implemented in arithmetic sharing" << endl;
101 cerr <<
"A2Y not implemented in arithmetic sharing" << endl;
105 cerr <<
"ANDVec Gate not implemented in arithmetic sharing" << endl;
108 uint32_t PutB2AGate(vector<uint32_t> ina);
113 uint32_t GetNumMULGates() {
117 uint32_t GetNumCONVGates() {
123 share* PutCONSGate(uint32_t nvals, UGATE_T val, uint32_t bitlen);
124 share* PutCONSGate(uint32_t nvals, uint8_t* val, uint32_t bitlen);
125 share* PutCONSGate(uint32_t nvals, uint32_t* val, uint32_t bitlen);
126 uint32_t PutConstantGate(UGATE_T val, uint32_t nvals = 1);
127 uint32_t GetMaxCommunicationRounds() {
133 void UpdateInteractiveQueue(uint32_t gateid);
134 void UpdateLocalQueue(uint32_t gateid);
137 uint32_t m_nCONVGates;
Definition: abycircuit.h:122
Definition: circuit.h:258
Contains the class for generic circuits, which is a super-class of Boolean and Arithmetic circuits...
Circuit(ABYCircuit *aby, e_sharing context, e_role myrole, uint32_t bitlen, e_circuit circ)
Definition: circuit.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
Definition: abycircuit.h:144
e_sharing
Enumeration which defines the different sharing which are there in the framework. ...
Definition: constants.h:124
Definition: constants.h:47
Definition: arithmeticcircuits.h:27
Definition: circuit.h:360