S32K CSEC MAC Generation

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

S32K CSEC MAC Generation

1,343件の閲覧回数
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,333件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

yes, you should get the same result.

Regards,

Lukas

0 件の賞賛
返信

1,328件の閲覧回数
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,318件の閲覧回数
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 件の賞賛
返信