S32K CSEC MAC Generation

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

S32K CSEC MAC Generation

1,308 Views
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!

Tags (1)
0 Kudos
Reply
3 Replies

1,298 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

yes, you should get the same result.

Regards,

Lukas

0 Kudos
Reply

1,293 Views
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 Kudos
Reply

1,283 Views
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 Kudos
Reply