cancel
Showing results for 
Search instead for 
Did you mean: 

Is psa_generate_random() equivalent to HAL_RNG_GenerateRandomNumber()?

Thatseasy
Associate III

STM32H573 with Secure Manager provisioned, the non-secure app cannot access the RNG anymore.  Will it be ok to use Secure Manager API psa_generate_random() to replace HAL_RNG_GenerateRandomNumber()? 

1 ACCEPTED SOLUTION

Accepted Solutions
STea
ST Employee

Hello @Thatseasy ,

yes, you can use psa_generate_random() which calls  mbedtls_psa_external_get_random(). this will result in a call from secure to the low_level_rng defined function RNG_GetBytes();

which is calling HAL_RNG_GenerateRandomNumber()

Regards
In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
STea
ST Employee

Hello @Thatseasy ,

yes, you can use psa_generate_random() which calls  mbedtls_psa_external_get_random(). this will result in a call from secure to the low_level_rng defined function RNG_GetBytes();

which is calling HAL_RNG_GenerateRandomNumber()

Regards
In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.