Expand description
Error types for clock-bigint operations.
This module defines the error types used throughout the clock-bigint library.
All errors implement std::error::Error when the std feature is enabled.
§Error Handling Philosophy
The library follows these principles for error handling:
- Constant-time: Error conditions should not leak timing information
- Minimal: Only essential error types to avoid API surface complexity
- Informative: Error messages provide actionable information
- Non-exhaustive: New error variants may be added in future versions
§Common Error Scenarios
- Overflow: Operations that would exceed the BigInt’s maximum limb capacity
- InvalidEncoding: Malformed binary encodings or non-canonical representations
- DivisionByZero: Division or modulo operations with a zero divisor
- InvalidModulus: Montgomery arithmetic with unsupported modulus values
Enums§
- BigInt
Error - Errors that can occur during BigInt operations.
Type Aliases§
- Result
- Result type alias for BigInt operations.