MOTION  0.01
Framework for mixed-protocol multi-party computation
Public Member Functions | List of all members
encrypto::motion::Backend Class Reference

#include <backend.h>

Inheritance diagram for encrypto::motion::Backend:
Inheritance graph
[legend]
Collaboration diagram for encrypto::motion::Backend:
Collaboration graph
[legend]

Public Member Functions

 Backend ()=delete
 
 Backend (communication::CommunicationLayer &communication_layer, ConfigurationPointer &configuration, std::shared_ptr< Logger > logger)
 
 ~Backend ()
 
const ConfigurationPointerGetConfiguration () const noexcept
 
const LoggerPointerGetLogger () const noexcept
 
const RegisterPointerGetRegister () const noexcept
 
std::size_t NextGateId () const
 
void Send (std::size_t party_id, flatbuffers::FlatBufferBuilder &&message)
 
void RegisterInputGate (const InputGatePointer &input_gate)
 
void RegisterGate (const GatePointer &gate)
 
void RunPreprocessing ()
 
void EvaluateSequential ()
 
void EvaluateParallel ()
 
const GatePointerGetGate (std::size_t gate_id) const
 
const std::vector< GatePointer > & GetInputGates () const
 
void Reset ()
 
void Clear ()
 
SharePointer BooleanGmwInput (std::size_t party_id, bool input=false)
 
SharePointer BooleanGmwInput (std::size_t party_id, const BitVector<> &input)
 
SharePointer BooleanGmwInput (std::size_t party_id, BitVector<> &&input)
 
SharePointer BooleanGmwInput (std::size_t party_id, std::span< const BitVector<>> input)
 
SharePointer BooleanGmwInput (std::size_t party_id, std::vector< BitVector<>> &&input)
 
SharePointer BooleanGmwXor (const proto::boolean_gmw::SharePointer &a, const proto::boolean_gmw::SharePointer &b)
 
SharePointer BooleanGmwXor (const SharePointer &a, const SharePointer &b)
 
SharePointer BooleanGmwAnd (const proto::boolean_gmw::SharePointer &a, const proto::boolean_gmw::SharePointer &b)
 
SharePointer BooleanGmwAnd (const SharePointer &a, const SharePointer &b)
 
SharePointer BooleanGmwMux (const proto::boolean_gmw::SharePointer &a, const proto::boolean_gmw::SharePointer &b, const proto::boolean_gmw::SharePointer &selection)
 
SharePointer BooleanGmwMux (const SharePointer &a, const SharePointer &b, const SharePointer &selection)
 
SharePointer BooleanGmwOutput (const SharePointer &parent, std::size_t output_owner)
 
SharePointer BmrInput (std::size_t party_id, bool input=false)
 
SharePointer BmrInput (std::size_t party_id, const BitVector<> &input)
 
SharePointer BmrInput (std::size_t party_id, BitVector<> &&input)
 
SharePointer BmrInput (std::size_t party_id, std::span< const BitVector<>> input)
 
SharePointer BmrInput (std::size_t party_id, std::vector< BitVector<>> &&input)
 
SharePointer BmrOutput (const SharePointer &parent, std::size_t output_owner)
 
template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
SharePointer ConstantArithmeticGmwInput (T input=0)
 
template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
SharePointer ConstantArithmeticGmwInput (const std::vector< T > &input_vector)
 
template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
SharePointer ConstantArithmeticGmwInput (std::vector< T > &&input_vector)
 
template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
SharePointer ArithmeticGmwInput (std::size_t party_id, T input=0)
 
template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
SharePointer ArithmeticGmwInput (std::size_t party_id, const std::vector< T > &input_vector)
 
template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
SharePointer ArithmeticGmwInput (std::size_t party_id, std::vector< T > &&input_vector)
 
template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
SharePointer ArithmeticGmwOutput (const proto::arithmetic_gmw::SharePointer< T > &parent, std::size_t output_owner)
 
template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
SharePointer ArithmeticGmwOutput (const SharePointer &parent, std::size_t output_owner)
 
template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
SharePointer ArithmeticGmwAddition (const proto::arithmetic_gmw::SharePointer< T > &a, const proto::arithmetic_gmw::SharePointer< T > &b)
 
