Hello,
I would like to generate True Random Number on S32K148.
In Reference Manual is written " Additionally a TRNG and Miyaguchi-Prenell compression sub-blocks enables true random number generation (entropy generator for PRNG in AES sub-block). "
So if these sub-blocks enables "entropy generator" so they should be able to generate entropy, right?
So if I need to generate True Random Number so I have to enhance actual PRNG seed by calling of "Csec_Ip_ExtendSeed(const uint8* pEntropy);"
The question is, where can I get the entropy source?
I have found this thread (In the S32K family, how many bits of entropy are i... - NXP Community), but the entropy source was not answered there.
Is there any document describing TRNG or any example code for this topic?
Thank you for any hints !
Vojtech
I'm using S32K116 and I have a concern regarding RNG.
I know that PRNG requires a seed with a certain entropy value.
If the seed is generated internally with TRNG, is it not necessary to input a separate seed when using the CMD_RND command?
Hi @Vojtech
it's not possible to get the true random number directly. It's internal feature not available to user. User can get only pseudo random number using CMD_RND command.
Regards,
Lukas
Hello Lukas,
thanks for quick answer, actually I am still little bit confused from this topic.
In Reference Manual is written that there is TRNG:
So there is TRNG, but it cant be used? So what for is intended TRNG_RND command (but I could not find it in the CSEC API)
Is there any way how to get True Random Number from S32K148 from CSEc ? Can function Csec_Ip_ExtendSeed(const uint8* pEntropy) helps here?
Or it will be always only pseudo number at the end?
Thank you
As I said, user can't get the true random number.
The TRNG is used only internally to generate seed for PRNG. This implementation is required by SHE specification.
Regards,
Lukas