S32K CSEC MAC Generation

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

S32K CSEC MAC Generation

1,411 次查看
wanglijun
Contributor II

Hello,

I have a question about the CSEC MAC generation: Is the result same for copy method and pointer method?

Thank you!

标记 (1)
0 项奖励
回复
3 回复数

1,401 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

yes, you should get the same result.

Regards,

Lukas

0 项奖励
回复

1,396 次查看
wanglijun
Contributor II

Hello Lukas,

The following 2 picture is for the copy method and pointer method:

(1) Copy method:

wanglijun_0-1636504102195.png

(2) Pointer method

wanglijun_1-1636504142345.png

I found the MAC generation is different. Can you help check the reson? Is it becasue little endian or big endian?

Thank you!

 

Best Regards,

Wang Lijun

0 项奖励
回复

1,386 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Wang,

there's only one corner case when CSEC_DRV_GenerateMAC doesn't work as expected - when the size is a multiple of 256KB. This limitation will be published in next errata release.

But if you use size different from n*256KB, it works as expected.

CSEC_DRV_GenerateMACAddrMode does not have this limitation.

I tested it in the past and I got the same results when calling:

error_code = CSEC_DRV_GenerateMACAddrMode(CSEC_RAM_KEY, 0x50000, size, cmacAddrMode);
error_code = CSEC_DRV_GenerateMAC(CSEC_RAM_KEY, 0x50000, size, cmac, 1000);

Regards,

Lukas

0 项奖励
回复