#[non_exhaustive]pub enum Error {
InvalidPublicKeyLength {
expected: usize,
actual: usize,
},
InvalidSignatureLength {
actual: usize,
min: usize,
max: usize,
},
VerificationFailed {
index: usize,
},
SignerIndexOutOfRange {
index: usize,
total: usize,
},
DuplicateSignature {
index: usize,
},
InvalidThreshold {
required: usize,
total_keys: usize,
},
CommitteeTooSmall {
count: usize,
},
ThresholdNotMet {
have: usize,
need: usize,
},
PublicKeyParseError {
index: usize,
},
SignatureParseError {
index: usize,
},
}Expand description
All errors that can be produced by this library.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidPublicKeyLength
The supplied public key has an incorrect byte length.
Falcon-512 public keys must be exactly crate::PUBLIC_KEY_BYTES bytes.
InvalidSignatureLength
The supplied signature has an incorrect or out-of-range byte length.
Fields
VerificationFailed
Cryptographic verification of a Falcon-512 signature failed.
This is returned by crate::verify::verify_partial and
crate::session::SigningSession::add_signature when the raw
Falcon-512 check does not pass.
SignerIndexOutOfRange
The public key provided during signing does not belong to the configured committee.
DuplicateSignature
A signature for this index has already been recorded in the session.
InvalidThreshold
The threshold configuration is invalid.
required must be in the range 1..=total_keys.
Fields
CommitteeTooSmall
The committee must have at least two members.
ThresholdNotMet
The signing session has not yet collected enough valid signatures to satisfy the configured threshold.
Fields
PublicKeyParseError
Failed to parse a Falcon-512 public key from raw bytes.
SignatureParseError
Failed to parse a Falcon-512 signature from raw bytes.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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
use the Display impl or to_string()
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more