MOTION  0.01
Framework for mixed-protocol multi-party computation
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
encrypto::motion::MtProvider Class Referenceabstract

#include <mt_provider.h>

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

Public Member Functions

virtual ~MtProvider ()=default
 
bool NeedMts () const noexcept
 
template<typename T >
std::size_t GetNumberOfMts () const noexcept
 
std::size_t RequestBinaryMts (const std::size_t number_of_mts) noexcept
 
template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
std::size_t RequestArithmeticMts (const std::size_t number_of_mts) noexcept
 
BinaryMtVector GetBinary (const std::size_t offset, const std::size_t n=1) const
 
const BinaryMtVectorGetBinaryAll () const noexcept
 
template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
IntegerMtVector< T > GetInteger (const std::size_t offset, const std::size_t n=1) const
 
template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
const IntegerMtVector< T > & GetIntegerAll () const noexcept
 
virtual void PreSetup ()=0
 
virtual void Setup ()=0
 
void WaitFinished () const
 

Protected Member Functions

 MtProvider (std::size_t my_id, std::size_t number_of_parties)
 
 MtProvider ()=delete
 

Protected Attributes

std::size_t number_of_bit_mts_ {0}
 
std::size_t number_of_mts_8_ {0}
 
std::size_t number_of_mts_16_ {0}
 
std::size_t number_of_mts_32_ {0}
 
std::size_t number_of_mts_64_ {0}
 
BinaryMtVector bit_mts_
 
IntegerMtVector< std::uint8_t > mts8_
 
IntegerMtVector< std::uint16_t > mts16_
 
IntegerMtVector< std::uint32_t > mts32_
 
IntegerMtVector< std::uint64_t > mts64_
 
const std::size_t my_id_
 
const std::size_t number_of_parties_
 
std::atomic< bool > finished_ {false}
 
std::shared_ptr< FiberConditionfinished_condition_
 

Constructor & Destructor Documentation

◆ ~MtProvider()

virtual encrypto::motion::MtProvider::~MtProvider ( )
virtualdefault

◆ MtProvider() [1/2]

encrypto::motion::MtProvider::MtProvider ( std::size_t  my_id,
std::size_t  number_of_parties 
)
protected

◆ MtProvider() [2/2]

encrypto::motion::MtProvider::MtProvider ( )
protecteddelete

Member Function Documentation

◆ GetBinary()

BinaryMtVector encrypto::motion::MtProvider::GetBinary ( const std::size_t  offset,
const std::size_t  n = 1 
) const
Here is the call graph for this function:

◆ GetBinaryAll()

const BinaryMtVector & encrypto::motion::MtProvider::GetBinaryAll ( ) const
noexcept
Here is the call graph for this function:

◆ GetInteger()

template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
IntegerMtVector<T> encrypto::motion::MtProvider::GetInteger ( const std::size_t  offset,
const std::size_t  n = 1 
) const
inline
Here is the call graph for this function:

◆ GetIntegerAll()

template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
const IntegerMtVector<T>& encrypto::motion::MtProvider::GetIntegerAll ( ) const
inlinenoexcept
Here is the call graph for this function:

◆ GetNumberOfMts()

template<typename T >
std::size_t encrypto::motion::MtProvider::GetNumberOfMts ( ) const
inlinenoexcept

◆ NeedMts()

bool encrypto::motion::MtProvider::NeedMts ( ) const
noexcept
Here is the caller graph for this function:

◆ PreSetup()

virtual void encrypto::motion::MtProvider::PreSetup ( )
pure virtual

◆ RequestArithmeticMts()

template<typename T , typename = std::enable_if_t<std::is_unsigned_v<T>>>
std::size_t encrypto::motion::MtProvider::RequestArithmeticMts ( const std::size_t  number_of_mts)
inlinenoexcept

◆ RequestBinaryMts()

std::size_t encrypto::motion::MtProvider::RequestBinaryMts ( const std::size_t  number_of_mts)
noexcept

◆ Setup()

virtual void encrypto::motion::MtProvider::Setup ( )
pure virtual

◆ WaitFinished()

void encrypto::motion::MtProvider::WaitFinished ( ) const
inline
Here is the caller graph for this function:

Member Data Documentation

◆ bit_mts_

BinaryMtVector encrypto::motion::MtProvider::bit_mts_
protected

◆ finished_

std::atomic<bool> encrypto::motion::MtProvider::finished_ {false}
protected

◆ finished_condition_

std::shared_ptr<FiberCondition> encrypto::motion::MtProvider::finished_condition_
protected

◆ mts16_

IntegerMtVector<std::uint16_t> encrypto::motion::MtProvider::mts16_
protected

◆ mts32_

IntegerMtVector<std::uint32_t> encrypto::motion::MtProvider::mts32_
protected

◆ mts64_

IntegerMtVector<std::uint64_t> encrypto::motion::MtProvider::mts64_
protected

◆ mts8_

IntegerMtVector<std::uint8_t> encrypto::motion::MtProvider::mts8_
protected

◆ my_id_

const std::size_t encrypto::motion::MtProvider::my_id_
protected

◆ number_of_bit_mts_

std::size_t encrypto::motion::MtProvider::number_of_bit_mts_ {0}
protected

◆ number_of_mts_16_

std::size_t encrypto::motion::MtProvider::number_of_mts_16_ {0}
protected

◆ number_of_mts_32_

std::size_t encrypto::motion::MtProvider::number_of_mts_32_ {0}
protected

◆ number_of_mts_64_

std::size_t encrypto::motion::MtProvider::number_of_mts_64_ {0}
protected

◆ number_of_mts_8_

std::size_t encrypto::motion::MtProvider::number_of_mts_8_ {0}
protected

◆ number_of_parties_

const std::size_t encrypto::motion::MtProvider::number_of_parties_
protected

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