pub trait LweCiphertextVectorFusingSubtractionEngine<InputCiphertextVector, OutputCiphertextVector>: AbstractEnginewhere
InputCiphertextVector: LweCiphertextVectorEntity,
OutputCiphertextVector: LweCiphertextVectorEntity,{
fn fuse_sub_lwe_ciphertext_vector(
&mut self,
output: &mut OutputCiphertextVector,
input: &InputCiphertextVector
) -> Result<(), LweCiphertextVectorFusingSubtractionError<Self::EngineError>>;
unsafe fn fuse_sub_lwe_ciphertext_vector_unchecked(
&mut self,
output: &mut OutputCiphertextVector,
input: &InputCiphertextVector
);
}
Expand description
A trait for engines subtracting (fusing) LWE ciphertexts vectors.
Semantics
This fusing operation subtracts the input
LWE ciphertext vector
to the output
LWE ciphertext vector.
Formal Definition
Required Methods
sourcefn fuse_sub_lwe_ciphertext_vector(
&mut self,
output: &mut OutputCiphertextVector,
input: &InputCiphertextVector
) -> Result<(), LweCiphertextVectorFusingSubtractionError<Self::EngineError>>
fn fuse_sub_lwe_ciphertext_vector(
&mut self,
output: &mut OutputCiphertextVector,
input: &InputCiphertextVector
) -> Result<(), LweCiphertextVectorFusingSubtractionError<Self::EngineError>>
Subtracts two LWE ciphertext vectors.
sourceunsafe fn fuse_sub_lwe_ciphertext_vector_unchecked(
&mut self,
output: &mut OutputCiphertextVector,
input: &InputCiphertextVector
)
unsafe fn fuse_sub_lwe_ciphertext_vector_unchecked(
&mut self,
output: &mut OutputCiphertextVector,
input: &InputCiphertextVector
)
Unsafely subtracts two LWE ciphertext vectors.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of LweCiphertextVectorFusingSubtractionError
. For safety concerns specific to an
engine, refer to the implementer safety section.
Implementors
impl LweCiphertextVectorFusingSubtractionEngine<LweCiphertextVector32, LweCiphertextVector32> for DefaultEngine
Description:
Implementation of LweCiphertextVectorFusingSubtractionEngine
for DefaultEngine
that operates on 32 bits integers.
impl LweCiphertextVectorFusingSubtractionEngine<LweCiphertextVector64, LweCiphertextVector64> for DefaultEngine
Description:
Implementation of LweCiphertextVectorFusingSubtractionEngine
for DefaultEngine
that operates on 64 bits integers.