Trait concrete_core::specification::engines::LweCiphertextVectorDiscardingOppositeEngine
source · [−]pub trait LweCiphertextVectorDiscardingOppositeEngine<InputCiphertextVector, OutputCiphertextVector>: AbstractEnginewhere
InputCiphertextVector: LweCiphertextVectorEntity,
OutputCiphertextVector: LweCiphertextVectorEntity,{
fn discard_opp_lwe_ciphertext_vector(
&mut self,
output: &mut OutputCiphertextVector,
input: &InputCiphertextVector
) -> Result<(), LweCiphertextVectorDiscardingOppositeError<Self::EngineError>>;
unsafe fn discard_opp_lwe_ciphertext_vector_unchecked(
&mut self,
output: &mut OutputCiphertextVector,
input: &InputCiphertextVector
);
}
Expand description
A trait for engines computing the opposite (discarding) LWE ciphertext vectors.
Semantics
This discarding operation fills the output
LWE ciphertext vector
with the element-wise opposite of the input
LWE ciphertext vector.
Formal Definition
cf here
Required Methods
sourcefn discard_opp_lwe_ciphertext_vector(
&mut self,
output: &mut OutputCiphertextVector,
input: &InputCiphertextVector
) -> Result<(), LweCiphertextVectorDiscardingOppositeError<Self::EngineError>>
fn discard_opp_lwe_ciphertext_vector(
&mut self,
output: &mut OutputCiphertextVector,
input: &InputCiphertextVector
) -> Result<(), LweCiphertextVectorDiscardingOppositeError<Self::EngineError>>
Computes the opposite of an LWE ciphertext vector.
sourceunsafe fn discard_opp_lwe_ciphertext_vector_unchecked(
&mut self,
output: &mut OutputCiphertextVector,
input: &InputCiphertextVector
)
unsafe fn discard_opp_lwe_ciphertext_vector_unchecked(
&mut self,
output: &mut OutputCiphertextVector,
input: &InputCiphertextVector
)
Unsafely computes the opposite of an LWE ciphertext vector.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of LweCiphertextVectorDiscardingOppositeError
. For safety concerns specific to an
engine, refer to the implementer safety section.