#[non_exhaustive]pub enum LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<EngineError: Error> {
InputLweDimensionMismatch,
OutputGlweDimensionMismatch,
OutputPolynomialSizeMismatch,
CiphertextCountMismatch,
Engine(EngineError),
}Expand description
An error used with the LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchEngine trait.
This type provides a
LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError::perform_generic_checks
function that does error checking for the general cases, returning an Ok(())
if the inputs are valid, meaning that engine implementors would then only
need to check for their own specific errors.
Otherwise an Err(..) with the proper error variant is returned.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InputLweDimensionMismatch
Generic error: The input ciphertext vector and input packing keyswitch key LWE dimension must be the same.
OutputGlweDimensionMismatch
Generic error: The output ciphertext vector and packing keyswitch key output GLWE dimensions must be the same.
OutputPolynomialSizeMismatch
Generic error: The output ciphertext vector and packing keyswitch key polynomial sizes must be the same.
CiphertextCountMismatch
Generic error: The input ciphertext count is bigger than the output polynomial size.
Engine(EngineError)
Specific error to the implementing engine.
Implementations§
Source§impl<EngineError: Error> LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<EngineError>
impl<EngineError: Error> LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<EngineError>
Sourcepub fn perform_generic_checks<PackingKeyswitchKey, InputCiphertextVector, OutputCiphertext>(
output: &mut OutputCiphertext,
input: &InputCiphertextVector,
ksk: &PackingKeyswitchKey,
) -> Result<(), Self>where
PackingKeyswitchKey: PackingKeyswitchKeyEntity,
InputCiphertextVector: LweCiphertextVectorEntity<KeyDistribution = PackingKeyswitchKey::InputKeyDistribution>,
OutputCiphertext: GlweCiphertextEntity<KeyDistribution = PackingKeyswitchKey::OutputKeyDistribution>,
pub fn perform_generic_checks<PackingKeyswitchKey, InputCiphertextVector, OutputCiphertext>(
output: &mut OutputCiphertext,
input: &InputCiphertextVector,
ksk: &PackingKeyswitchKey,
) -> Result<(), Self>where
PackingKeyswitchKey: PackingKeyswitchKeyEntity,
InputCiphertextVector: LweCiphertextVectorEntity<KeyDistribution = PackingKeyswitchKey::InputKeyDistribution>,
OutputCiphertext: GlweCiphertextEntity<KeyDistribution = PackingKeyswitchKey::OutputKeyDistribution>,
Validates the inputs
Trait Implementations§
Source§impl<EngineError: Clone + Error> Clone for LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<EngineError>
impl<EngineError: Clone + Error> Clone for LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<EngineError>
Source§fn clone(
&self,
) -> LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<EngineError>
fn clone( &self, ) -> LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<EngineError>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<EngineError: Debug + Error> Debug for LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<EngineError>
impl<EngineError: Debug + Error> Debug for LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<EngineError>
Source§impl<EngineError: Error> Display for LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<EngineError>
impl<EngineError: Error> Display for LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<EngineError>
Source§impl<EngineError: Error> Error for LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<EngineError>
impl<EngineError: Error> Error for LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<EngineError>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl<EngineError: PartialEq + Error> PartialEq for LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<EngineError>
impl<EngineError: PartialEq + Error> PartialEq for LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<EngineError>
Source§fn eq(
&self,
other: &LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<EngineError>,
) -> bool
fn eq( &self, other: &LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<EngineError>, ) -> bool
self and other values to be equal, and is used by ==.