2019-12-02 21:36:47 -08:00
|
|
|
use thiserror::Error;
|
|
|
|
|
|
|
|
/// An error related to RedJubJub signatures.
|
2019-12-03 22:32:30 -08:00
|
|
|
#[derive(Error, Debug, Copy, Clone, Eq, PartialEq)]
|
2019-12-02 21:36:47 -08:00
|
|
|
pub enum Error {
|
2020-06-25 11:56:29 -07:00
|
|
|
/// The encoding of a signing key was malformed.
|
|
|
|
#[error("Malformed signing key encoding.")]
|
|
|
|
MalformedSigningKey,
|
|
|
|
/// The encoding of a verification key was malformed.
|
|
|
|
#[error("Malformed verification key encoding.")]
|
|
|
|
MalformedVerificationKey,
|
2019-12-03 22:32:30 -08:00
|
|
|
/// Signature verification failed.
|
|
|
|
#[error("Invalid signature.")]
|
|
|
|
InvalidSignature,
|
2019-12-02 21:36:47 -08:00
|
|
|
}
|