genode/repos/pc/lib/mk
Martin Stein ab0bce77ec lx_emul & wireguard & wifi: centralized random.cc
Both the Wifi driver and the WireGuard port used local implementations for
their source of randomness. Wifi used a Xoroshiro128+ PRNG for rapid generation
of random values but initialized this PRNG always with the same static seed
value. WireGuard, in contrast, requested each random byte directly from the
jitterentropy lib, which is considered to be very time intensive.

This commit removes the local variants of random.cc and introduces a new
centralized lx_emul/random.cc . The new variant combines the former approaches,
so, that jitterentropy is accessed only in order to generate a random seed for
a Xoroshiro128+ PRNG. Front-end requests for random values are then fulfilled
efficiently via the PRNG.

:Warning:

The output of the Xoroshiro128+ PRNG that is used in the new implementation of
the lx_emul randomness functions has known statistical problems (see
https://en.wikipedia.org/wiki/Xoroshiro128%2B#Statistical_Quality).
Furthermore, the integration of Xoroshir128+ with the lx_emul code was not
reviewed/audited for its security-related properties, so far, and has the
known deficiency of seeding the PRNG only once during initialization. Thus,
we strongly advise against the use of the lx_emul randomness functions for
security-critical purposes.

Ref #4397
2022-05-25 12:23:03 +02:00
..
spec pc: update wifi driver 2022-04-13 09:29:04 +02:00
pc_linux_generated.inc build: ensure rules with pipes might fail 2022-03-21 13:43:13 +01:00
pc_lx_emul.mk pc: consoldiate LX emul of current drivers 2022-05-25 12:19:33 +02:00
vfs_wifi.mk pc: update wifi driver 2022-04-13 09:29:04 +02:00
wifi_firmware.mk pc: update wifi driver 2022-04-13 09:29:04 +02:00
wifi.inc lx_emul & wireguard & wifi: centralized random.cc 2022-05-25 12:23:03 +02:00