Enum concrete_core::specification::engines::LweCiphertextVectorDiscardingCircuitBootstrapBooleanVerticalPackingError
source · [−]#[non_exhaustive]
pub enum LweCiphertextVectorDiscardingCircuitBootstrapBooleanVerticalPackingError<EngineError: Error> {
NullDecompositionBaseLog,
NullDecompositionLevelCount,
DecompositionTooLarge,
KeysLweDimensionMismatch,
InputLweDimensionMismatch,
OutputLweDimensionMismatch,
MalformedLookUpTables,
InvalidSmallLookUpTableSize,
Engine(EngineError),
}
Expand description
An error used with the LweCiphertextVectorDiscardingCircuitBootstrapBooleanVerticalPackingEngine
trait.
This type provides a
LweCiphertextVectorDiscardingCircuitBootstrapBooleanVerticalPackingError::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
NullDecompositionBaseLog
Generic error: The circuit bootstrap decomposition base log must be greater than zero.
NullDecompositionLevelCount
Generic error: The circuit bootstrap decomposition level count must be greater than zero.
DecompositionTooLarge
Generic error: The decomposition precision (base log * level count) must not exceed the precision of the ciphertext.
KeysLweDimensionMismatch
Generic error: The bootstrap key output LWE dimension must be the same as the input LWE dimension of the circuit bootstrap private functional packing keyswitch keys.
InputLweDimensionMismatch
Generic error: The input ciphertexts LWE dimension must be the same as the bootstrap key input LWE dimension.
OutputLweDimensionMismatch
Generic error:
The output ciphertexts LWE dimension must be the same as the cbs_pfpksk
output GLWE dimension times its output polynomial size.
MalformedLookUpTables
Generic error:
The input luts
must have a size divisible by the circuit bootstrap private functional packing keyswitch keys output polynomial size times the number of output ciphertexts. This is required to get small look-up tables of polynomials of the same size for each output ciphertext.
InvalidSmallLookUpTableSize
Generic error: The number of polynomials times the polynomial size in a small look-up table must be equal to 2 to the power the number of input ciphertexts encrypting bits.
Engine(EngineError)
Specific error to the implementing engine.
Implementations
sourceimpl<EngineError: Error> LweCiphertextVectorDiscardingCircuitBootstrapBooleanVerticalPackingError<EngineError>
impl<EngineError: Error> LweCiphertextVectorDiscardingCircuitBootstrapBooleanVerticalPackingError<EngineError>
sourcepub fn perform_generic_checks<Input: LweCiphertextVectorEntity, Output: LweCiphertextVectorEntity, BootstrapKey: LweBootstrapKeyEntity, LUTs: PlaintextVectorEntity, CBSPFPKSK: LweCircuitBootstrapPrivateFunctionalPackingKeyswitchKeysEntity>(
input: &Input,
output: &Output,
bsk: &BootstrapKey,
luts: &LUTs,
cbs_decomposition_level_count: DecompositionLevelCount,
cbs_decomposition_base_log: DecompositionBaseLog,
cbs_pfpksk: &CBSPFPKSK,
ciphertext_modulus_log: usize
) -> Result<(), Self>
pub fn perform_generic_checks<Input: LweCiphertextVectorEntity, Output: LweCiphertextVectorEntity, BootstrapKey: LweBootstrapKeyEntity, LUTs: PlaintextVectorEntity, CBSPFPKSK: LweCircuitBootstrapPrivateFunctionalPackingKeyswitchKeysEntity>(
input: &Input,
output: &Output,
bsk: &BootstrapKey,
luts: &LUTs,
cbs_decomposition_level_count: DecompositionLevelCount,
cbs_decomposition_base_log: DecompositionBaseLog,
cbs_pfpksk: &CBSPFPKSK,
ciphertext_modulus_log: usize
) -> Result<(), Self>
Validates the inputs
Trait Implementations
sourceimpl<EngineError: Clone + Error> Clone for LweCiphertextVectorDiscardingCircuitBootstrapBooleanVerticalPackingError<EngineError>
impl<EngineError: Clone + Error> Clone for LweCiphertextVectorDiscardingCircuitBootstrapBooleanVerticalPackingError<EngineError>
sourcefn clone(
&self
) -> LweCiphertextVectorDiscardingCircuitBootstrapBooleanVerticalPackingError<EngineError>
fn clone(
&self
) -> LweCiphertextVectorDiscardingCircuitBootstrapBooleanVerticalPackingError<EngineError>
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more