|
| ShareWrapper () |
|
| ShareWrapper (const SharePointer &share) |
|
| ShareWrapper (const ShareWrapper &sw) |
|
void | operator= (SharePointer share) |
|
void | operator= (const ShareWrapper &sw) |
|
ShareWrapper | operator~ () const |
|
ShareWrapper | operator^ (const ShareWrapper &other) const |
|
ShareWrapper & | operator^= (const ShareWrapper &other) |
|
ShareWrapper | operator& (const ShareWrapper &other) const |
|
ShareWrapper & | operator&= (const ShareWrapper &other) |
|
ShareWrapper | operator| (const ShareWrapper &other) const |
|
ShareWrapper & | operator|= (const ShareWrapper &other) |
|
ShareWrapper | operator+ (const ShareWrapper &other) const |
|
ShareWrapper & | operator+= (const ShareWrapper &other) |
|
ShareWrapper | operator- (const ShareWrapper &other) const |
|
ShareWrapper & | operator-= (const ShareWrapper &other) |
|
ShareWrapper | operator* (const ShareWrapper &other) const |
|
ShareWrapper & | operator*= (const ShareWrapper &other) |
|
ShareWrapper | operator== (const ShareWrapper &other) const |
|
ShareWrapper | Mux (const ShareWrapper &a, const ShareWrapper &b) const |
|
template<MpcProtocol P> |
ShareWrapper | Convert () const |
|
SharePointer & | Get () |
|
const SharePointer & | Get () const |
|
const SharePointer & | operator* () const |
|
const SharePointer & | operator-> () const |
|
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 output owner corresponds to all parties being the output owners. More...
|
|
std::vector< ShareWrapper > | Split () const |
| splits the share into single wires. More...
|
|
ShareWrapper | GetWire (std::size_t i) const |
| yields wire #i from share_ as ShareWrapper. More...
|
|
ShareWrapper | Evaluate (const std::shared_ptr< const AlgorithmDescription > &algo) const |
| evaluates AlgorithmDescription also on this->share_ as input. More...
|
|
ShareWrapper | Evaluate (const AlgorithmDescription &algo) const |
| constructs a circuit from AlgorithmDescription algo and sets this->share_ as input. More...
|
|
ShareWrapper | Subset (std::vector< std::size_t > &&positions) |
| constructs a SubsetGate that returns values stored at positions in this->share_. Internally calls ShareWrapper Subset(std::span<std::size_t> positions). More...
|
|
ShareWrapper | Subset (std::span< const std::size_t > positions) |
| constructs a SubsetGate that returns values stored at positions in this->share_, e.g., Subset on values {0,1,2} on a share containing l wires with 4 SIMD values each would return all but the last SIMD value on the share while maintaining the number of wires and their order. Repetitions of the positions as well as the number of output SIMD values being greater the the number of the input SIMD values is allowed, e.g., subset of {0,0} of a share with only 1 SIMD value would yield an output share that stores the same value as SIMD twice. More...
|
|
std::vector< ShareWrapper > | Unsimdify () |
| constructs an Unsimdify gate with this->share_ as input. UnsimdifyGate decomposes this->share_ into shares with exactly 1 SIMD value, e.g., if this->share_ contained s_0, s_1, and s_2 and SIMD values in this->share_, it will return an std::vector {s_0, s_1, s_2} as separate shares with exactly one SIMD value in each share. More...
|
|
template<typename T > |
T | As () const |
| converts the information on the wires to T. Boolean and arithmetic GMW returns the secret-shared values on the wires. BMR returns "public values", which is also the place where the plaintext results from the output gates is stored. Only conversions to the same format are allowed, e.g., Boolean GMW and BMR to bool, BitVector, or std::vector<BitVector>. Arithmetic GMW shares can only be converted to the same unsigned integer type T that they hold or to std::vector<T>. Converting a Boolean share to (1) bool returns the 0th SIMD value of the 0th wire, (2) BitVector returns all SIMD values on the 0th wire, and (3) std::vector<BitVector> all SIMD values on all wires. More...
|
|
template<> |
bool | As () const |
|
template<typename T >
T encrypto::motion::ShareWrapper::As |
converts the information on the wires to T. Boolean and arithmetic GMW returns the secret-shared values on the wires. BMR returns "public values", which is also the place where the plaintext results from the output gates is stored. Only conversions to the same format are allowed, e.g., Boolean GMW and BMR to bool, BitVector, or std::vector<BitVector>. Arithmetic GMW shares can only be converted to the same unsigned integer type T that they hold or to std::vector<T>. Converting a Boolean share to (1) bool returns the 0th SIMD value of the 0th wire, (2) BitVector returns all SIMD values on the 0th wire, and (3) std::vector<BitVector> all SIMD values on all wires.
ShareWrapper encrypto::motion::ShareWrapper::Subset |
( |
std::span< const std::size_t > |
positions | ) |
|
constructs a SubsetGate that returns values stored at positions in this->share_, e.g., Subset on values {0,1,2} on a share containing l wires with 4 SIMD values each would return all but the last SIMD value on the share while maintaining the number of wires and their order. Repetitions of the positions as well as the number of output SIMD values being greater the the number of the input SIMD values is allowed, e.g., subset of {0,0} of a share with only 1 SIMD value would yield an output share that stores the same value as SIMD twice.
- Exceptions
-
out_of_range | if at least one of the indices in positions is out of range. |
std::vector< ShareWrapper > encrypto::motion::ShareWrapper::Unsimdify |
( |
| ) |
|
constructs an Unsimdify gate with this->share_ as input. UnsimdifyGate decomposes this->share_ into shares with exactly 1 SIMD value, e.g., if this->share_ contained s_0, s_1, and s_2 and SIMD values in this->share_, it will return an std::vector {s_0, s_1, s_2} as separate shares with exactly one SIMD value in each share.
- Exceptions
-
invalid_argument | if any of the shares internally has an inconsistent number of SIMD values across the wires. |
invalid_argument | if this->share_ is "empty", i.e., contains 0 SIMD values. |