pub fn validate_modulus(modulus: &BigInt) -> Result<(), MathError>Expand description
Validate that a BigInt is a valid modulus for modular operations.
§Arguments
modulus- The modulus to validate
§Returns
Returns Ok(()) if the modulus is valid, or an error otherwise.
§Errors
Returns MathError::InvalidModulus if the modulus is zero or negative.