mithril_common/crypto_helper/cardano/kes/
error.rs1use thiserror::Error;
2
3use crate::crypto_helper::{KesEvolutions, KesPeriod};
4
5#[derive(Error, Debug)]
7pub enum KesVerifyError {
8 #[error("invalid operational certificate")]
10 OpCertInvalid,
11
12 #[error("KES signature verification error: KesEvolutions={0}, StartKesPeriod={1}")]
14 SignatureInvalid(KesEvolutions, KesPeriod),
15
16 #[error("invalid KES evolutions")]
18 InvalidKesEvolutions(KesEvolutions),
19}
20
21#[derive(Error, Debug, PartialEq, Eq)]
23pub enum KesSignError {
24 #[error("KES key cannot be updated for evolution {0}")]
26 UpdateKey(KesEvolutions),
27
28 #[error("Period of key file {0} does not match with period provided by user {1}")]
30 PeriodMismatch(KesPeriod, KesPeriod),
31}