template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
SharePointer ArithmeticGmwAddition (const SharePointer &a, const SharePointer &b)
 
template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
SharePointer ArithmeticGmwSubtraction (const proto::arithmetic_gmw::SharePointer< T > &a, const proto::arithmetic_gmw::SharePointer< T > &b)
 
template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
SharePointer ArithmeticGmwSubtraction (const SharePointer &a, const SharePointer &b)
 
void Synchronize ()
 Blocking wait for synchronizing between parties. Called in Clear() and Reset() More...
 
void ComputeBaseOts ()
 
void ImportBaseOts (std::size_t i, const ReceiverMessage &messages)
 
void ImportBaseOts (std::size_t i, const SenderMessage &messages)
 
std::pair< ReceiverMessage, SenderMessageExportBaseOts (std::size_t i)
 
void OtExtensionSetup ()
 
communication::CommunicationLayerGetCommunicationLayer ()
 
BaseProviderGetBaseProvider ()
 
proto::bmr::ProviderGetBmrProvider ()
 
auto & GetBaseOtProvider ()
 
OtProviderGetOtProvider (std::size_t party_id)
 
auto & GetMtProvider ()
 
auto & GetSpProvider ()
 
auto & GetSbProvider ()
 
const auto & GetRunTimeStatistics () const
 
auto & GetMutableRunTimeStatistics ()
 

Constructor & Destructor Documentation

◆ Backend() [1/2]

encrypto::motion::Backend::Backend ( )
delete

◆ Backend() [2/2]

encrypto::motion::Backend::Backend ( communication::CommunicationLayer communication_layer,
ConfigurationPointer configuration,
std::shared_ptr< Logger logger 
)
Here is the call graph for this function:

◆ ~Backend()

encrypto::motion::Backend::~Backend ( )
default

Member Function Documentation

◆ ArithmeticGmwAddition() [1/2]

template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
SharePointer encrypto::motion::Backend::ArithmeticGmwAddition ( const proto::arithmetic_gmw::SharePointer< T > &  a,
const proto::arithmetic_gmw::SharePointer< T > &  b 
)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ArithmeticGmwAddition() [2/2]

template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
SharePointer encrypto::motion::Backend::ArithmeticGmwAddition ( const SharePointer a,
const SharePointer b 
)
inline
Here is the call graph for this function:

◆ ArithmeticGmwInput() [1/3]

template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
SharePointer encrypto::motion::Backend::ArithmeticGmwInput ( std::size_t  party_id,
const std::vector< T > &  input_vector 
)
inline
Here is the call graph for this function:

◆ ArithmeticGmwInput() [2/3]

template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
SharePointer encrypto::motion::Backend::ArithmeticGmwInput ( std::size_t  party_id,
std::vector< T > &&  input_vector 
)
inline
Here is the call graph for this function:

◆ ArithmeticGmwInput() [3/3]

template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
SharePointer encrypto::motion::Backend::ArithmeticGmwInput ( std::size_t  party_id,
input = 0 
)
inline

◆ ArithmeticGmwOutput() [1/2]

template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
SharePointer encrypto::motion::Backend::ArithmeticGmwOutput ( const proto::arithmetic_gmw::SharePointer< T > &  parent,
std::size_t  output_owner 
)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ArithmeticGmwOutput() [2/2]

template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
SharePointer encrypto::motion::Backend::ArithmeticGmwOutput ( const SharePointer parent,
std::size_t  output_owner 
)
inline
Here is the call graph for this function:

◆ ArithmeticGmwSubtraction() [1/2]

template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
SharePointer encrypto::motion::Backend::ArithmeticGmwSubtraction ( const proto::arithmetic_gmw::SharePointer< T > &  a,
const proto::arithmetic_gmw::SharePointer< T > &  b 
)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ArithmeticGmwSubtraction() [2/2]

template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
SharePointer encrypto::motion::Backend::ArithmeticGmwSubtraction ( const SharePointer a,
const SharePointer b 
)
inline
Here is the call graph for this function:

◆ BmrInput() [1/5]

