ABY Framework  1.0
Arithmetic Bool Yao Framework
 All Classes Files Functions Variables Enumerations Enumerator Macros
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Circuit Class Referenceabstract

#include <circuit.h>

Inheritance diagram for Circuit:
Inheritance graph
[legend]
Collaboration diagram for Circuit:
Collaboration graph
[legend]

Public Member Functions

 Circuit (ABYCircuit *aby, e_sharing context, e_role myrole, uint32_t bitlen, e_circuit circ)
 
virtual ~Circuit ()
 
void Init ()
 
void Cleanup ()
 
void Reset ()
 
uint32_t GetShareBitLen ()
 
uint32_t GetMaxDepth ()
 
deque< uint32_t > GetLocalQueueOnLvl (uint32_t lvl)
 
deque< uint32_t > GetInteractiveQueueOnLvl (uint32_t lvl)
 
uint32_t GetNumLocalLayers ()
 
uint32_t GetNumInteractiveLayers ()
 
uint32_t GetNumInputBitsForParty (e_role party)
 
uint32_t GetNumOutputBitsForParty (e_role party)
 
deque< uint32_t > GetInputGatesForParty (e_role party)
 
deque< uint32_t > GetOutputGatesForParty (e_role party)
 
e_sharing GetContext ()
 
uint32_t GetNumGates ()
 
UGATE_T * GetOutputGateValue (uint32_t gateid)
 
uint32_t GetOutputGateValue (uint32_t gateid, UGATE_T *&outval)
 
template<class T >
void GetOutputGateValue (uint32_t gateid, T &val)
 
uint32_t GetNumVals (uint32_t gateid)
 
virtual sharePutCONSGate (uint32_t nvals, UGATE_T val, uint32_t bitlen)=0
 
virtual sharePutCONSGate (uint32_t nvals, uint32_t *val, uint32_t bitlen)=0
 
virtual sharePutCONSGate (uint32_t nvals, uint8_t *val, uint32_t bitlen)=0
 
virtual uint32_t PutConstantGate (UGATE_T val, uint32_t nvals=1)=0
 
virtual sharePutINGate (uint32_t nvals, uint64_t val, uint32_t bitlen, e_role role)=0
 
virtual sharePutINGate (uint32_t nvals, uint32_t *val, uint32_t bitlen, e_role role)=0
 
virtual sharePutINGate (uint32_t nvals, uint8_t *val, uint32_t bitlen, e_role role)=0
 
virtual sharePutADDGate (share *ina, share *inb)=0
 
virtual sharePutSUBGate (share *ina, share *inb)=0
 
virtual sharePutANDGate (share *ina, share *inb)=0
 
virtual sharePutXORGate (share *ina, share *inb)=0
 
virtual sharePutMULGate (share *ina, share *inb)=0
 
virtual sharePutGEGate (share *ina, share *inb)=0
 
virtual sharePutEQGate (share *ina, share *inb)=0
 
virtual sharePutMUXGate (share *ina, share *inb, share *sel)=0
 
virtual sharePutY2BGate (share *ina)=0
 
virtual sharePutB2AGate (share *ina)=0
 
virtual sharePutB2YGate (share *ina)=0
 
virtual sharePutA2YGate (share *ina)=0
 
virtual sharePutANDVecGate (share *ina, share *inb)=0
 
virtual sharePutCallbackGate (share *in, uint32_t rounds, void(*callback)(GATE *, void *), void *infos, uint32_t nvals)=0
 
sharePutCombinerGate (share *ina)
 
sharePutSplitterGate (share *ina)
 
sharePutRepeaterGate (uint32_t nvals, share *ina)
 
template<class T >
uint32_t PutINGate (uint32_t nvals, T val)
 
template<class T >
uint32_t PutINGate (uint32_t nvals, T val, e_role role)
 
virtual sharePutOUTGate (share *parent, e_role dst)=0
 
virtual uint32_t PutINVGate (uint32_t parentid)=0
 
e_circuit GetCircuitType ()
 

Protected Member Functions

virtual void UpdateInteractiveQueue (uint32_t gateid)=0
 
virtual void UpdateLocalQueue (uint32_t gateid)=0
 
