CSM and Crypto conflict

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

CSM and Crypto conflict

648 Views
Kanaqw
Contributor III

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?

0 Kudos
3 Replies

629 Views
namnguyenviet
NXP Employee
NXP Employee

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

0 Kudos

641 Views
Kanaqw
Contributor III

S32K146

0 Kudos

642 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Kanaqw,

What device do you use?

 

 

0 Kudos