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