MOTION
0.01
Framework for mixed-protocol multi-party computation
|
Go to the documentation of this file.
33 #include <unordered_map>
34 #include <unordered_set>
70 std::size_t ot_id, std::size_t size);
74 std::size_t ot_id, std::size_t size, std::size_t bitlength);
81 std::shared_ptr<BitMatrix>
T;
98 std::unordered_map<std::size_t, std::pair<std::size_t, ReusableFiberPromise<BitVector<>>>>
100 std::unordered_map<std::size_t, std::pair<std::size_t, ReusableFiberPromise<Block128Vector>>>
105 std::unordered_map<std::size_t, std::tuple<std::size_t, std::size_t,
109 template <
typename T>
111 std::unordered_map<std::size_t, std::pair<std::size_t, ReusableFiberPromise<std::vector<T>>>>;
141 std::array<AlignedBitVector, 128>
u;
149 std::shared_ptr<BitMatrix>
V;
157 std::unordered_map<std::size_t, std::unique_ptr<FiberCondition>>
164 std::vector<BitVector<>>
y0,
y1;
178 void MessageReceived(
const std::uint8_t* message, std::size_t message_size,
ReusableFiberFuture< Block128Vector > RegisterForBlock128SenderMessage(std::size_t ot_id, std::size_t size)
Definition: ot_extension_data.cpp:183
~OtExtensionSenderData()=default
std::mutex u_mutex
Definition: ot_extension_data.h:145
std::unordered_set< std::size_t > set_real_choices
Definition: ot_extension_data.h:116
std::unordered_map< std::size_t, std::unique_ptr< FiberCondition > > received_correction_offsets_condition
Definition: ot_extension_data.h:158
std::unordered_map< std::size_t, std::size_t > number_of_ots_in_batch
Definition: ot_extension_data.h:152
Definition: ot_extension_data.h:133
Definition: reusable_future.h:129
~OtExtensionReceiverData()=default
std::atomic< bool > setup_finished
Definition: ot_extension_data.h:171
type
Definition: geninput.py:149
ReusableFuture< R, MutexType, ConditionVariableType > get_future()
Definition: reusable_future.h:242
std::array< AlignedBitVector, 128 > u
receiver's mask that are needed to construct matrix
Definition: ot_extension_data.h:141
OtExtensionReceiverData()
Definition: ot_extension_data.cpp:35
std::unordered_map< std::size_t, std::pair< std::size_t, ReusableFiberPromise< std::vector< T > >> > PromiseMapType
Definition: ot_extension_data.h:111
ReusableFiberFuture< BitVector<> > RegisterForBitSenderMessage(std::size_t ot_id, std::size_t size)
Definition: ot_extension_data.cpp:196
Vector of 128 bit / 16 B blocks.
Definition: block.h:168
std::array< ReusableFuture< std::size_t >, 128 > u_futures
Definition: ot_extension_data.h:144
@ kReceptionCorrection
Definition: ot_extension_data.h:49
std::unique_ptr< AlignedBitVector > random_choices
Definition: ot_extension_data.h:120
std::mutex real_choices_mutex
Definition: ot_extension_data.h:117
decltype(detail::MakeTypeMap< Value, Ts... >()) TypeMap
Definition: meta.hpp:63
OtExtensionReceiverData & GetReceiverData()
Definition: ot_extension_data.h:181
std::unordered_set< std::size_t > received_correction_offsets
Definition: ot_extension_data.h:156
std::shared_ptr< BitMatrix > V
Definition: ot_extension_data.h:149
std::unordered_set< std::size_t > received_outputs
Definition: ot_extension_data.h:85
BitVectorType Subset(const std::size_t from, const std::size_t to) const
Returns a new BitVector containing the bits of this BitSpan between positions from and to.
Definition: bit_vector.cpp:1518
OtExtensionSenderData sender_data
Definition: ot_extension_data.h:187
std::vector< BitVector<> > y1
Definition: ot_extension_data.h:164
std::array< ReusablePromise< std::size_t >, 128 > u_promises
Definition: ot_extension_data.h:143
std::vector< std::size_t > bitlengths
Definition: ot_extension_data.h:167
std::unordered_map< std::size_t, std::tuple< std::size_t, std::size_t, ReusableFiberPromise< std::vector< BitVector<> > > > > message_promises_generic
Definition: ot_extension_data.h:107
void MessageReceived(const std::uint8_t *message, std::size_t message_size, const OtExtensionDataType type, const std::size_t ot_id=0)
Definition: ot_extension_data.cpp:47
BitVector< AlignedAllocator > AlignedBitVector
Definition: bit_vector.h:572
Definition: algorithm_description.cpp:35
@ kOtExtensionInvalidDataType
Definition: ot_extension_data.h:51
std::atomic< std::size_t > consumed_offset
Definition: ot_extension_data.h:130
@ kSendMessage
Definition: ot_extension_data.h:50
std::vector< std::size_t > bitlengths
Definition: ot_extension_data.h:91
ReusableFiberFuture< std::vector< BitVector<> > > RegisterForGenericSenderMessage(std::size_t ot_id, std::size_t size, std::size_t bitlength)
Definition: ot_extension_data.cpp:210
std::unordered_map< std::size_t, std::pair< std::size_t, ReusableFiberPromise< BitVector<> > > > message_promises_bit
Definition: ot_extension_data.h:99
void Copy(const std::size_t dest_from, const std::size_t dest_to, const BitVector &other)
copies the first (dest_to - dest_from) bits from other to the bits [dest_from, dest_to) in this.
Definition: bit_vector.cpp:720
const OtExtensionReceiverData & GetReceiverData() const
Definition: ot_extension_data.h:182
std::unordered_map< std::size_t, std::pair< std::size_t, ReusableFiberPromise< Block128Vector > > > message_promises_block128
Definition: ot_extension_data.h:101
const OtExtensionSenderData & GetSenderData() const
Definition: ot_extension_data.h:184
OtExtensionSenderData & GetSenderData()
Definition: ot_extension_data.h:183
std::unordered_map< std::size_t, OtMessageType > message_type
Definition: ot_extension_data.h:94
Definition: ot_extension_data.h:177
ReusableFiberFuture< std::vector< T > > RegisterForIntSenderMessage(std::size_t ot_id, std::size_t size)
Definition: ot_extension_data.cpp:224
std::atomic< std::size_t > consumed_offset
Definition: ot_extension_data.h:174
std::atomic< bool > setup_finished
Definition: ot_extension_data.h:127
Definition: ot_extension_data.h:65
BitVector corrections
Definition: ot_extension_data.h:159
Non-owning non-resizeable BitVector.
Definition: bit_vector.h:578
std::unique_ptr< FiberCondition > setup_finished_condition
Definition: ot_extension_data.h:170
Definition: reusable_future.h:123
std::unique_ptr< FiberCondition > setup_finished_condition
Definition: ot_extension_data.h:126
std::mutex received_outputs_mutex
Definition: ot_extension_data.h:88
std::shared_ptr< BitMatrix > T
Definition: ot_extension_data.h:81
OtMessageType
Definition: ot_extension_data.h:54
std::vector< BitVector<> > y0
Definition: ot_extension_data.h:164
std::unordered_map< std::size_t, std::unique_ptr< FiberCondition > > output_conditions
Definition: ot_extension_data.h:87
std::unordered_map< std::size_t, std::size_t > number_of_ots_in_batch
Definition: ot_extension_data.h:123
std::size_t number_of_received_us
Definition: ot_extension_data.h:146
std::atomic< std::size_t > bit_size
Definition: ot_extension_data.h:138
OtExtensionSenderData()
Definition: ot_extension_data.cpp:40
@ kReceptionMask
Definition: ot_extension_data.h:48
std::vector< BitVector<> > outputs
Definition: ot_extension_data.h:86
std::mutex corrections_mutex
Definition: ot_extension_data.h:160
OtExtensionDataType
Definition: ot_extension_data.h:47
TypeMap< PromiseMapType, std::uint8_t, std::uint16_t, std::uint32_t, std::uint64_t, __uint128_t > message_promises_int
Definition: ot_extension_data.h:113
OtExtensionReceiverData receiver_data
Definition: ot_extension_data.h:186