This section describes so called "real random sources". It is an extension to the library mechanism of random source objects that uses the devices /dev/random
and /dev/urandom
available on Linux
systems (and maybe on other operating systems) providing random numbers that are impossible to predict. The idea is that such sources of random numbers are useful to produce unpredictable secret keys for cryptographic applications.
‣ RandomSource ( r, dev ) | ( method ) |
Returns: a real random source object or fail
The first argument r must be the GAP filter IsRealRandomSource
and the second either the string random
or the string urandom
. A real random source object is created that draws its random numbers from the kernel devices /dev/random
and /dev/urandom
respectively. Whereas /dev/urandom
always provides random numbers of not guaranteed "quality", the device /dev/random
measures its entropy and produces guaranteed unpredictable numbers. However, it might block until enough "random" events (like mouse movements) have been accumulated.
generated by GAPDoc2HTML