Trait concrete_core::specification::engines::LweCiphertextCleartextFusingMultiplicationEngine
source · [−]pub trait LweCiphertextCleartextFusingMultiplicationEngine<Ciphertext, Cleartext>: AbstractEngine where
Cleartext: CleartextEntity,
Ciphertext: LweCiphertextEntity, {
fn fuse_mul_lwe_ciphertext_cleartext(
&mut self,
output: &mut Ciphertext,
input: &Cleartext
) -> Result<(), LweCiphertextCleartextFusingMultiplicationError<Self::EngineError>>;
unsafe fn fuse_mul_lwe_ciphertext_cleartext_unchecked(
&mut self,
output: &mut Ciphertext,
input: &Cleartext
);
}
Expand description
A trait for engines multiplying (fusing) LWE ciphertexts by cleartexts.
Semantics
This fusing operation multiply the output
LWE ciphertext with
the input
cleartext.
Formal Definition
cf
here
Required Methods
fn fuse_mul_lwe_ciphertext_cleartext(
&mut self,
output: &mut Ciphertext,
input: &Cleartext
) -> Result<(), LweCiphertextCleartextFusingMultiplicationError<Self::EngineError>>
fn fuse_mul_lwe_ciphertext_cleartext(
&mut self,
output: &mut Ciphertext,
input: &Cleartext
) -> Result<(), LweCiphertextCleartextFusingMultiplicationError<Self::EngineError>>
Multiply an LWE ciphertext with a cleartext.
unsafe fn fuse_mul_lwe_ciphertext_cleartext_unchecked(
&mut self,
output: &mut Ciphertext,
input: &Cleartext
)
unsafe fn fuse_mul_lwe_ciphertext_cleartext_unchecked(
&mut self,
output: &mut Ciphertext,
input: &Cleartext
)
Unsafely multiply an LWE ciphertext with a cleartext.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of LweCiphertextCleartextFusingMultiplicationError
. For safety concerns specific to
an engine, refer to the implementer safety section.
Implementors
impl LweCiphertextCleartextFusingMultiplicationEngine<LweCiphertext32, Cleartext32> for DefaultEngine
Description:
Implementation of LweCiphertextCleartextFusingMultiplicationEngine
for DefaultEngine
that operates on 32 bits integers.
impl LweCiphertextCleartextFusingMultiplicationEngine<LweCiphertext64, Cleartext64> for DefaultEngine
Description:
Implementation of LweCiphertextCleartextFusingMultiplicationEngine
for DefaultEngine
that operates on 64 bits integers.