Enum concrete_core::specification::engines::LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError
source · [−]#[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
sourceimpl<EngineError: Error> LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<EngineError>
impl<EngineError: Error> LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<EngineError>
sourcepub fn perform_generic_checks<LwePackingKeyswitchKey, InputCiphertextVector, OutputCiphertext>(
output: &mut OutputCiphertext,
input: &InputCiphertextVector,
ksk: &LwePackingKeyswitchKey
) -> Result<(), Self>where
LwePackingKeyswitchKey: LwePackingKeyswitchKeyEntity,
InputCiphertextVector: LweCiphertextVectorEntity,
OutputCiphertext: GlweCiphertextEntity,
pub fn perform_generic_checks<LwePackingKeyswitchKey, InputCiphertextVector, OutputCiphertext>(
output: &mut OutputCiphertext,
input: &InputCiphertextVector,
ksk: &LwePackingKeyswitchKey
) -> Result<(), Self>where
LwePackingKeyswitchKey: LwePackingKeyswitchKeyEntity,
InputCiphertextVector: LweCiphertextVectorEntity,
OutputCiphertext: GlweCiphertextEntity,
Validates the inputs
Trait Implementations
sourceimpl<EngineError: Clone + Error> Clone for LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<EngineError>
impl<EngineError: Clone + Error> Clone for LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<EngineError>
sourcefn clone(
&self
) -> LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<EngineError>
fn clone(
&self
) -> LweCiphertextVectorGlweCiphertextDiscardingPackingKeyswitchError<EngineError>
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more