pub trait LweCiphertextFusingAdditionEngine<InputCiphertext, OutputCiphertext>: AbstractEngine where
InputCiphertext: LweCiphertextEntity,
OutputCiphertext: LweCiphertextEntity<KeyDistribution = InputCiphertext::KeyDistribution>, {
fn fuse_add_lwe_ciphertext(
&mut self,
output: &mut OutputCiphertext,
input: &InputCiphertext
) -> Result<(), LweCiphertextFusingAdditionError<Self::EngineError>>;
unsafe fn fuse_add_lwe_ciphertext_unchecked(
&mut self,
output: &mut OutputCiphertext,
input: &InputCiphertext
);
}
Expand description
A trait for engines adding (fusing) LWE ciphertexts.
Semantics
This fusing operation adds the input
LWE ciphertext to the
output
LWE ciphertext.
Formal Definition
cf here
Required Methods
fn fuse_add_lwe_ciphertext(
&mut self,
output: &mut OutputCiphertext,
input: &InputCiphertext
) -> Result<(), LweCiphertextFusingAdditionError<Self::EngineError>>
fn fuse_add_lwe_ciphertext(
&mut self,
output: &mut OutputCiphertext,
input: &InputCiphertext
) -> Result<(), LweCiphertextFusingAdditionError<Self::EngineError>>
Adds an LWE ciphertext to an other.
unsafe fn fuse_add_lwe_ciphertext_unchecked(
&mut self,
output: &mut OutputCiphertext,
input: &InputCiphertext
)
unsafe fn fuse_add_lwe_ciphertext_unchecked(
&mut self,
output: &mut OutputCiphertext,
input: &InputCiphertext
)
Unsafely add an LWE ciphertext to an other.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of LweCiphertextFusingAdditionError
. For safety concerns specific to an engine,
refer to the implementer safety section.
Implementors
impl LweCiphertextFusingAdditionEngine<LweCiphertext32, LweCiphertext32> for DefaultEngine
Description:
Implementation of LweCiphertextFusingAdditionEngine
for DefaultEngine
that operates on
32 bits integers.
impl LweCiphertextFusingAdditionEngine<LweCiphertext64, LweCiphertext64> for DefaultEngine
Description:
Implementation of LweCiphertextFusingAdditionEngine
for DefaultEngine
that operates on
64 bits integers.