SharePointer encrypto::motion::Backend::BmrInput ( std::size_t  party_id,
BitVector<> &&  input 
)
Here is the call graph for this function:

◆ BmrInput() [2/5]

SharePointer encrypto::motion::Backend::BmrInput ( std::size_t  party_id,
bool  input = false 
)
Here is the caller graph for this function:

◆ BmrInput() [3/5]

SharePointer encrypto::motion::Backend::BmrInput ( std::size_t  party_id,
const BitVector<> &  input 
)
Here is the call graph for this function:

◆ BmrInput() [4/5]

SharePointer encrypto::motion::Backend::BmrInput ( std::size_t  party_id,
std::span< const BitVector<>>  input 
)
Here is the call graph for this function:

◆ BmrInput() [5/5]

SharePointer encrypto::motion::Backend::BmrInput ( std::size_t  party_id,
std::vector< BitVector<>> &&  input 
)
Here is the call graph for this function:

◆ BmrOutput()

SharePointer encrypto::motion::Backend::BmrOutput ( const SharePointer parent,
std::size_t  output_owner 
)
Here is the call graph for this function:

◆ BooleanGmwAnd() [1/2]

SharePointer encrypto::motion::Backend::BooleanGmwAnd ( const proto::boolean_gmw::SharePointer a,
const proto::boolean_gmw::SharePointer b 
)
Here is the call graph for this function:

◆ BooleanGmwAnd() [2/2]

SharePointer encrypto::motion::Backend::BooleanGmwAnd ( const SharePointer a,
const SharePointer b 
)

◆ BooleanGmwInput() [1/5]

SharePointer encrypto::motion::Backend::BooleanGmwInput ( std::size_t  party_id,
BitVector<> &&  input 
)
Here is the call graph for this function:

◆ BooleanGmwInput() [2/5]

SharePointer encrypto::motion::Backend::BooleanGmwInput ( std::size_t  party_id,
bool  input = false 
)
Here is the caller graph for this function:

◆ BooleanGmwInput() [3/5]

SharePointer encrypto::motion::Backend::BooleanGmwInput ( std::size_t  party_id,
const BitVector<> &  input 
)
Here is the call graph for this function:

◆ BooleanGmwInput() [4/5]

SharePointer encrypto::motion::Backend::BooleanGmwInput ( std::size_t  party_id,
std::span< const BitVector<>>  input 
)
Here is the call graph for this function:

◆ BooleanGmwInput() [5/5]

SharePointer encrypto::motion::Backend::BooleanGmwInput ( std::size_t  party_id,
std::vector< BitVector<>> &&  input 
)
Here is the call graph for this function:

◆ BooleanGmwMux() [1/2]

SharePointer encrypto::motion::Backend::BooleanGmwMux ( const proto::boolean_gmw::SharePointer a,
const proto::boolean_gmw::SharePointer b,
const proto::boolean_gmw::SharePointer selection 
)
Here is the call graph for this function:

◆ BooleanGmwMux() [2/2]

SharePointer encrypto::motion::Backend::BooleanGmwMux ( const SharePointer a,
const SharePointer b,
const SharePointer selection 
)

◆ BooleanGmwOutput()

SharePointer encrypto::motion::Backend::BooleanGmwOutput ( const SharePointer parent,
std::size_t  output_owner 
)
Here is the call graph for this function:

◆ BooleanGmwXor() [1/2]

SharePointer encrypto::motion::Backend::BooleanGmwXor ( const proto::boolean_gmw::SharePointer a,
const proto::boolean_gmw::SharePointer b 
)
Here is the call graph for this function:

◆ BooleanGmwXor() [2/2]

SharePointer encrypto::motion::Backend::BooleanGmwXor ( const SharePointer a,
const SharePointer b 
)

◆ Clear()

void encrypto::motion::Backend::Clear ( )

◆ ComputeBaseOts()

void encrypto::motion::Backend::ComputeBaseOts ( )
Here is the caller graph for this function:

◆ ConstantArithmeticGmwInput() [1/3]

template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
SharePointer encrypto::motion::Backend::ConstantArithmeticGmwInput ( const std::vector< T > &  input_vector)
inline
Here is the call graph for this function:

