I am using the KW41Z with the 802.15.4 library and NXP framework. I am finding multiple random number generation functions in the provided code but I have not seen documentation or comments that describe the differences.
In SecLib, there is SecLib_get_random() which returns a 32 bit number.
uint32_t SecLib_get_random(void)
In RNG framework there are three functions:
RNG_HwGetRandomNo: uses TRNG_GetRandomData, which is hardware
RNG_GetRandomNo: uses SecLib_get_random
RNG_GetPseudoRandomNo: pseudo random number generation
What is the difference between SecLib_get_random and RNG_HwGetRandomNo? Does SecLib_get_random use hardware or is it is secure pseudo number generator?
Hello,
TRNG
True Random Number Generator. See Chapter 43 from RM and TRNG_GetRandomData() from fsl_trng.c
RNG
Software-based secure pseudo number generator that uses the seed from the TRNG (See RNG_Init ).
Regards,
Estephania