mlkem.auxiliary
mlkem.auxiliary.crypto
mlkem.auxiliary.general
- mlkem.auxiliary.general.bits_to_bytes(bits: list[int]) list[int]
Converts a bit array (of a length that is a multiple of 8) into an array of bytes.
Bytes are represented as unsigned numbers in the range [0, 255]. Bits are either 0 or 1.
- Args:
- bits (
list[int]): The bit array (of a length that is a multiple of 8). - Returns:
list[int]: The array of bytes equivalent to the bit array.
- mlkem.auxiliary.general.bytes_to_bits(byts: list[int]) list[int]
Converts a byte array into an array of bits.
Bytes are represented as unsigned numbers in the range [0, 255]. Bits are either 0 or 1.
- Args:
- byts (
list[int]): The byte array. - Returns:
list[int]: The array of bits equivalent to the byte array.