Enum sp_consensus_vrf::schnorrkel::SignatureError [−]
pub enum SignatureError {
EquationFalse,
PointDecompressionError,
ScalarFormatError,
BytesLengthError {
name: &'static str,
description: &'static str,
length: usize,
},
NotMarkedSchnorrkel,
MuSigAbsent {
musig_stage: MultiSignatureStage,
},
MuSigInconsistent {
musig_stage: MultiSignatureStage,
duplicate: bool,
},
}Expand description
Errors which may occur while processing signatures and keypairs.
All these errors represent a failed signature when they occur in the context of verifying a sitgnature, including in deserializaing for verification. We expose the distinction among them primarily for debugging purposes.
This error may arise due to:
-
Being given bytes with a length different to what was expected.
-
A problem decompressing
r, a curve point, in theSignature, or the curve point for aPublicKey. -
A problem with the format of
s, a scalar, in theSignature. This is only raised if the high-bit of the scalar was set. (Scalars must only be constructed from 255-bit integers.) -
Multi-signature protocol errors
Variants
A signature verification equation failed.
We emphasise that all variants represent a failed signature, not only this one.
Invalid point provided, usually to verify methods.
Invalid scalar provided, usually to Signature::from_bytes.
An error in the length of bytes handed to a constructor.
To use this, pass a string specifying the name of the type
which is returning the error, and the length in bytes which
its constructor expects.
Show fields
Signature not marked as schnorrkel, maybe try ed25519 instead.
There is no record of the preceeding multi-signautre protocol stage for the specified public key.
Show fields
For this public key, there are either conflicting records for the preceeding multi-signautre protocol stage or else duplicate duplicate records for the current stage.
Show fields
Fields of MuSigInconsistent
musig_stage: MultiSignatureStageIdentifies the multi-signature protocol stage during which the error occured.
duplicate: boolSet true if the stage was reached correctly once but this duplicate disagrees.
Trait Implementations
impl Clone for SignatureError
impl Clone for SignatureErrorpub fn clone(&self) -> SignatureError
pub fn clone(&self) -> SignatureErrorReturns a copy of the value. Read more
Performs copy-assignment from source. Read more
impl Debug for SignatureError
impl Debug for SignatureErrorimpl Display for SignatureError
impl Display for SignatureErrorimpl Hash for SignatureError
impl Hash for SignatureErrorimpl PartialEq<SignatureError> for SignatureError
impl PartialEq<SignatureError> for SignatureErrorpub fn eq(&self, other: &SignatureError) -> bool
pub fn eq(&self, other: &SignatureError) -> boolThis method tests for self and other values to be equal, and is used
by ==. Read more
pub fn ne(&self, other: &SignatureError) -> bool
pub fn ne(&self, other: &SignatureError) -> boolThis method tests for !=.
impl Copy for SignatureErrorimpl Eq for SignatureErrorimpl StructuralEq for SignatureErrorimpl StructuralPartialEq for SignatureErrorAuto Trait Implementations
impl RefUnwindSafe for SignatureErrorimpl Send for SignatureErrorimpl Sync for SignatureErrorimpl Unpin for SignatureErrorimpl UnwindSafe for SignatureErrorBlanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any, Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = TShould always be Self
The counterpart to unchecked_from.
pub fn vzip(self) -> Vimpl<T> MaybeDebug for T where
T: Debug,