#[non_exhaustive]
pub enum GlweSecretKeyCreationError<EngineError: Error> {
NullGlweDimension,
NullPolynomialSize,
SizeOnePolynomial,
Engine(EngineError),
}
Expand description
An error used with the GlweSecretKeyCreationEngine
trait.
This type provides a
GlweSecretKeyCreationError::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
NullGlweDimension
Generic error: The secret key GLWE dimension must be greater than zero.
NullPolynomialSize
Generic error: The secret key polynomial size must be greater than zero.
SizeOnePolynomial
Generic error: The secret key polynomial size must be greater than one. Otherwise you should prefer the LWE scheme.
Engine(EngineError)
Specific error to the implementing engine.
Implementations
pub fn perform_generic_checks(
glwe_dimension: GlweDimension,
polynomial_size: PolynomialSize
) -> Result<(), Self>
pub fn perform_generic_checks(
glwe_dimension: GlweDimension,
polynomial_size: PolynomialSize
) -> Result<(), Self>
Validates the inputs
Trait Implementations
impl<EngineError: PartialEq + Error> PartialEq<GlweSecretKeyCreationError<EngineError>> for GlweSecretKeyCreationError<EngineError>
impl<EngineError: PartialEq + Error> PartialEq<GlweSecretKeyCreationError<EngineError>> for GlweSecretKeyCreationError<EngineError>
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl<EngineError> RefUnwindSafe for GlweSecretKeyCreationError<EngineError> where
EngineError: RefUnwindSafe,
impl<EngineError> Send for GlweSecretKeyCreationError<EngineError> where
EngineError: Send,
impl<EngineError> Sync for GlweSecretKeyCreationError<EngineError> where
EngineError: Sync,
impl<EngineError> Unpin for GlweSecretKeyCreationError<EngineError> where
EngineError: Unpin,
impl<EngineError> UnwindSafe for GlweSecretKeyCreationError<EngineError> where
EngineError: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more