Non-physical true random number generator explained

Non-physical true random number generator (NPTRNG), also known as non-physical nondeterministic random bit generator is a true random number generator that does not have access to dedicated hardware entropy source. NPTRNG uses a non-physical noise source that obtains entropy from system data, like outputs of application programming interface functions, residual information in the random access memory, system time or human input (e.g., mouse movements and keystrokes). A typical NPTRNG is implemented as software running on a computer. The NPTRNGs are frequently found in the kernels of the popular operating systems that are expected to run on any generic CPU (for example /dev/random in Linux).

Reliability

An NPTRNG is inherently less trustworthy that its physical random number generator counterpart, as the non-physical noise sources require specific conditions to work, thus the entropy estimates require major assumptions about the external environment and skills of an attacker.

Typical attacks include:

A more sophisticated attack in 2007 breached the forward secrecy of the NPTRNG in Windows 2000 by exploiting few implementation flaws.

Implementations

The design of an NPTRNG is traditional for TRNGs: a noise source is followed by a postprocessing randomness extractor and, optionally, with a pseudorandom number generator (PRNG) seeded by the true random bits. For example, in Linux, the /dev/random does not use the PRNG (and thus can block when it needs to collect more entropy), while /dev/urandom includes one (and therefore can always provide more bits and is non-blocking).

As of 2014, the Linux NPTRNG implementation extracted the entropy from:

At the time, testing in virtualized environments had shown that there existed a boot-time "entropy hole" (reset vulnerability) when the early (u)random outputs were catastrophically non-random, but in general the system provided enough uncertainty to thwart an attacker.

Sources