Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ 6 Forum Discussions

NovoNate
Level 2
25 sign-ins 5 replies posted First solution authored
Level 2

Hello,

For the project that we are working on we are using the TRNG inside the CY8C6347 to generate some values (AES initialization vectors for example) on a somewhat regular basis and want to make sure that the numbers that are generated are valid.

In reading the TRM it describes two "health monitor" capabilities that are built into the hardware, however looking at the PDL implementation it does not appear that this functionality is being enabled. Is there a reason for not having this enabled? If we were to implement our own code based on `Cy_Crypto_Core_V1_Trng()` are there any suggested starting points for the counters and window size to use for the health checks?

Also on a related note the PDL is enabling/disabling the TRNG for each operation. I'm guessing this is to help reduce power consumption as the TRM indicates that the ring buffers that make up TRNG "consume a significant amount of power" but there is no value in the datasheet indicating how much power the TRNG consumes. Is there a nominal power consumption value that we can use to determine if it is better for us to be enabling/disabling the TRNG for each 32-bit value or if it would be better to generate multiple 32-byte values in succession without disabling the TRNG after each one.

 

Thanks,

Nate

0 Likes
2 Replies
LeoMathews
Moderator
Moderator 25 replies posted 25 sign-ins 5 solutions authored
Moderator

Hi @NovoNate 

Can you please specify  where the API Cy_Crypto_Core_V1_Trng() was referred from? Please try using the API Cy_Crypto_Core_Trng() for the same.

Thanks and Regards,
Leo

0 Likes
NovoNate
Level 2
25 sign-ins 5 replies posted First solution authored
Level 2

Hi @LeoMathews,

Cy_Crypto_Core_V1_Trng() is the function that Cy_Crypto_Core_Trng() calls for the PSoC 63 device. That function is defined at https://github.com/Infineon/psoc6pdl/blob/master/drivers/source/cy_crypto_core_trng_v1.c#L104 and analyzing what it does for initializing the TRNG that is where i concluded that the health monitor functionality is not getting enabled.

0 Likes