pub trait LweCiphertextPlaintextFusingAdditionEngine<Ciphertext, Plaintext>: AbstractEngine where
Plaintext: PlaintextEntity,
Ciphertext: LweCiphertextEntity, {
fn fuse_add_lwe_ciphertext_plaintext(
&mut self,
output: &mut Ciphertext,
input: &Plaintext
) -> Result<(), LweCiphertextPlaintextFusingAdditionError<Self::EngineError>>;
unsafe fn fuse_add_lwe_ciphertext_plaintext_unchecked(
&mut self,
output: &mut Ciphertext,
input: &Plaintext
);
}
Expand description
A trait for engines adding (fusing) plaintexts to LWE ciphertexts.
Semantics
This fusing operation adds the input
plaintext to the output
LWE ciphertext.
Formal Definition
Required methods
fn fuse_add_lwe_ciphertext_plaintext(
&mut self,
output: &mut Ciphertext,
input: &Plaintext
) -> Result<(), LweCiphertextPlaintextFusingAdditionError<Self::EngineError>>
fn fuse_add_lwe_ciphertext_plaintext(
&mut self,
output: &mut Ciphertext,
input: &Plaintext
) -> Result<(), LweCiphertextPlaintextFusingAdditionError<Self::EngineError>>
Add a plaintext to an LWE ciphertext.
unsafe fn fuse_add_lwe_ciphertext_plaintext_unchecked(
&mut self,
output: &mut Ciphertext,
input: &Plaintext
)
unsafe fn fuse_add_lwe_ciphertext_plaintext_unchecked(
&mut self,
output: &mut Ciphertext,
input: &Plaintext
)
Unsafely add a plaintext to an LWE ciphertext.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of LweCiphertextPlaintextFusingAdditionError
. For safety concerns specific to an
engine, refer to the implementer safety section.
Implementors
Description:
Implementation of LweCiphertextPlaintextFusingAdditionEngine
for CoreEngine
that
operates on 32 bits integers.
Description:
Implementation of LweCiphertextPlaintextFusingAdditionEngine
for CoreEngine
that
operates on 64 bits integers.