Skip to main content

byte_encode

Function byte_encode 

Source
pub fn byte_encode<const d: usize, const PACK_LEN: usize>(
    F: &Polynomial,
) -> [u8; PACK_LEN]
Expand description

Algorithm 5 ByteEncode_d(𝐹) Encodes an array of 𝑑-bit integers into a byte array for 1 ≤ 𝑑 ≤ 12. Input: integer array 𝐹 ∈ ℤ_M^256, where 𝑚 = 2^𝑑 if 𝑑 < 12, and 𝑚 = 𝑞 if 𝑑 = 12. Output: byte array 𝐵 ∈ 𝔹32𝑑. Note: this is exposed publicly only for testing purposes and there is no good reason to use it in production code.