MOTION  0.01
Framework for mixed-protocol multi-party computation
mult3.h
Go to the documentation of this file.
1 // MIT License
2 //
3 // Copyright (c) 2021 Arianne Roselina Prananto
4 //
5 // Permission is hereby granted, free of charge, to any person obtaining a copy
6 // of this software and associated documentation files (the "Software"), to deal
7 // in the Software without restriction, including without limitation the rights
8 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 // copies of the Software, and to permit persons to whom the Software is
10 // furnished to do so, subject to the following conditions:
11 //
12 // The above copyright notice and this permission notice shall be included in all
13 // copies or substantial portions of the Software.
14 //
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 // SOFTWARE.
22 
23 #pragma once
24 
25 #include "base/party.h"
28 
31  const std::uint32_t input_command_line,
32  const std::string& input_file_path,
33  const std::string& input_file_shared_path,
34  bool print_output);
35 
38  const std::uint32_t input_command_line,
39  const std::string& input_file_path);
40 
43  const std::string& input_file_shared_path);
44 
48 
49 std::uint32_t GetFileInput(const std::string& path);
50 
51 std::vector<std::uint32_t> GetFileSharedInput(const std::string& path);
analysis.h
party.h
GetFileInput
std::uint32_t GetFileInput(const std::string &path)
Definition: mult3.cpp:166
GetFileSharedInput
std::vector< std::uint32_t > GetFileSharedInput(const std::string &path)
Definition: mult3.cpp:181
encrypto::motion::MpcProtocol::kBmr
@ kBmr
encrypto::motion::PartyPointer
std::unique_ptr< Party > PartyPointer
Definition: party.h:387
config.h
bit_vector.h
CreateMult3Circuit
encrypto::motion::SecureUnsignedInteger CreateMult3Circuit(encrypto::motion::SecureUnsignedInteger a, encrypto::motion::SecureUnsignedInteger b, encrypto::motion::SecureUnsignedInteger c)
Definition: mult3.cpp:157
ComputeSharedInput
encrypto::motion::SecureUnsignedInteger ComputeSharedInput(encrypto::motion::PartyPointer &party, encrypto::motion::MpcProtocol protocol, const std::string &input_file_shared_path)
Definition: mult3.cpp:119
encrypto::motion::MpcProtocol::kBooleanGmw
@ kBooleanGmw
GetFileSharedInput
std::vector< std::uint32_t > GetFileSharedInput(const std::string &path)
Definition: mult3.cpp:181
encrypto::motion::SecureUnsignedInteger::As
T As() const
converts the information on the wires to T in type Unsigned Integer. See the description in ShareWrap...
Definition: secure_unsigned_integer.cpp:283
ComputeInput
encrypto::motion::SecureUnsignedInteger ComputeInput(encrypto::motion::PartyPointer &party, encrypto::motion::MpcProtocol protocol, const std::uint32_t input_command_line, const std::string &input_file_path)
Definition: mult3.cpp:68
secure_unsigned_integer.h
ComputeInput
encrypto::motion::SecureUnsignedInteger ComputeInput(encrypto::motion::PartyPointer &party, encrypto::motion::MpcProtocol protocol, const std::uint32_t input_command_line, const std::string &input_file_path)
Definition: mult3.cpp:68
encrypto::motion::RunTimeStatistics
Definition: run_time_statistics.h:32
encrypto::motion::SecureUnsignedInteger
Definition: secure_unsigned_integer.h:33
encrypto::motion::MpcProtocol
MpcProtocol
Definition: typedefs.h:140
encrypto::motion::SecureUnsignedInteger::Out
SecureUnsignedInteger Out(std::size_t output_owner=std::numeric_limits< std::int64_t >::max()) const
constructs an output gate, which reconstructs the cleartext result. The default parameter for the out...
Definition: secure_unsigned_integer.cpp:272
mult3.h
EvaluateProtocol
encrypto::motion::RunTimeStatistics EvaluateProtocol(encrypto::motion::PartyPointer &party, encrypto::motion::MpcProtocol protocol, const std::uint32_t input_command_line, const std::string &input_file_path, const std::string &input_file_shared_path, bool print_output)
Definition: mult3.cpp:32
GetFileInput
std::uint32_t GetFileInput(const std::string &path)
Definition: innerproduct.cpp:121
encrypto::motion::MpcProtocol::kArithmeticGmw
@ kArithmeticGmw
CreateMult3Circuit
encrypto::motion::SecureUnsignedInteger CreateMult3Circuit(encrypto::motion::SecureUnsignedInteger a, encrypto::motion::SecureUnsignedInteger b, encrypto::motion::SecureUnsignedInteger c)
Definition: mult3.cpp:157
run_time_statistics.h
ComputeSharedInput
encrypto::motion::SecureUnsignedInteger ComputeSharedInput(encrypto::motion::PartyPointer &party, encrypto::motion::MpcProtocol protocol, const std::string &input_file_shared_path)
Definition: mult3.cpp:119
EvaluateProtocol
encrypto::motion::RunTimeStatistics EvaluateProtocol(encrypto::motion::PartyPointer &party, encrypto::motion::MpcProtocol protocol, const std::uint32_t input_command_line, const std::string &input_file_path, const std::string &input_file_shared_path, bool print_output)
Definition: mult3.cpp:32
encrypto::motion::ToInput
std::vector< BitVector< Allocator > > ToInput(IntegralType integral_value)
Definition: bit_vector.cpp:1189