Enum diem_sdk::crypto::CryptoMaterialError
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§
§impl Clone for CryptoMaterialError
impl Clone for CryptoMaterialError
§fn clone(&self) -> CryptoMaterialError
fn clone(&self) -> CryptoMaterialError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for CryptoMaterialError
impl Debug for CryptoMaterialError
§impl Display for CryptoMaterialError
impl Display for CryptoMaterialError
§impl Error for CryptoMaterialError
impl Error for CryptoMaterialError
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
§impl From<CryptoMaterialError> for ParseError
impl From<CryptoMaterialError> for ParseError
§fn from(source: CryptoMaterialError) -> ParseError
fn from(source: CryptoMaterialError) -> ParseError
§impl PartialEq<CryptoMaterialError> for CryptoMaterialError
impl PartialEq<CryptoMaterialError> for CryptoMaterialError
§fn eq(&self, other: &CryptoMaterialError) -> bool
fn eq(&self, other: &CryptoMaterialError) -> bool
self
and other
values to be equal, and is used
by ==
.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§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.