MOTION
0.01
Framework for mixed-protocol multi-party computation
|
Go to the documentation of this file.
65 constexpr std::size_t
kAll = std::numeric_limits<std::int64_t>::max();
149 std::size_t mt_offset_;
150 std::size_t mt_bitlen_;
152 std::shared_ptr<motion::Share> d_, e_;
153 std::shared_ptr<OutputGate> d_output_, e_output_;
180 std::vector<std::unique_ptr<XcOtReceiver>> ot_receiver_;
181 std::vector<std::unique_ptr<XcOtSender>> ot_sender_;
void LogTrace(const std::string &message)
Definition: logger.cpp:110
~OutputGate() final=default
const boolean_gmw::SharePointer GetOutputAsGmwShare() const
Definition: boolean_gmw_gate.cpp:526
const motion::SharePointer GetOutputAsShare() const
Definition: boolean_gmw_gate.cpp:532
std::vector< ReusableFiberFuture< std::vector< std::uint8_t > > > output_message_futures_
Definition: boolean_gmw_gate.h:87
GateType gate_type_
Definition: gate.h:105
const boolean_gmw::SharePointer GetOutputAsGmwShare() const
Definition: boolean_gmw_gate.cpp:879
const motion::SharePointer GetOutputAsShare() const
Definition: boolean_gmw_gate.cpp:455
void EvaluateOnline() final override
Definition: boolean_gmw_gate.cpp:504
const motion::SharePointer GetOutputAsShare() const
Definition: boolean_gmw_gate.cpp:359
void EvaluateOnline() final override
Definition: boolean_gmw_gate.cpp:414
const motion::SharePointer GetOutputAsShare() const
Definition: boolean_gmw_gate.cpp:707
communication::CommunicationLayer & GetCommunicationLayer()
Definition: gate.cpp:92
std::vector< WirePointer > output_wires_
Definition: gate.h:100
Definition: boolean_gmw_gate.h:92
std::vector< WirePointer > parent_b_
Definition: gate.h:221
Logger & GetLogger()
Definition: gate.cpp:100
void EvaluateSetup() final override
Definition: boolean_gmw_gate.cpp:608
const encrypto::motion::communication::Message * GetMessage(const void *buf)
Definition: message_generated.h:146
std::unique_ptr< XcOtSender > RegisterSendXcOt(std::size_t number_of_ots=1, std::size_t bitlength=1)
Definition: ot_provider.cpp:61
Definition: boolean_gmw_gate.h:38
std::int64_t output_owner_
Definition: gate.h:203
std::vector< WirePointer > parent_
Definition: gate.h:155
void EvaluateOnline() final override
Definition: boolean_gmw_gate.cpp:100
void EvaluateSetup() final override
Definition: boolean_gmw_gate.cpp:499
void InitializationHelper()
Definition: boolean_gmw_gate.cpp:55
std::vector< WirePointer > parent_c_
Definition: gate.h:243
void EvaluateSetup() final override
Definition: boolean_gmw_gate.cpp:94
void EvaluateSetup() final override
Definition: boolean_gmw_gate.cpp:234
const boolean_gmw::SharePointer GetOutputAsGmwShare() const
Definition: boolean_gmw_gate.cpp:449
const boolean_gmw::SharePointer GetOutputAsGmwShare()
Definition: boolean_gmw_gate.cpp:164
void Reserve(std::size_t number_of_bits)
Reserves new space for BitVector, so that it can contain at least number_of_bits bits.
Definition: bit_vector.h:185
void LogDebug(const std::string &message)
Definition: logger.cpp:142
std::atomic< bool > requires_online_interaction_
Definition: gate.h:108
BaseProvider & GetBaseProvider()
Definition: gate.cpp:102
Register & GetRegister()
Definition: gate.cpp:96
std::shared_ptr< Share > SharePointer
Definition: backend.h:46
static BitVector XorBitVectors(const std::vector< BitVector > &bit_vectors)
Performs XOR operation between all BitVectors in bit_vectors.
Definition: bit_vector.cpp:1064
bool is_my_output_
Definition: boolean_gmw_gate.h:85
InputGate(std::span< const BitVector<>> input, std::size_t party_id, Backend &backend)
Definition: boolean_gmw_gate.cpp:41
std::vector< WirePointer > parent_a_
Definition: gate.h:220
void IncrementEvaluatedGatesOnlineCounter()
Definition: register.cpp:125
Definition: boolean_gmw_gate.h:130
void EvaluateOnline() final override
Definition: boolean_gmw_gate.cpp:613
primitives::SharingRandomnessGenerator & GetMyRandomnessGenerator(std::size_t party_id)
Definition: motion_base_provider.h:57
void RegisterWaitingFor(std::size_t wire_id)
Definition: gate.cpp:36
void SetOnlineIsReady()
Definition: gate.cpp:54
std::size_t GetNumberOfParties() const
Definition: communication_layer.h:65
flatbuffers::FlatBufferBuilder BuildOutputMessage(std::size_t gate_id, std::vector< std::uint8_t > wire_payload)
Definition: output_message.cpp:35
Backend & backend_
Definition: gate.h:101
OtProvider & GetOtProvider(const std::size_t i)
Definition: gate.cpp:110
void SetSetupIsReady()
Definition: gate.cpp:46
void IncrementEvaluatedGatesSetupCounter()
Definition: register.cpp:114
const encrypto::motion::communication::OutputMessage * GetOutputMessage(const void *buf)
Definition: output_message_generated.h:136
Definition: boolean_gmw_gate.h:111
void EvaluateSetup() final override
Definition: boolean_gmw_gate.cpp:409
void EvaluateOnline() final override
Definition: boolean_gmw_gate.cpp:239
primitives::SharingRandomnessGenerator & GetTheirRandomnessGenerator(std::size_t party_id)
Definition: motion_base_provider.h:60
std::shared_ptr< Share > SharePointer
Definition: conversion_gate.h:49
std::int64_t gate_id_
Definition: gate.h:102
std::vector< BitVector<> > input_
two-dimensional vector for storing the raw inputs
Definition: boolean_gmw_gate.h:58
OutputGate(const motion::SharePointer &parent, std::size_t output_owner=kAll)
Definition: boolean_gmw_gate.cpp:170
std::size_t GetMyId() const
Definition: communication_layer.h:66
Definition: boolean_gmw_gate.h:67
const boolean_gmw::SharePointer GetOutputAsGmwShare() const
Definition: boolean_gmw_gate.cpp:353
std::atomic< bool > setup_is_ready_
Definition: gate.h:106
void EvaluateSetup() final override
Definition: boolean_gmw_gate.cpp:783
void EvaluateOnline() final override
Definition: boolean_gmw_gate.cpp:788
std::size_t boolean_sharing_id_
correlated randomness using AES CTR
Definition: boolean_gmw_gate.h:61
constexpr bool kVerboseDebug
Definition: constants.h:50
constexpr std::size_t kAll
Definition: boolean_gmw_gate.h:65
MtProvider & GetMtProvider()
Definition: gate.cpp:104
Non-owning non-resizeable BitVector.
Definition: bit_vector.h:578
BitVector GetBits(const std::size_t gate_id, const std::size_t number_of_bits)
Definition: sharing_randomness_generator.cpp:68
T invert(std::size_t k, T a)
Definition: sb_impl.h:82
void Append(bool bit) noexcept
Appends a bit to BitVector.
Definition: bit_vector.cpp:621
static const fe d
Definition: mycurve25519_tables.h:30
const boolean_gmw::SharePointer GetOutputAsGmwShare() const
Definition: boolean_gmw_gate.cpp:701
std::vector< WirePointer > parent_a_
Definition: gate.h:241
std::mutex m_
Definition: boolean_gmw_gate.h:89
void WaitSetup() const
Definition: gate.cpp:68
auto & GetMtProvider()
Definition: backend.h:299
void RegisterNextWire(WirePointer wire)
Definition: register.h:78
Definition: boolean_gmw_gate.h:156
void WaitForSetup() const
Definition: motion_base_provider.cpp:183
std::unique_ptr< XcOtReceiver > RegisterReceiveXcOt(std::size_t number_of_ots=1, std::size_t bitlength=1)
Definition: ot_provider.cpp:113
constexpr bool kDebug
Definition: config.h:36
std::size_t bits_
Number of parallel values on wires.
Definition: boolean_gmw_gate.h:60
std::vector< WirePointer > parent_b_
Definition: gate.h:242
std::string to_string(std::vector< T > values)
Returns a string representation of the std::vector values.
Definition: helpers.h:455
const motion::SharePointer GetOutputAsShare() const
Definition: boolean_gmw_gate.cpp:885
~InputGate() final=default
std::size_t NextGateId() noexcept
Definition: register.cpp:53
std::int64_t input_owner_id_
Definition: gate.h:179