DecryptProtocol#
- class DecryptProtocol#
Protocol for multi-party decryption.
- get_output_double_tensor(self: pyhelayers.DecryptProtocol) numpy.ndarray[numpy.float64] #
Get the decrypted output. Should be used only if the input was set using set_input(CTileTensor).
- Returns:
The decrypted output.
- Return type:
DoubleTensor.
- get_output_vector_double(self: pyhelayers.DecryptProtocol) numpy.ndarray[numpy.float64] #
Get the decrypted output. Should be used only if the input was set using set_input(CTile).
- Returns:
The decrypted output.
- Return type:
numpy.array.
- get_output_vector_double_tensor(self: pyhelayers.DecryptProtocol) list #
Get the decrypted output. Should be used only if the input was set using set_input(EncryptedData).
- Returns:
The decrypted output.
- Return type:
Vector of pointers of const DoubleTensor objects.
- get_plaintext_aggregator_id(self: pyhelayers.DecryptProtocol) int #
- Returns:
Returns the ID of the plaintext-aggregator for the next run of the protocol (see MultiPartyRole::MP_PLAINTEXT_AGGREGATOR).
- Return type:
int.
- set_input(*args, **kwargs)#
Overloaded function.
set_input(self: pyhelayers.DecryptProtocol, input: helayers::EncryptedData) -> None
Set the encrypted input to decrypt.
- param input:
The encrypted input to decrypt.
- type input:
EncryptedData.
set_input(self: pyhelayers.DecryptProtocol, input: helayers::CTileTensor) -> None
Set the encrypted input to decrypt.
- param input:
The encrypted input to decrypt.
- type input:
CTileTensor.
set_input(self: pyhelayers.DecryptProtocol, input: pyhelayers.CTile) -> None
Set the encrypted input to decrypt.
- param input:
The encrypted input to decrypt.
- type input:
CTile.
- set_plaintext_aggregator_id(self: pyhelayers.DecryptProtocol, id: int) None #
Sets the ID of the plaintext-aggregator for the next run of the protocol (see MultiPartyRole::MP_PLAINTEXT_AGGREGATOR).
- Parameters:
input (int.) – The ID.
-
class DecryptProtocol : public helayers::Protocol#
Protocol for multi-party decryption.
Public Functions
-
DecryptProtocol(const HeContext &he)#
Constructor for DecryptProtocol.
- Parameters:
he – the HeContext.
-
void setPlaintextAggregatorId(int32_t id)#
Sets the ID of the plaintext-aggregator for the next run of the protocol (see MultiPartyRole::MP_PLAINTEXT_AGGREGATOR).
- Parameters:
id – The ID.
-
int32_t getPlaintextAggregatorId() const#
Returns the ID of the plaintext-aggregator for the next run of the protocol (see MultiPartyRole::MP_PLAINTEXT_AGGREGATOR).
-
void setInput(const EncryptedData &input)#
Set the encrypted input to decrypt.
- Parameters:
input – The encrypted input to decrypt.
-
void setInput(const CTileTensor &input)#
Set the encrypted input to decrypt.
- Parameters:
input – The encrypted input to decrypt.
-
void setInput(const CTile &input)#
Set the encrypted input to decrypt.
- Parameters:
input – The encrypted input to decrypt.
-
std::vector<DoubleTensorCPtr> getOutputVectorDoubleTensorCPtr() const#
Get the decrypted output.
Should be used only if the input was set using setInput(const EncryptedData&).
-
DoubleTensor getOutputDoubleTensor() const#
Get the decrypted output.
Should be used only if the input was set using setInput(const CTileTensor&).
-
std::vector<double> getOutputVectorDouble() const#
Get the decrypted output.
Should be used only if the input was set using setInput(const CTile&).
-
virtual void resetProtocol() override#
Reset the protocol prior to another use.
-
DecryptProtocol(const HeContext &he)#