kyber_py.drbg package

Submodules

kyber_py.drbg.aes256_ctr_drbg module

class kyber_py.drbg.aes256_ctr_drbg.AES256_CTR_DRBG(seed: bytes | None = None, personalization: bytes = b'')

Bases: object

random_bytes(num_bytes: int, additional: bytes | None = None) bytes

Generate pseudorandom bytes without a generating function

Section 10.2.1.5.1, Page 56 (CTR_DRBG_Generate_algorithm)

Parameters:
  • num_bytes (int) – the number of random bytes requested

  • additional (bytes) – optional bytes to be mixed into the generation

Returns:

pseudorandom bytes extracted from the DRBG of length num_bytes.

Return type:

bytes

Module contents