S32K312 Crypto

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K312 Crypto

2,323件の閲覧回数
Cppppy
Contributor II

Hello

My current project requires the use of the Crypto driver for the S32K312. The problem I am currently encountering is that the CMAC_Generate and CMAC_Verify functions work fine with the Crypto Demo provided by NXP in the same MCAL configuration.

But when I call these two functions with my own program, the Crypto_Hse_TranslateHseResponse function returns E_NOT_OK. I have done the memory handling of the data with reference to the demo project, for example
#define CRYPTO_START_SEC_VAR_INIT_8_NO_CACHEABLE
#define CRYPTO_STOP_SEC_VAR_INIT_8_NO_CACHEABLE.
I have checked that the values of the parameters passed are the same.

What should I do to solve this problem?

Cppppy_0-1685613768034.png

 

タグ(1)
0 件の賞賛
返信
13 返答(返信)

2,296件の閲覧回数
nxf78987
NXP Employee
NXP Employee

Hello @Cppppy,

Could you show me the line of code in the Hse_Ip_ServiceRequest() that occurred this error?

Best regards,

Dan

0 件の賞賛
返信

2,197件の閲覧回数
Faker
Contributor II

Hi,I also meet this problem. 

/* Send the request to HSE driver */
HseResponse = Hse_Ip_ServiceRequest(u8MuInstance, u8MuChannel, pHseIpReq, pHseSrvDescriptor);
/* Translate the message received from HSE to a Std_ReturnType value */
RetVal = Crypto_Hse_TranslateHseResponse(HseResponse);

RetVal is CRYPTO_RET_OPERATION_TIMEOUT.

0 件の賞賛
返信

2,175件の閲覧回数
nxf78987
NXP Employee
NXP Employee

Hello @Faker,

You can refer to the attached example to fix your issue.

Best regards,

Dan

タグ(1)
0 件の賞賛
返信

2,166件の閲覧回数
Faker
Contributor II

Yes, I refer to S32DS for S32 platform's Crypto demo. This question is in link(S32K324 Crypto returns CRYPTO_RET_OPERATION_TIMEOU... - NXP Community). When I debug App_Aes128EncryptDecryptExample in s32k324 board, it returns timeout error.

In the beginning of main(), it don't need to init clock or mcu(Mcal) module?

Faker_0-1691481465354.png

 

0 件の賞賛
返信

2,152件の閲覧回数
nxf78987
NXP Employee
NXP Employee

Hello @Faker,

Yes, because FIRC was initialized by the HSE core when POR.

Did you use correctly the chip's name (E5) with HSE FW release?

Best regards,

Dan

0 件の賞賛
返信

2,142件の閲覧回数
Faker
Contributor II

It means if  custom board don't have external E5 chip,  I  can use software encryption library to replace it?

0 件の賞賛
返信

2,146件の閲覧回数
Faker
Contributor II

S32k324 needs external E5 chip to complete the function of security? There isn't E5 chip in my board.

I always think this module is just in mcu like some peripherals.

0 件の賞賛
返信

2,121件の閲覧回数
nxf78987
NXP Employee
NXP Employee

Hello @Faker,

In the HSE FW Reference noted that the HSE FW release was developed and tested using chip E5.

So, you can run HSE examples normally on this chip.

Best regards,

Dan

0 件の賞賛
返信

2,099件の閲覧回数
Faker
Contributor II

Hi:

 I don't kwon what the E5 chip is . Do you have any other information?

In chapter 31 boot overview of S32K3XXRM.pdf, there is a table that shows some content about HSE FW. 

Following this picture, K3 chip don't program HSE firmware by fault,so the crypto's function can't work?

Faker_0-1691571327953.png

 

Do you have some demos of generating random? Could I have a copy. Thank you.

 

 

0 件の賞賛
返信

2,086件の閲覧回数
nxf78987
NXP Employee
NXP Employee

Hi @Faker,

1. If your chip has "E5" on the surface, then it is an E5 chip.

2. Following this picture, K3 chip don't program HSE firmware by fault,so the crypto's function can't work? => That's correct.

3. Please use the chip correctly with the HSE FW version.

nxf78987_0-1691573990723.png

4.Do you have some demos of generating random?

=> Please refer to the Crypto example in the S32K3 package.

Best regards,

Dan

0 件の賞賛
返信

2,064件の閲覧回数
Faker
Contributor II

1691630663539.png

This's a chip(S32K324HMS) on my board. Don't have the prefix of "E5" . Does that mean I can't use encryption.

0 件の賞賛
返信

1,973件の閲覧回数
nxf78987
NXP Employee
NXP Employee

Hi @Faker,

Unfortunately, the S32K3 package was only tested on the S32K344, S32K312, and S32K342, and don't test with S32K324 because we don't have this derivative.

Hence, I can't ensure whether or not S32K324 can successfully load HSE FW.

From my point of view, you should try to install HSE FW and check whether the Crypto example can run successfully or not. If the result fails, this indicates that your chip can't load the HSE FW present.

Best regards,

Dan

0 件の賞賛
返信

1,929件の閲覧回数
Faker
Contributor II

OK.Thank you very much.

I will try it after agent hsa given me the file of s32k3x4_hse_fw_0.5.0_1.1.0_pb211004.bin.pink .