Enum aptos_crypto::traits::CryptoMaterialError
source · [−]pub enum CryptoMaterialError {
SerializationError,
DeserializationError,
ValidationError,
WrongLengthError,
CanonicalRepresentationError,
SmallSubgroupError,
PointNotOnCurveError,
BitVecError(String),
}Expand description
An error type for key and signature validation issues, see ValidCryptoMaterial.
This enum reflects there are two interesting causes of validation failure for the ingestion of key or signature material: deserialization errors (often, due to mangled material or curve equation failure for ECC) and validation errors (material recognizable but unacceptable for use, e.g. unsafe).
Variants
SerializationError
Struct to be signed does not serialize correctly.
DeserializationError
Key or signature material does not deserialize correctly.
ValidationError
Key or signature material deserializes, but is otherwise not valid.
WrongLengthError
Key, threshold or signature material does not have the expected size.
CanonicalRepresentationError
Part of the signature or key is not canonical resulting to malleability issues.
SmallSubgroupError
A curve point (i.e., a public key) lies on a small group.
PointNotOnCurveError
A curve point (i.e., a public key) does not satisfy the curve equation.
BitVecError(String)
BitVec errors in accountable multi-sig schemes.
Trait Implementations
sourceimpl Clone for CryptoMaterialError
impl Clone for CryptoMaterialError
sourcefn clone(&self) -> CryptoMaterialError
fn clone(&self) -> CryptoMaterialError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for CryptoMaterialError
impl Debug for CryptoMaterialError
sourceimpl Display for CryptoMaterialError
impl Display for CryptoMaterialError
sourceimpl Error for CryptoMaterialError
impl Error for CryptoMaterialError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl PartialEq<CryptoMaterialError> for CryptoMaterialError
impl PartialEq<CryptoMaterialError> for CryptoMaterialError
sourcefn eq(&self, other: &CryptoMaterialError) -> bool
fn eq(&self, other: &CryptoMaterialError) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &CryptoMaterialError) -> bool
fn ne(&self, other: &CryptoMaterialError) -> bool
This method tests for !=.
impl Eq for CryptoMaterialError
impl StructuralEq for CryptoMaterialError
impl StructuralPartialEq for CryptoMaterialError
Auto Trait Implementations
impl RefUnwindSafe for CryptoMaterialError
impl Send for CryptoMaterialError
impl Sync for CryptoMaterialError
impl Unpin for CryptoMaterialError
impl UnwindSafe for CryptoMaterialError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more