Built: about 4 years ago
Size: 26.8 KB
Home page: https://github.com/danaj/Crypt-Random-TESHA2
Summary: Random numbers using timer/schedule entropy, aka userspace voodoo entropy
Generate random numbers using entropy gathered from timer / scheduler jitter..
This can be used to generate non-pseudorandom data to seed a PRNG (e.g.
`srand'/`rand', the Math::Random::MT manpage, etc.) or CSPRNG (e.g. AES-CTR or
the Math::Random::ISAAC manpage). You may use it directly or as part of a random
source module that first checks for O/S randomness sources.
Only Perl CORE modules are used, making this very portable. However, systems
must have a high resolution timer and support `usleep' from the Time::HiRes manpage.
At installation time, measurements are taken of the estimated entropy gathered
by the timer differences. If the results indicated we could not get good
results, then the module will consider itself "weak". On the first use of
any of the functions that return randomness (e.g. random_bytes), the module
will carp about not being a strong randomness source. However, two special
options, ":strong" and ":weak" may be given to the importer to change this
behavior. If ":strong" is used, then the module will croak. If ":weak" is
used, then no carp will be generated. The function `is_strong' can be used
at any time for finer control. Note that this should be an unusual case, and
neither flag has any effect if the module considers itself strong.
List of contributors:
- moved to Sisyphus for Slic3r (by dd@ request)
- initial import by package builder