pub trait LweCiphertextVectorDiscardingAdditionEngine<InputCiphertextVector, OutputCiphertextVector>: AbstractEnginewhere
InputCiphertextVector: LweCiphertextVectorEntity,
OutputCiphertextVector: LweCiphertextVectorEntity<KeyDistribution = InputCiphertextVector::KeyDistribution>,{
// Required methods
fn discard_add_lwe_ciphertext_vector(
&mut self,
output: &mut OutputCiphertextVector,
input_1: &InputCiphertextVector,
input_2: &InputCiphertextVector,
) -> Result<(), LweCiphertextVectorDiscardingAdditionError<Self::EngineError>>;
unsafe fn discard_add_lwe_ciphertext_vector_unchecked(
&mut self,
output: &mut OutputCiphertextVector,
input_1: &InputCiphertextVector,
input_2: &InputCiphertextVector,
);
}Expand description
A trait for engines adding (discarding) LWE ciphertext vectors.
§Semantics
This discarding operation fills the output LWE ciphertext vector
with the element-wise addition of the input_1 LWE ciphertext vector and the input_2 lwe
ciphertext vector.
§Formal Definition
Required Methods§
Sourcefn discard_add_lwe_ciphertext_vector(
&mut self,
output: &mut OutputCiphertextVector,
input_1: &InputCiphertextVector,
input_2: &InputCiphertextVector,
) -> Result<(), LweCiphertextVectorDiscardingAdditionError<Self::EngineError>>
fn discard_add_lwe_ciphertext_vector( &mut self, output: &mut OutputCiphertextVector, input_1: &InputCiphertextVector, input_2: &InputCiphertextVector, ) -> Result<(), LweCiphertextVectorDiscardingAdditionError<Self::EngineError>>
Adds two LWE ciphertext vectors.
Sourceunsafe fn discard_add_lwe_ciphertext_vector_unchecked(
&mut self,
output: &mut OutputCiphertextVector,
input_1: &InputCiphertextVector,
input_2: &InputCiphertextVector,
)
unsafe fn discard_add_lwe_ciphertext_vector_unchecked( &mut self, output: &mut OutputCiphertextVector, input_1: &InputCiphertextVector, input_2: &InputCiphertextVector, )
Unsafely adds two LWE ciphertext vectors.
§Safety
For the general safety concerns regarding this operation, refer to the different variants
of LweCiphertextVectorDiscardingAdditionError. For safety concerns specific to an
engine, refer to the implementer safety section.
Implementors§
impl LweCiphertextVectorDiscardingAdditionEngine<LweCiphertextVector32, LweCiphertextVector32> for CoreEngine
§Description:
Implementation of LweCiphertextVectorDiscardingAdditionEngine for CoreEngine
that operates on 32 bits integers.
impl LweCiphertextVectorDiscardingAdditionEngine<LweCiphertextVector64, LweCiphertextVector64> for CoreEngine
§Description:
Implementation of LweCiphertextVectorDiscardingAdditionEngine for CoreEngine
that operates on 64 bits integers.