umbral_rs/internal/
errors.rs1use quick_error::quick_error;
2
3quick_error! {
4 #[derive(Debug,PartialEq)]
5 pub enum PreErrors {
6 GenericError {
7 display("Generic error")
8 }
9 CiphertextError {
10 display("Cipertext error")
11 }
12 EncryptionError {
13 display("Encryption error")
14 }
15 DecryptionError {
16 display("Decryption error (wrong key or corrupted ciphertext)")
17 }
18 DerivationError {
19 display("Key Derivation error")
20 }
21 InvalidProvidedKeys {
22 display("The provided key(s) is(are) not valid")
23 }
24 InvalidKFragThreshold {
25 display("The threshold in input is not valid")
26 }
27 KeysParametersNotEq {
28 display("Keys parameters are not the same")
29 }
30 InvalidCFrag {
31 display("The cfrag given in input is not valid")
32 }
33 CFragNoProofProvided {
34 display("The cfrag given in input has no proof")
35 }
36 CapsuleNoCorrectnessProvided {
37 display("The capsule given in input has no complete correctness key set")
38 }
39 InvalidKFrag {
40 display("The input parameters are not valid")
41 }
42 InvalidCapsule {
43 display("The capsule is not valid")
44 }
45 InvalidBytes {
46 display("The bytes given in input are not valid")
47 }
48 }
49}