Hi Damien,
On 5/10/19 7:34 PM, Damon H. (TheDcoder) wrote:
> Hello Steffen,
>
> Thank you for the reply, I have now understand how the sprng functions
> work. Still I am not really sure about the distinction between rng and
> sprng since the latter just seems to be wrapping the former? But I am
> sure I'll figure out some day in the future as I continue working with
> LibTomCrypt :)
you're welcome.
The sprng reads from your OS provider of random data which ensures that
it's always returning random data.
All the other prng's in the library are simply "an implementation of the
specific prng" which means that after initialization they have a
pre-defined state and are not random at all, but they can be seeded with
real random data so their output will also be random.
You should probably read it up on wikipedia [2] and the PRNG Chapter 9
of the libtomcrypt developer manual [3].
> P.S I made a mistake and hit the wrong "Reply" button and my original
> reply was directly sent to Steffen. I apologize for the mistake, I am
> not familiar with mailing lists and even less familiar with choosing the
> right "Reply" option as I almost never reply to group emails.
no worries :-)
Cheers,
Steffen
[1]
https://github.com/libtom/libtomcrypt/blob/develop/src/prngs/rng_get_bytes.c
[2]
https://en.wikipedia.org/wiki/Pseudorandom_number_generator
[3]
https://github.com/libtom/libtomcrypt/releases/download/v1.18.2/crypt-1.18.2.pdf