Skip to main content

w1_encode

Function w1_encode 

Source
pub fn w1_encode<P: Params>(w1: &[[i32; 256]]) -> Vec<u8> 
Expand description

Encode the high-order bits vector w1 as bytes.

Implements Algorithm 28 of FIPS 204 (w1Encode). The w1 coefficients lie in [0, (q-1)/(2*gamma2) - 1] and are packed using simple_bit_pack. The encoded output is hashed together with the message digest to form the commitment hash c_tilde during signing and verification.

  • w1: vector of k polynomials (high bits from Decompose).

Returns the packed byte representation of w1.