MOTION
0.01
Framework for mixed-protocol multi-party computation
|
Go to the documentation of this file.
39 struct AlgorithmDescription;
59 *
this = *
this ^ other;
66 *
this = *
this & other;
73 *
this = *
this | other;
80 *
this = *
this + other;
87 *
this = *
this - other;
94 *
this = *
this * other;
104 template <MpcProtocol P>
117 ShareWrapper Out(std::size_t output_owner = std::numeric_limits<std::int64_t>::max())
const;
120 std::vector<ShareWrapper>
Split()
const;
133 const std::vector<ShareWrapper>::const_iterator vector_end) {
134 const auto v{std::vector<ShareWrapper>(vector_begin, vector_end)};
198 template <
typename T>
204 template <
typename T>
207 template <
typename T>
210 template <
typename T>
213 template <
typename T>
224 void ShareConsistencyCheck()
const;
ShareWrapper(const ShareWrapper &sw)
Definition: share_wrapper.h:49
ShareWrapper 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: share_wrapper.cpp:414
std::size_t number_of_wires
Definition: algorithm_description.h:64
ShareWrapper operator==(const ShareWrapper &other) const
Definition: share_wrapper.cpp:238
Definition: share_wrapper.h:44
SharePointer & Get()
Definition: share_wrapper.h:107
Definition: arithmetic_gmw_share.h:37
T As() const
converts the information on the wires to T. Boolean and arithmetic GMW returns the secret-shared valu...
Definition: share_wrapper.cpp:616
ShareWrapper Mux(const ShareWrapper &a, const ShareWrapper &b) const
Definition: share_wrapper.cpp:282
type
Definition: geninput.py:149
ShareWrapper(const SharePointer &share)
Definition: share_wrapper.h:48
std::vector< ShareWrapper > Split() const
splits the share into single wires.
Definition: share_wrapper.cpp:459
ShareWrapper Subset(std::vector< std::size_t > &&positions)
constructs a SubsetGate that returns values stored at positions in this->share_. Internally calls Sha...
Definition: share_wrapper.cpp:878
T LowDepthReduce(std::vector< T > input, BinaryOperation operation)
Definition: low_depth_reduce.h:40
ShareWrapper()
Definition: share_wrapper.h:46
std::vector< PrimitiveOperation > gates
Definition: algorithm_description.h:67
ShareWrapper operator|(const ShareWrapper &other) const
Definition: share_wrapper.cpp:136
static ShareWrapper Concatenate(std::vector< ShareWrapper > &&input)
concatenates wires in multiple shares in one share.
Definition: share_wrapper.h:128
ShareWrapper & operator-=(const ShareWrapper &other)
Definition: share_wrapper.h:86
void operator=(SharePointer share)
Definition: share_wrapper.h:51
std::vector< ShareWrapper > Unsimdify()
constructs an Unsimdify gate with this->share_ as input. UnsimdifyGate decomposes this->share_ into s...
Definition: share_wrapper.cpp:889
ShareWrapper operator~() const
Definition: share_wrapper.cpp:55
std::size_t number_of_output_wires
Definition: algorithm_description.h:64
ShareWrapper operator&(const ShareWrapper &other) const
Definition: share_wrapper.cpp:108
ShareWrapper operator+(const ShareWrapper &other) const
Definition: share_wrapper.cpp:151
std::size_t number_of_gates
Definition: algorithm_description.h:65
ShareWrapper GetWire(std::size_t i) const
yields wire #i from share_ as ShareWrapper.
Definition: share_wrapper.cpp:467
Definition: algorithm_description.h:43
const SharePointer & operator*() const
Definition: share_wrapper.h:111
Definition: algorithm_description.cpp:35
std::shared_ptr< Share > SharePointer
Definition: conversion_gate.h:49
static ShareWrapper Concatenate(const std::vector< ShareWrapper >::const_iterator vector_begin, const std::vector< ShareWrapper >::const_iterator vector_end)
concatenates wires in multiple shares in one share.
Definition: share_wrapper.h:132
ShareWrapper Convert() const
Definition: share_wrapper.cpp:322
const SharePointer & Get() const
Definition: share_wrapper.h:109
bool IsPowerOfTwo(UnsignedIntegralType x)
Check if unisgned integral value is a power of two.
Definition: helpers.h:398
void operator=(const ShareWrapper &sw)
Definition: share_wrapper.h:52
std::optional< std::size_t > number_of_input_wires_parent_b
Definition: algorithm_description.h:66
ShareWrapper & operator&=(const ShareWrapper &other)
Definition: share_wrapper.h:65
ShareWrapper & operator*=(const ShareWrapper &other)
Definition: share_wrapper.h:93
Definition: share_wrapper.cpp:610
static ShareWrapper Simdify(std::span< SharePointer > input)
constructs a SimdifyGate that composes the shares in input into a "larger" share with all the input s...
Definition: share_wrapper.cpp:907
ShareWrapper operator-(const ShareWrapper &other) const
Definition: share_wrapper.cpp:175
void swap(ReusablePromise< R, MutexType, ConditionVariableType > &lhs, ReusablePromise< R, MutexType, ConditionVariableType > &rhs) noexcept
Definition: reusable_future.h:270
ShareWrapper Evaluate(const std::shared_ptr< const AlgorithmDescription > &algo) const
evaluates AlgorithmDescription also on this->share_ as input.
Definition: share_wrapper.h:144
ShareWrapper & operator+=(const ShareWrapper &other)
Definition: share_wrapper.h:79
const SharePointer & operator->() const
Definition: share_wrapper.h:113
constexpr bool kDebug
Definition: config.h:36
ShareWrapper operator^(const ShareWrapper &other) const
Definition: share_wrapper.cpp:77
ShareWrapper & operator^=(const ShareWrapper &other)
Definition: share_wrapper.h:58
ShareWrapper & operator|=(const ShareWrapper &other)
Definition: share_wrapper.h:72
std::size_t number_of_input_wires_parent_a
Definition: algorithm_description.h:64