| 1 | /// MAC verification failed - The tag doesn't verify for the given ciphertext and secret key |
| 2 | pub const AuthenticationError = error{AuthenticationFailed}; |
| 3 | |
| 4 | /// The requested output length is too long for the chosen algorithm |
| 5 | pub const OutputTooLongError = error{OutputTooLong}; |
| 6 | |
| 7 | /// Finite field operation returned the identity element |
| 8 | pub const IdentityElementError = error{IdentityElement}; |
| 9 | |
| 10 | /// Encoded input cannot be decoded |
| 11 | pub const EncodingError = error{InvalidEncoding}; |
| 12 | |
| 13 | /// The signature doesn't verify for the given message and public key |
| 14 | pub const SignatureVerificationError = error{SignatureVerificationFailed}; |
| 15 | |
| 16 | /// Both a public and secret key have been provided, but they are incompatible |
| 17 | pub const KeyMismatchError = error{KeyMismatch}; |
| 18 | |
| 19 | /// Encoded input is not in canonical form |
| 20 | pub const NonCanonicalError = error{NonCanonical}; |
| 21 | |
| 22 | /// Square root has no solutions |
| 23 | pub const NotSquareError = error{NotSquare}; |
| 24 | |
| 25 | /// Verification string doesn't match the provided password and parameters |
| 26 | pub const PasswordVerificationError = error{PasswordVerificationFailed}; |
| 27 | |
| 28 | /// Parameters would be insecure to use |
| 29 | pub const WeakParametersError = error{WeakParameters}; |
| 30 | |
| 31 | /// Public key would be insecure to use |
| 32 | pub const WeakPublicKeyError = error{WeakPublicKey}; |
| 33 | |
| 34 | /// Point is not in the prime order group |
| 35 | pub const UnexpectedSubgroupError = error{UnexpectedSubgroup}; |
| 36 | |
| 37 | /// Context string is too long |
| 38 | pub const ContextTooLongError = error{ContextTooLong}; |
| 39 | |
| 40 | /// Any error related to cryptography operations |
| 41 | pub const Error = AuthenticationError || OutputTooLongError || IdentityElementError || EncodingError || SignatureVerificationError || KeyMismatchError || NonCanonicalError || NotSquareError || PasswordVerificationError || WeakParametersError || WeakPublicKeyError || UnexpectedSubgroupError || ContextTooLongError; |