Enum concrete_core::specification::engines::LweCiphertextVectorGlweCiphertextDiscardingPrivateFunctionalPackingKeyswitchError
source · [−]#[non_exhaustive]
pub enum LweCiphertextVectorGlweCiphertextDiscardingPrivateFunctionalPackingKeyswitchError<EngineError: Error> {
InputLweDimensionMismatch,
OutputGlweDimensionMismatch,
OutputPolynomialSizeMismatch,
CiphertextCountMismatch,
Engine(EngineError),
}
Expand description
An error used with the LweCiphertextVectorGlweCiphertextDiscardingPrivateFunctionalPackingKeyswitchEngine
trait.
This type provides a
LweCiphertextVectorGlweCiphertextDiscardingPrivateFunctionalPackingKeyswitchError::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 private functional packing keyswitch key LWE dimension must be the same.
OutputGlweDimensionMismatch
Generic error: The output ciphertext vector and private functional packing keyswitch key output GLWE dimensions must be the same.
OutputPolynomialSizeMismatch
Generic error: The output ciphertext vector and private functional 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> LweCiphertextVectorGlweCiphertextDiscardingPrivateFunctionalPackingKeyswitchError<EngineError>
impl<EngineError: Error> LweCiphertextVectorGlweCiphertextDiscardingPrivateFunctionalPackingKeyswitchError<EngineError>
sourcepub fn perform_generic_checks<LwePrivateFunctionalPackingKeyswitchKey, InputCiphertextVector, OutputCiphertext>(
output: &mut OutputCiphertext,
input: &InputCiphertextVector,
ksk: &LwePrivateFunctionalPackingKeyswitchKey
) -> Result<(), Self>where
LwePrivateFunctionalPackingKeyswitchKey: LwePrivateFunctionalPackingKeyswitchKeyEntity,
InputCiphertextVector: LweCiphertextVectorEntity,
OutputCiphertext: GlweCiphertextEntity,
pub fn perform_generic_checks<LwePrivateFunctionalPackingKeyswitchKey, InputCiphertextVector, OutputCiphertext>(
output: &mut OutputCiphertext,
input: &InputCiphertextVector,
ksk: &LwePrivateFunctionalPackingKeyswitchKey
) -> Result<(), Self>where
LwePrivateFunctionalPackingKeyswitchKey: LwePrivateFunctionalPackingKeyswitchKeyEntity,
InputCiphertextVector: LweCiphertextVectorEntity,
OutputCiphertext: GlweCiphertextEntity,
Validates the inputs
Trait Implementations
sourceimpl<EngineError: Clone + Error> Clone for LweCiphertextVectorGlweCiphertextDiscardingPrivateFunctionalPackingKeyswitchError<EngineError>
impl<EngineError: Clone + Error> Clone for LweCiphertextVectorGlweCiphertextDiscardingPrivateFunctionalPackingKeyswitchError<EngineError>
sourcefn clone(
&self
) -> LweCiphertextVectorGlweCiphertextDiscardingPrivateFunctionalPackingKeyswitchError<EngineError>
fn clone(
&self
) -> LweCiphertextVectorGlweCiphertextDiscardingPrivateFunctionalPackingKeyswitchError<EngineError>
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more