Skip to main content

Dbl

Trait Dbl 

Source
pub trait Dbl: Sealed {
    // Required methods
    fn dbl(self) -> Self;
    fn inv_dbl(self) -> Self;
}
Expand description

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.

Required Methods§

Source

fn dbl(self) -> Self

Double block. (alternatively: multiply block by x)

If most significant bit of the block equals to zero will return block<<1, otherwise (block<<1)^C, where C is the non-leading coefficients of the lexicographically first irreducible degree-b binary polynomial with the minimal number of ones.

Source

fn inv_dbl(self) -> Self

Reverse double block. (alternatively: divide block by x)

If least significant bit of the block equals to zero will return block>>1, otherwise (block>>1)^(1<<n)^(C>>1)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Dbl for Array<u8, U8>

Source§

fn dbl(self) -> Self

Source§

fn inv_dbl(self) -> Self

Source§

impl Dbl for Array<u8, U16>

Source§

fn dbl(self) -> Self

Source§

fn inv_dbl(self) -> Self

Source§

impl Dbl for Array<u8, U32>

Source§

fn dbl(self) -> Self

Source§

fn inv_dbl(self) -> Self

Implementors§