pub trait LweCiphertextDiscardingNegationEngine<InputCiphertext, OutputCiphertext>: AbstractEngine where
InputCiphertext: LweCiphertextEntity,
OutputCiphertext: LweCiphertextEntity<KeyDistribution = InputCiphertext::KeyDistribution>, {
fn discard_neg_lwe_ciphertext(
&mut self,
output: &mut OutputCiphertext,
input: &InputCiphertext
) -> Result<(), LweCiphertextDiscardingNegationError<Self::EngineError>>;
unsafe fn discard_neg_lwe_ciphertext_unchecked(
&mut self,
output: &mut OutputCiphertext,
input: &InputCiphertext
);
}
Expand description
A trait for engines negating (discarding) LWE ciphertexts.
Semantics
This discarding operation fills the output
LWE ciphertext with
the negation of the input
LWE ciphertext.
Formal Definition
Required methods
fn discard_neg_lwe_ciphertext(
&mut self,
output: &mut OutputCiphertext,
input: &InputCiphertext
) -> Result<(), LweCiphertextDiscardingNegationError<Self::EngineError>>
fn discard_neg_lwe_ciphertext(
&mut self,
output: &mut OutputCiphertext,
input: &InputCiphertext
) -> Result<(), LweCiphertextDiscardingNegationError<Self::EngineError>>
Negates an LWE ciphertext.
unsafe fn discard_neg_lwe_ciphertext_unchecked(
&mut self,
output: &mut OutputCiphertext,
input: &InputCiphertext
)
unsafe fn discard_neg_lwe_ciphertext_unchecked(
&mut self,
output: &mut OutputCiphertext,
input: &InputCiphertext
)
Unsafely negates an LWE ciphertext.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of LweCiphertextDiscardingNegationError
. For safety concerns specific to an engine,
refer to the implementer safety section.
Implementors
Description:
Implementation of LweCiphertextDiscardingNegationEngine
for CoreEngine
that operates on
32 bits integers.
Description:
Implementation of LweCiphertextDiscardingNegationEngine
for CoreEngine
that operates on
64 bits integers.