#[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
sourceimpl<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,
InputCiphertextVector: LweCiphertextVectorEntity,
OutputCiphertextVector: LweCiphertextVectorEntity,
pub fn perform_generic_checks<BootstrapKey, AccumulatorVector, InputCiphertextVector, OutputCiphertextVector>(
output: &OutputCiphertextVector,
input: &InputCiphertextVector,
acc: &AccumulatorVector,
bsk: &BootstrapKey
) -> Result<(), Self>where
BootstrapKey: LweBootstrapKeyEntity,
AccumulatorVector: GlweCiphertextVectorEntity,
InputCiphertextVector: LweCiphertextVectorEntity,
OutputCiphertextVector: LweCiphertextVectorEntity,
Validates the inputs
Trait Implementations
sourceimpl<EngineError: Clone + Error> Clone for LweCiphertextVectorDiscardingBootstrapError<EngineError>
impl<EngineError: Clone + Error> Clone for LweCiphertextVectorDiscardingBootstrapError<EngineError>
sourcefn clone(&self) -> LweCiphertextVectorDiscardingBootstrapError<EngineError>
fn clone(&self) -> LweCiphertextVectorDiscardingBootstrapError<EngineError>
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more