use thiserror::Error;
#[derive(Error, Clone, Debug)]
pub enum Error {
#[error("Error during keypair generation")]
KeyGenError(String),
#[error("Invalid key")]
KeyDeserializationError,
#[error("Error during computation of a Blind Signature")]
BlindSignError(String),
#[error("Error during computation of a Signature")]
SignatureGenerationError(String),
#[error("Not a valid Signature")]
InvalidSignature,
#[error("Error during hash to scalar computation")]
HashToScalarError,
#[error("Error mapping a message to scalar")]
MapMessageToScalarError,
#[error("Not enough Generators")]
NotEnoughGenerators,
#[error("Error, B value is Identity_G1")]
G1IdentityError,
#[error("Error during deserialization")]
DeserializationError(String),
#[error("Signature is not valid")]
SignatureVerificationError,
#[error("Error during computation of a Proof of Knowledge of a Signature")]
ProofGenError(String),
#[error("Error during computation of a Blind Proof of Knowledge of a Signature")]
BlindProofGenError(String),
#[error("Unknown error")]
Unspecified,
#[error("Signature update failed")]
UpdateSignatureError(String),
#[error("Invalid Proof of Knowledge of a Signature")]
InvalidProofOfKnowledgeSignature,
#[error("Proof of Knowledge of a Signature verification failed")]
PoKSVerificationError(String),
#[error("This should NOT happen!")]
UnespectedError,
#[error("Invalid commitment")]
InvalidCommitment,
#[error("Invalid commitment proof")]
InvalidCommitmentProof,
#[error("Failed to compute the blind challenge")]
ChallengeComputationFailed,
#[error("Invalid number of Generators")]
InvalidNumberOfGenerators,
#[error("Error during serialization of the pseudonym")]
InvalidPseudonym,
}