binary_polynomial_mod_algebra 0.0.3

Basic algebra on univariate binary polynomial
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! # Error module

/// Error type for binary polynomial operations
#[derive(thiserror::Error, Debug, PartialEq, Eq, Copy, Clone)]
pub enum BinaryPolynomialError {
    /// Error when the degree of the polynomial is greater than the modulus on polynomial modular multiplication
    #[error("Multiplier degree cannot be greater or equal to modulus")]
    MultiplierDegreeGreaterOrEqualToModulusError,
    /// Error when the given polynomial is not square free, ie it can be expressed as A\*A\*B, with A, B polynomials
    #[error("The polynomial is not square free")]
    NotSquareFreePolynomialError,
    /// Error when parsing polynomial from string
    #[error("The string cannot be parsed as a polynomial")]
    ParsingPolynomialError,
}