MOTION
0.01
Framework for mixed-protocol multi-party computation
|
Go to the documentation of this file.
41 class OtVectorReceiver;
42 class FixedXcOt128Sender;
43 class FixedXcOt128Receiver;
45 class XcOtBitReceiver;
55 InputGate(std::size_t number_of_simd, std::size_t bit_size, std::size_t input_owner_id,
86 constexpr std::size_t
kAll = std::numeric_limits<std::int64_t>::max();
173 std::vector<std::vector<std::unique_ptr<motion::XcOtBitSender>>> sender_ots_1_;
174 std::vector<std::vector<std::unique_ptr<motion::FixedXcOt128Sender>>> sender_ots_kappa_;
175 std::vector<std::vector<std::unique_ptr<motion::XcOtBitReceiver>>> receiver_ots_1_;
176 std::vector<std::vector<std::unique_ptr<motion::FixedXcOt128Receiver>>> receiver_ots_kappa_;
178 std::vector<motion::ReusableFiberFuture<motion::Block128Vector>> received_garbled_rows_;
184 void GenerateRandomness();
const Block128 & GetGlobalOffset() const
Definition: bmr_provider.h:46
void resize(std::size_t new_size)
Resize the Block128Vector to contain new_size elements. New elements are left uninitialized.
Definition: block.h:233
std::string to_string(Provider p)
Definition: benchmark_providers.h:44
void LogTrace(const std::string &message)
Definition: logger.cpp:110
std::shared_ptr< Share > SharePointer
Definition: bmr_share.h:52
GateType gate_type_
Definition: gate.h:105
Definition: bmr_gate.h:51
void EvaluateOnline() final override
Definition: bmr_gate.cpp:544
flatbuffers::FlatBufferBuilder BuildBmrAndMessage(const std::size_t id, const std::vector< std::uint8_t > &payload)
Definition: bmr_message.cpp:65
const bmr::SharePointer GetOutputAsBmrShare() const
Definition: bmr_gate.cpp:707
const motion::SharePointer GetOutputAsShare() const
Definition: bmr_gate.cpp:591
communication::CommunicationLayer & GetCommunicationLayer()
Definition: gate.cpp:92
std::vector< WirePointer > output_wires_
Definition: gate.h:100
void EvaluateSetup() final override
Definition: bmr_gate.cpp:403
const auto & GetData() const noexcept
Get const reference to content of BitVector.
Definition: bit_vector.h:152
void SetKey(const std::uint8_t *key)
Definition: pseudo_random_generator.cpp:32
std::vector< WirePointer > parent_b_
Definition: gate.h:221
Definition: reusable_future.h:129
std::size_t bit_size_
Number of wires.
Definition: bmr_gate.h:79
Logger & GetLogger()
Definition: gate.cpp:100
static Block128 MakeZero()
Create a zero-initialized Block128.
Definition: block.h:63
void AesniBmrDkc(const void *round_keys_input, const void *key_a, const void *key_b, std::uint64_t gate_id, std::size_t number_of_parties, void *output_input_pointer)
Definition: aesni_primitives.cpp:339
void EvaluateSetup() final override
Definition: bmr_gate.cpp:632
const bmr::SharePointer GetOutputAsBmrShare() const
Definition: bmr_gate.cpp:1270
flatbuffers::FlatBufferBuilder BuildBmrInput0Message(const std::size_t id, const std::vector< std::uint8_t > &payload)
Definition: bmr_message.cpp:45
~InputGate() final=default
std::int64_t output_owner_
Definition: gate.h:203
const bmr::SharePointer GetOutputAsBmrShare() const
Definition: bmr_gate.cpp:585
constexpr std::size_t kKappa
Definition: constants.h:65
std::vector< WirePointer > parent_
Definition: gate.h:155
bool is_my_output_
Definition: bmr_gate.h:111
std::size_t ByteSize() const
Get size of the Block128Vector content in bytes.
Definition: block.h:228
Vector of 128 bit / 16 B blocks.
Definition: block.h:168
Definition: bmr_gate.h:154
const motion::SharePointer GetOutputAsShare() const
Definition: bmr_gate.cpp:467
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
Definition: bmr_gate.h:88
void LogDebug(const std::string &message)
Definition: logger.cpp:142
void SetToZero()
Set all Block128 in this vector to zero.
Definition: block.h:255
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
boolean_gmw::SharePointer gmw_output_share_
Definition: bmr_gate.h:105
std::vector< WirePointer > parent_a_
Definition: gate.h:220
void IncrementEvaluatedGatesOnlineCounter()
Definition: register.cpp:125
std::atomic< bool > online_is_ready_
Definition: gate.h:107
std::vector< std::vector< motion::BitVector<> > > shared_outputs_
Definition: bmr_gate.h:109
proto::bmr::Provider & GetBmrProvider()
Definition: backend.h:293
void RegisterWaitingFor(std::size_t wire_id)
Definition: gate.cpp:36
const bmr::SharePointer GetOutputAsBmrShare() const
Definition: bmr_gate.cpp:461
choices
Definition: geninput.py:153
void SetOnlineIsReady()
Definition: gate.cpp:54
void EvaluateOnline() final override
Definition: bmr_gate.cpp:169
std::size_t GetNumberOfParties() const
Definition: communication_layer.h:65
std::vector< ReusableFiberFuture< Block128Vector > > RegisterForGarbledRows(std::size_t gate_id, std::size_t number_blocks)
Definition: bmr_provider.cpp:109
const bmr::SharePointer GetOutputAsBmrShare() const
Definition: bmr_gate.cpp:315
const motion::SharePointer GetOutputAsShare() const
Definition: bmr_gate.cpp:1276
Backend & backend_
Definition: gate.h:101
std::vector< motion::BitVector<> > output_
Definition: bmr_gate.h:108
std::vector< motion::ReusableFiberFuture< motion::Block128Vector > > received_public_keys_
Definition: bmr_gate.h:81
OtProvider & GetOtProvider(const std::size_t i)
Definition: gate.cpp:110
void SetSetupIsReady()
Definition: gate.cpp:46
void IncrementEvaluatedGatesSetupCounter()
Definition: register.cpp:114
motion::ReusableFiberFuture< motion::BitVector<> > received_public_values_
Definition: bmr_gate.h:80
Block128 * data()
Get pointer to the first Block128.
Definition: block.h:219
auto & GetInputPromise()
Definition: bmr_gate.h:75
void EvaluateOnline() final override
Definition: bmr_gate.cpp:669
bool Empty() const
Check if BitVector is empty.
Definition: bit_vector.h:146
Definition: algorithm_description.cpp:35
motion::ReusableFiberFuture< std::vector< motion::BitVector<> > > input_future_
Definition: bmr_gate.h:82
OutputGate(const motion::SharePointer &parent, std::size_t output_owner=kAll)
Definition: bmr_gate.cpp:327
constexpr std::size_t kAll
Definition: bmr_gate.h:86
std::shared_ptr< Share > SharePointer
Definition: conversion_gate.h:49
std::size_t number_of_simd_
Number of parallel values on wires.
Definition: bmr_gate.h:78
std::int64_t gate_id_
Definition: gate.h:102
std::mutex m
Definition: bmr_gate.h:113
Definition: bmr_gate.h:135
~OutputGate() final=default
std::size_t GetMyId() const
Definition: communication_layer.h:66
Definition: pseudo_random_generator.h:41
flatbuffers::FlatBufferBuilder BuildBmrInput1Message(const std::size_t id, const std::vector< std::uint8_t > &payload)
Definition: bmr_message.cpp:55
void InitializationHelper()
Definition: bmr_gate.cpp:79
InputGate(std::size_t number_of_simd, std::size_t bit_size, std::size_t input_owner_id, Backend &backend)
Definition: bmr_gate.cpp:45
std::unique_ptr< XcOtBitReceiver > RegisterReceiveXcOtBit(std::size_t number_of_ots=1)
Definition: ot_provider.cpp:123
void RegisterNextGate(GatePointer gate)
Definition: register.cpp:77
std::unique_ptr< FixedXcOt128Sender > RegisterSendFixedXcOt128(std::size_t number_of_ots=1)
Definition: ot_provider.cpp:66
std::unique_ptr< FixedXcOt128Receiver > RegisterReceiveFixedXcOt128(std::size_t number_of_ots=1)
Definition: ot_provider.cpp:118
std::atomic< bool > setup_is_ready_
Definition: gate.h:106
std::unique_ptr< XcOtBitSender > RegisterSendXcOtBit(std::size_t number_of_ots=1)
Definition: ot_provider.cpp:71
const motion::SharePointer GetOutputAsShare() const
Definition: bmr_gate.cpp:713
constexpr bool kVerboseDebug
Definition: constants.h:50
void EvaluateSetup() final override
Definition: bmr_gate.cpp:118
Definition: bmr_gate.h:116
Definition: reusable_future.h:123
const motion::SharePointer GetOutputAsShare() const
Definition: bmr_gate.cpp:321
void Append(bool bit) noexcept
Appends a bit to BitVector.
Definition: bit_vector.cpp:621
void EvaluateOnline() final override
Definition: bmr_gate.cpp:408
void EvaluateSetup() final override
Definition: bmr_gate.cpp:514
void EvaluateOnline() final override
Definition: bmr_gate.cpp:1138
std::shared_ptr< boolean_gmw::OutputGate > output_gate_
Definition: bmr_gate.h:106
const void * GetRoundKeys() const
Definition: pseudo_random_generator.h:51
motion::ReusableFiberPromise< std::vector< motion::BitVector<> > > input_promise_
Definition: bmr_gate.h:83
void WaitSetup() const
Definition: gate.cpp:68
void RegisterNextWire(WirePointer wire)
Definition: register.h:78
constexpr bool kDebug
Definition: config.h:36
BitVector Subset(std::size_t from, std::size_t to) const
Returns a new BitVector containing the bits of this BitVector between positions from and to.
Definition: bit_vector.cpp:806
std::string to_string(std::vector< T > values)
Returns a string representation of the std::vector values.
Definition: helpers.h:455
std::size_t size() const
Get size of Block128Vector.
Definition: block.h:225
Block128 & at(std::size_t index)
Access Block128 at index. Throws an exception if index is out of bounds.
Definition: block.h:215
std::size_t NextGateId() noexcept
Definition: register.cpp:53
void EvaluateSetup() final override
Definition: bmr_gate.cpp:833
std::int64_t input_owner_id_
Definition: gate.h:179