◆ ConstantArithmeticGmwInput() [2/3]

template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
SharePointer encrypto::motion::Backend::ConstantArithmeticGmwInput ( std::vector< T > &&  input_vector)
inline
Here is the call graph for this function:

◆ ConstantArithmeticGmwInput() [3/3]

template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
SharePointer encrypto::motion::Backend::ConstantArithmeticGmwInput ( input = 0)
inline

◆ EvaluateParallel()

void encrypto::motion::Backend::EvaluateParallel ( )

◆ EvaluateSequential()

void encrypto::motion::Backend::EvaluateSequential ( )

◆ ExportBaseOts()

std::pair< ReceiverMessage, SenderMessage > encrypto::motion::Backend::ExportBaseOts ( std::size_t  i)

◆ GetBaseOtProvider()

auto& encrypto::motion::Backend::GetBaseOtProvider ( )
inline

◆ GetBaseProvider()

BaseProvider& encrypto::motion::Backend::GetBaseProvider ( )
inline
Here is the caller graph for this function:

◆ GetBmrProvider()

proto::bmr::Provider& encrypto::motion::Backend::GetBmrProvider ( )
inline
Here is the caller graph for this function:

◆ GetCommunicationLayer()

communication::CommunicationLayer& encrypto::motion::Backend::GetCommunicationLayer ( )
inline
Here is the caller graph for this function:

◆ GetConfiguration()

const ConfigurationPointer& encrypto::motion::Backend::GetConfiguration ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ GetGate()

const GatePointer & encrypto::motion::Backend::GetGate ( std::size_t  gate_id) const
Here is the caller graph for this function:

◆ GetInputGates()

const std::vector< GatePointer > & encrypto::motion::Backend::GetInputGates ( ) const

◆ GetLogger()

const LoggerPointer & encrypto::motion::Backend::GetLogger ( ) const
noexcept
Here is the caller graph for this function:

◆ GetMtProvider()

auto& encrypto::motion::Backend::GetMtProvider ( )
inline
Here is the caller graph for this function:

◆ GetMutableRunTimeStatistics()

auto& encrypto::motion::Backend::GetMutableRunTimeStatistics ( )
inline

◆ GetOtProvider()

OtProvider & encrypto::motion::Backend::GetOtProvider ( std::size_t  party_id)
Here is the caller graph for this function:

◆ GetRegister()

const RegisterPointer& encrypto::motion::Backend::GetRegister ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ GetRunTimeStatistics()

const auto& encrypto::motion::Backend::GetRunTimeStatistics ( ) const
inline

◆ GetSbProvider()

auto& encrypto::motion::Backend::GetSbProvider ( )
inline
Here is the caller graph for this function:

◆ GetSpProvider()

auto& encrypto::motion::Backend::GetSpProvider ( )
inline
Here is the caller graph for this function:

◆ ImportBaseOts() [1/2]

void encrypto::motion::Backend::ImportBaseOts ( std::size_t  i,
const ReceiverMessage messages 
)

◆ ImportBaseOts() [2/2]

void encrypto::motion::Backend::ImportBaseOts ( std::size_t  i,
const SenderMessage messages 
)

◆ NextGateId()

std::size_t encrypto::motion::Backend::NextGateId ( ) const

◆ OtExtensionSetup()

void encrypto::motion::Backend::OtExtensionSetup ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegisterGate()

void encrypto::motion::Backend::RegisterGate ( const GatePointer gate)
Here is the caller graph for this function:

◆ RegisterInputGate()

void encrypto::motion::Backend::RegisterInputGate ( const InputGatePointer input_gate)
Here is the caller graph for this function:

◆ Reset()

void encrypto::motion::Backend::Reset ( )

◆ RunPreprocessing()

void encrypto::motion::Backend::RunPreprocessing ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Send()

void encrypto::motion::Backend::Send ( std::size_t  party_id,
flatbuffers::FlatBufferBuilder &&  message 
)
Here is the call graph for this function:

◆ Synchronize()

void encrypto::motion::Backend::Synchronize ( )

Blocking wait for synchronizing between parties. Called in Clear() and Reset()

Here is the call graph for this function:

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