MOTION
0.01
Framework for mixed-protocol multi-party computation
|
Go to the documentation of this file.
31 class CommunicationLayer;
56 const std::vector<std::uint8_t>&
GetAesFixedKey()
const {
return aes_fixed_key_; }
58 return *my_randomness_generators_.at(party_id);
61 return *their_randomness_generators_.at(party_id);
69 std::shared_ptr<Logger> logger_;
70 std::size_t number_of_parties_;
72 std::vector<std::uint8_t> aes_fixed_key_;
73 std::vector<std::unique_ptr<primitives::SharingRandomnessGenerator>> my_randomness_generators_;
74 std::vector<std::unique_ptr<primitives::SharingRandomnessGenerator>> their_randomness_generators_;
75 std::shared_ptr<HelloMessageHandler> hello_message_handler_;
76 std::vector<std::shared_ptr<OutputMessageHandler>> output_message_handlers_;
78 std::atomic_flag execute_setup_flag_ = ATOMIC_FLAG_INIT;
80 std::unique_ptr<FiberCondition> setup_ready_cond_;
std::tuple< std::size_t, std::string, std::uint16_t > ParsePartyArgument(const std::string &party_argument)
Definition: millionaires_problem_main.cpp:71
bool CheckPartyArgumentSyntax(const std::string &party_argument)
Definition: millionaires_problem_main.cpp:66
std::shared_ptr< Logger > logger_
Definition: motion_base_provider.cpp:59
encrypto::motion::PartyPointer CreateParty(const program_options::variables_map &user_options)
Definition: millionaires_problem_main.cpp:145
std::vector< ReusablePromise< std::vector< std::uint8_t > > > randomness_sharing_seed_promises
Definition: motion_base_provider.cpp:62
std::vector< ReusableFuture< std::vector< std::uint8_t > > > fixed_key_aes_seed_futures
Definition: motion_base_provider.cpp:61
std::vector< ReusableFuture< std::vector< std::uint8_t > > > randomness_sharing_seed_futures
Definition: motion_base_provider.cpp:63
Definition: reusable_future.h:129
Definition: output_message_handler.h:33
void Setup()
Definition: motion_base_provider.cpp:113
std::unique_ptr< Party > PartyPointer
Definition: party.h:387
void ReceivedMessage(std::size_t party_id, std::vector< std::uint8_t > &&message) override
Definition: motion_base_provider.cpp:66
const encrypto::motion::communication::Message * GetMessage(const void *buf)
Definition: message_generated.h:146
const encrypto::motion::communication::HelloMessage * GetHelloMessage(const void *buf)
Definition: hello_message_generated.h:142
Wraps a boost::fibers::condition_variable with a boost::fibers::mutex and a condition checking functi...
Definition: fiber_condition.h:35
Definition: motion_base_provider.cpp:39
Definition: sharing_randomness_generator.h:60
std::vector< ReusablePromise< std::vector< std::uint8_t > > > fixed_key_aes_seed_promises
Definition: motion_base_provider.cpp:60
int main(int ac, char *av[])
Definition: millionaires_problem_main.cpp:49
void RegisterMessageHandler(MessageHandlerFunction, const std::vector< MessageType > &message_types)
Definition: communication_layer.cpp:393
Definition: tcp_transport.h:69
primitives::SharingRandomnessGenerator & GetMyRandomnessGenerator(std::size_t party_id)
Definition: motion_base_provider.h:57
std::pair< program_options::variables_map, bool > ParseProgramOptions(int ac, char *av[])
Definition: millionaires_problem_main.cpp:82
HelloMessageHandler(std::size_t number_of_parties, std::shared_ptr< Logger > logger)
Definition: motion_base_provider.cpp:41
Definition: motion_base_provider.h:35
ReusableFuture< std::vector< std::uint8_t > > GetRandomnessSharingSeedFuture()
std::vector< TcpConnectionConfiguration > TcpPartiesConfiguration
Definition: tcp_transport.h:62
Definition: algorithm_description.cpp:35
primitives::SharingRandomnessGenerator & GetTheirRandomnessGenerator(std::size_t party_id)
Definition: motion_base_provider.h:60
help
Definition: geninput.py:150
constexpr float kVersion
Definition: config.h:38
flatbuffers::FlatBufferBuilder BuildHelloMessage(uint16_t source_id, uint16_t destination_id, uint16_t number_of_parties, const std::vector< uint8_t > *input_sharing_seed, const std::vector< uint8_t > *fixed_key_aes_seed, bool online_after_setup, float motion_version)
Definition: hello_message.cpp:33
void SendMessage(std::size_t party_id, std::vector< std::uint8_t > &&message)
Definition: communication_layer.cpp:331
Definition: message_handler.h:38
Definition: communication_layer.h:58
encrypto::motion::RunTimeStatistics EvaluateProtocol(encrypto::motion::PartyPointer &party, std::size_t number_of_simd, encrypto::motion::MpcProtocol protocol, bool check)
Definition: aes128.cpp:56
BaseProvider(communication::CommunicationLayer &, std::shared_ptr< Logger > logger)
Definition: motion_base_provider.cpp:81
const std::vector< std::uint8_t > & GetAesFixedKey() const
Definition: motion_base_provider.h:56
Definition: motion_base_provider.h:48
std::vector< ReusableFiberFuture< std::vector< std::uint8_t > > > RegisterForOutputMessages(std::size_t gate_id)
Definition: motion_base_provider.cpp:185
~BaseProvider()
Definition: motion_base_provider.cpp:108
void WaitForSetup() const
Definition: motion_base_provider.cpp:183
constexpr bool kDebug
Definition: config.h:36
const std::regex kPartyArgumentRegex("(\\d+),(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}),(\\d{1,5})")
void DeregisterMessageHandler(const std::vector< MessageType > &message_types)
Definition: communication_layer.cpp:414
std::vector< std::unique_ptr< Transport > > SetupConnections()
Definition: tcp_transport.cpp:203