csec CMAC check

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

csec CMAC check

1,393 Views
lyz
Contributor II

I caculate MAC in CSEc mocule by CSEC_DRV_GenerateMACAddrMode function as follows, 

lyz_0-1661139420064.png

but it compare with the value that caculated by mbedtls Algorithm library as follows,

lyz_1-1661139760113.png

the result is diffent, check failed.

we can caculate the mac by other methods? and, we need add 128 bits datas? like this, as follow 

lyz_2-1661140354520.png

and checkking it caculated by CSEC_DRV_GenerateMACAddrMode.

 

Tags (1)
0 Kudos
Reply
5 Replies

1,383 Views
JRoberto
NXP TechSupport
NXP TechSupport

Hello @lyz 

Could you provide me the information below from your development environment please?
IDE / Version:
Specific Target:
SDK / RTD Version:

Best Regards!

0 Kudos
Reply

1,380 Views
lyz
Contributor II

the problem had been solved, the result is same as.

thanks!

0 Kudos
Reply

1,242 Views
Keane
Contributor I

楼主你好,

最近也在使用CSEc模块,在生成和校验MAC的时候发现有字节长度限制,数据长点就会生成和校验失败,完全达不到帖子里的16K大小。能请教下这个长度限制的问题怎么解决的吗?

盼复。

0 Kudos
Reply

1,151 Views
lyz
Contributor II

使用这两个接口计算,

lyz_0-1667981543871.png

一个是4字节4字节取的数据,一个是一字节一字节取的数据。保证字节序一致,两个算出来的MAC值是一样的

0 Kudos
Reply

1,141 Views
Keane
Contributor I

问题已经在早些时候解决了,感谢楼主的回复!

0 Kudos
Reply