Double and inverse double over `GF(2^n)` with the lexicographically first polynomial among the irreducible degree `n` polynomials having a minimum number of coefficients. This trait is implemented using big-endian byte order for 64, 128 and 256 bit block sizes.
| 23 | /// |
| 24 | /// This trait is implemented using big-endian byte order for 64, 128 and 256 bit block sizes. |
| 25 | pub trait Dbl: sealed::Sealed { |
| 26 | /// Double block. (alternatively: multiply block by x) |
| 27 | /// |
| 28 | /// If most significant bit of the block equals to zero will return |
| 29 | /// `block<<1`, otherwise `(block<<1)^C`, where `C` is the non-leading |
| 30 | /// coefficients of the lexicographically first irreducible degree-b binary |
| 31 | /// polynomial with the minimal number of ones. |
| 32 | #[must_use] |
| 33 | fn dbl(self) -> Self; |
| 34 | |
| 35 | /// Reverse double block. (alternatively: divide block by x) |
| 36 | /// |
| 37 | /// If least significant bit of the block equals to zero will return |
| 38 | /// `block>>1`, otherwise `(block>>1)^(1<<n)^(C>>1)` |
| 39 | #[must_use] |
| 40 | fn inv_dbl(self) -> Self; |
| 41 | } |
| 42 | |
| 43 | impl Dbl for Array<u8, U8> { |
| 44 | #[inline] |
nothing calls this directly
no outgoing calls
no test coverage detected