Loading and configuring the PRNG device driver

Ubuntu 22.04 LTS LPAR mode z/VM guest KVM guest

In Ubuntu Server 22.04 LTS the device driver is compiled as a module and is normally loaded automatically. If needed, you can load it manually with modprobe prng.

Figure 1. Module parameter syntax

1  modprobe prng
1? mode=
2.1 1
2.1 2
1! mode=0
1? chunksize=<sizeparam>
1! chunksize=256
1? reseed_limit=<reseedparam>
1! reseed_limit=100000
where:
mode=
specifies the mode in which the device driver runs:
0
Default. In this mode, the device driver automatically detects the MSA extension level and feature enablement. The device driver runs in SHA512 mode if the requirements are fulfilled, otherwise it falls back to TDES mode.
1
forces the device driver to run in TDES mode. The device driver starts only if the requirements for TDES mode are fulfilled.
2
forces the device driver to run in SHA512 mode. The device driver starts only if the requirements for SHA512 mode are fulfilled. The device driver does not fall back to TDES mode.
<sizeparam>
adjusts the random-buffer block size that the device driver uses to generate new random bytes. In TDES mode, this value can be in the range 8 - 65536, for SHA512 mode, the rangespieg is 64 - 65536. The default is 256 bytes.
<reseedparam>
adjusts the reseed limit in SHA512 mode. Multiply this value with the chunksize to obtain the reseed boundary in bytes. The value can be in the range 10000 - 100000. The default is 100000. In TDES mode, the reseed limit is a constant value of 4096 bytes.

The defaults were chosen for good results with most workloads. Changing these settings might degrade cryptographic performance.