void UpdateInteractiveQueue (share *gateid)
 
void UpdateLocalQueue (share *gateid)
 

Protected Attributes

ABYCircuitm_cCircuit
 
GATEm_pGates
 
e_sharing m_eContext
 
e_circuit m_eCirctype
 
e_role m_eMyRole
 
uint32_t m_nShareBitLen
 
uint32_t m_nMaxDepth
 
vector< deque< uint32_t > > m_vLocalQueueOnLvl
 
vector< deque< uint32_t > > m_vInteractiveQueueOnLvl
 
vector< deque< uint32_t > > m_vInputGates
 
vector< deque< uint32_t > > m_vOutputGates
 
vector< uint32_t > m_vInputBits
 
vector< uint32_t > m_vOutputBits
 
uint32_t m_nMULs
 
uint32_t m_nCONVGates
 
uint32_t m_nGates
 
uint32_t m_nRoundsAND
 
uint32_t m_nRoundsXOR
 
vector< uint32_t > m_nRoundsIN
 
vector< uint32_t > m_nRoundsOUT
 
const deque< uint32_t > EMPTYQUEUE
 

Detailed Description

Circuit class

Constructor & Destructor Documentation

Circuit::Circuit ( ABYCircuit aby,
e_sharing  context,
e_role  myrole,
uint32_t  bitlen,
e_circuit  circ 
)
inline

Constructor of the class.

virtual Circuit::~Circuit ( )
inlinevirtual

Destructor of the class.

Member Function Documentation

void Circuit::Cleanup ( )

Incomplete method

deque<uint32_t> Circuit::GetInputGatesForParty ( e_role  party)
inline

It is a getter method which returns the Input Gates provided for the given party

Parameters
partyParty role based on which the Input gates are returned.
Returns
Input gates for the provided party
deque<uint32_t> Circuit::GetInteractiveQueueOnLvl ( uint32_t  lvl)
inline

It is a getter method which returns the Interactive queue based on the inputed level.

Parameters
lvlRequired level of interactive queue.
Returns
Interactive queue on the required level
deque<uint32_t> Circuit::GetLocalQueueOnLvl ( uint32_t  lvl)
inline

It is a getter method which returns the Local queue based on the inputed level.

Parameters
lvlRequired level of local queue.
Returns
Local queue on the required level
uint32_t Circuit::GetMaxDepth ( )
inline

It is a getter method which will return the value of Maximum Depth.

uint32_t Circuit::GetNumInputBitsForParty ( e_role  party)
inline

It is a getter method which returns the number of Input bits provided for the given party

Parameters
partyParty role based on which the number of Input bits are returned.
Returns
Number of Input bits for the provided party
uint32_t Circuit::GetNumInteractiveLayers ( )
inline

It is a getter method which returns the number of levels/layers in the Interactive queue.

Returns
Number of layers in the Interactive Queue.
uint32_t Circuit::GetNumLocalLayers ( )
inline

It is a getter method which returns the number of levels/layers in the Local queue.

Returns
Number of layers in the Local Queue.
uint32_t Circuit::GetNumOutputBitsForParty ( e_role  party)
inline

It is a getter method which returns the number of Output bits provided for the given party

Parameters
partyParty role based on which the number of Output bits are returned.
Returns
Number of Output bits for the provided party
deque<uint32_t> Circuit::GetOutputGatesForParty ( e_role  party)
inline

It is a getter method which returns the Output Gates provided for the given party

Parameters
partyParty role based on which the Output gates are returned.
Returns
Output gates for the provided party
uint32_t Circuit::GetShareBitLen ( )
inline

It is a getter method which will return the value of Bit Length of the share object.

Returns
Bit length of share Object.
void Circuit::Init ( )

Method performs the initialization of member objects of the Circuit class. It is called from Constructor of the class [Circuit(ABYCircuit* aby, e_sharing context, e_role myrole, uint32_t bitlen, e_circuit circ)]

void Circuit::Reset ( )

It will reset all the member objects to zero/clear them.

Member Data Documentation

e_sharing Circuit::m_eContext
protected

Gates vector which stores the

GATE* Circuit::m_pGates
protected

ABYCircuit Object


The documentation for this class was generated from the following files: