pub trait LweCiphertextPlaintextFusingAdditionEngine<Ciphertext, Plaintext>: AbstractEnginewhere
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
sourcefn 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.
sourceunsafe 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
impl LweCiphertextPlaintextFusingAdditionEngine<LweCiphertext32, Plaintext32> for DefaultEngine
Description:
Implementation of LweCiphertextPlaintextFusingAdditionEngine
for DefaultEngine
that
operates on 32 bits integers.
impl LweCiphertextPlaintextFusingAdditionEngine<LweCiphertext64, Plaintext64> for DefaultEngine
Description:
Implementation of LweCiphertextPlaintextFusingAdditionEngine
for DefaultEngine
that
operates on 64 bits integers.