Enum diem_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§
source§impl Clone for CryptoMaterialError
impl Clone for CryptoMaterialError
source§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 moresource§impl Debug for CryptoMaterialError
impl Debug for CryptoMaterialError
source§impl Display for CryptoMaterialError
impl Display for CryptoMaterialError
source§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
source§impl PartialEq<CryptoMaterialError> for CryptoMaterialError
impl PartialEq<CryptoMaterialError> for CryptoMaterialError
source§fn eq(&self, other: &CryptoMaterialError) -> bool
fn eq(&self, other: &CryptoMaterialError) -> bool
self
and other
values to be equal, and is used
by ==
.