True Random Number Generator (TRNG): Entropy source

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

True Random Number Generator (TRNG): Entropy source

3,304 Views
Vojtech
Contributor II

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

 

0 Kudos
Reply
5 Replies

1,832 Views
Derek_Yoon
Contributor I

@lukaszadrapa  

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?

0 Kudos
Reply

3,238 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply

3,208 Views
Vojtech
Contributor II

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:

Vojtech_0-1694670892627.png

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)

Vojtech_1-1694671842279.png

 

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

 

 

 

 

0 Kudos
Reply

3,200 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply

3,195 Views
Vojtech
Contributor II

OK, got it, so only pseudo random number is possible. 

Thank you

Vojtech

0 Kudos
Reply