pub enum MathError {
Show 16 variants
InvalidBytes,
InvalidInput,
DivisionByZero,
Overflow,
Underflow,
InvalidFieldElement,
InvalidScalar,
InvalidExponent,
InvalidModulus,
InvalidEncoding,
BufferTooSmall,
BufferTooLarge,
PointNotOnCurve,
InvalidPoint,
InvalidMontgomeryForm,
NotImplemented,
}Expand description
Errors that can occur in mathematical operations.
Variants§
InvalidBytes
Invalid byte representation (out of valid range)
InvalidInput
General invalid input
DivisionByZero
Attempted division by zero
Overflow
Arithmetic overflow
Underflow
Arithmetic underflow
InvalidFieldElement
Invalid field element (not in [0, p))
InvalidScalar
Invalid scalar (not in [0, l))
InvalidExponent
Invalid exponent for modular exponentiation
InvalidModulus
Invalid modulus for modular operations
InvalidEncoding
Invalid encoding format
BufferTooSmall
Buffer too small for operation
BufferTooLarge
Buffer too large for operation
PointNotOnCurve
Point not on elliptic curve (for future EC operations)
InvalidPoint
Invalid extended point coordinates (T ≠ X·Y·Z⁻¹)
InvalidMontgomeryForm
Invalid Montgomery form representation
NotImplemented
Operation not yet implemented
Trait Implementations§
impl Eq for MathError
impl StructuralPartialEq for MathError
Auto Trait Implementations§
impl Freeze for MathError
impl RefUnwindSafe for MathError
impl Send for MathError
impl Sync for MathError
impl Unpin for MathError
impl UnwindSafe for MathError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more