#[non_exhaustive]pub enum LweCiphertextVectorDiscardingBootstrapError<EngineError: Error> {
InputLweDimensionMismatch,
OutputLweDimensionMismatch,
AccumulatorGlweDimensionMismatch,
AccumulatorPolynomialSizeMismatch,
AccumulatorCountMismatch,
CiphertextCountMismatch,
Engine(EngineError),
}Expand description
An error used with the LweCiphertextVectorDiscardingBootstrapEngine trait.
This type provides a
LweCiphertextVectorDiscardingBootstrapError::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 vector and key input LWE dimension must be the same.
OutputLweDimensionMismatch
Generic error: The output vector and key output LWE dimension must be the same.
AccumulatorGlweDimensionMismatch
Generic error: The accumulator vector and key GLWE dimension must be the same.
AccumulatorPolynomialSizeMismatch
Generic error: The accumulator vector and key polynomial size must be the same.
AccumulatorCountMismatch
Generic error: The accumulator count and input ciphertext count must be the same.
CiphertextCountMismatch
Generic error: The input and output ciphertext count must be the same.
Engine(EngineError)
Specific error to the implementing engine.
Implementations§
Source§impl<EngineError: Error> LweCiphertextVectorDiscardingBootstrapError<EngineError>
impl<EngineError: Error> LweCiphertextVectorDiscardingBootstrapError<EngineError>
Sourcepub fn perform_generic_checks<BootstrapKey, AccumulatorVector, InputCiphertextVector, OutputCiphertextVector>(
output: &OutputCiphertextVector,
input: &InputCiphertextVector,
acc: &AccumulatorVector,
bsk: &BootstrapKey,
) -> Result<(), Self>where
BootstrapKey: LweBootstrapKeyEntity,
AccumulatorVector: GlweCiphertextVectorEntity<KeyDistribution = BootstrapKey::OutputKeyDistribution>,
InputCiphertextVector: LweCiphertextVectorEntity<KeyDistribution = BootstrapKey::InputKeyDistribution>,
OutputCiphertextVector: LweCiphertextVectorEntity<KeyDistribution = BootstrapKey::OutputKeyDistribution>,
pub fn perform_generic_checks<BootstrapKey, AccumulatorVector, InputCiphertextVector, OutputCiphertextVector>(
output: &OutputCiphertextVector,
input: &InputCiphertextVector,
acc: &AccumulatorVector,
bsk: &BootstrapKey,
) -> Result<(), Self>where
BootstrapKey: LweBootstrapKeyEntity,
AccumulatorVector: GlweCiphertextVectorEntity<KeyDistribution = BootstrapKey::OutputKeyDistribution>,
InputCiphertextVector: LweCiphertextVectorEntity<KeyDistribution = BootstrapKey::InputKeyDistribution>,
OutputCiphertextVector: LweCiphertextVectorEntity<KeyDistribution = BootstrapKey::OutputKeyDistribution>,
Validates the inputs
Trait Implementations§
Source§impl<EngineError: Clone + Error> Clone for LweCiphertextVectorDiscardingBootstrapError<EngineError>
impl<EngineError: Clone + Error> Clone for LweCiphertextVectorDiscardingBootstrapError<EngineError>
Source§fn clone(&self) -> LweCiphertextVectorDiscardingBootstrapError<EngineError>
fn clone(&self) -> LweCiphertextVectorDiscardingBootstrapError<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 LweCiphertextVectorDiscardingBootstrapError<EngineError>
impl<EngineError: Debug + Error> Debug for LweCiphertextVectorDiscardingBootstrapError<EngineError>
Source§impl<EngineError: Error> Display for LweCiphertextVectorDiscardingBootstrapError<EngineError>
impl<EngineError: Error> Display for LweCiphertextVectorDiscardingBootstrapError<EngineError>
Source§impl<EngineError: Error> Error for LweCiphertextVectorDiscardingBootstrapError<EngineError>
impl<EngineError: Error> Error for LweCiphertextVectorDiscardingBootstrapError<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 LweCiphertextVectorDiscardingBootstrapError<EngineError>
impl<EngineError: PartialEq + Error> PartialEq for LweCiphertextVectorDiscardingBootstrapError<EngineError>
Source§fn eq(
&self,
other: &LweCiphertextVectorDiscardingBootstrapError<EngineError>,
) -> bool
fn eq( &self, other: &LweCiphertextVectorDiscardingBootstrapError<EngineError>, ) -> bool
self and other values to be equal, and is used by ==.