Skip to main content

bit_unpack

Function bit_unpack 

Source
pub fn bit_unpack(data: &[u8], a: u32, b: u32, w: &mut [i32; 256])
Expand description

Unpack a polynomial whose coefficients lie in [-a, b].

Implements Algorithm 19 of FIPS 204 (BitUnpack). Inverse of bit_pack.

  • data: packed byte data.
  • a: magnitude of the negative bound.
  • b: positive bound.
  • w: output polynomial (filled with decoded coefficients in [-a, b]).