I have a problem when executing Csm_RandomGenerate and passing resultPtr parameter as local to a main function variable, as long as it goes to func Crypto_Cse_InitRng() it changes resultPtr to OutputPtr from configuration and writes random number there, but I dont get to return anything, only somehow access this variable from config later. Is it somekind of bug or am I doing something wrong?
Hello @Kanaqw,
From our Crypto driver, Crypto_Cse_InitRng() function just initializes the seed, and Crypto_Cse_GenerateRnd() is the function which generates the random vector. In Crypto layer, these functions shall be called by Crypto_ProcessJob(), with the job service as CRYPTO_RANDOMGENERATE.
As a result, Csm_RandomGenerate() shall call Crypto_ProcessJob(), pass the job service as CRYPTO_RANDOMGENERATE, in order to call Crypto_Cse_GenerateRnd(). You can check the similar behavior in your stack, if Crypto_Cse_GenerateRnd(rndPtr) can be called and rndPtr has some values, then there must be some issues with Csm or the configuration, however we don't have any information of the Csm since we don't provide it.
Best Regards,
Nam
S32K146