csec CMAC check

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

csec CMAC check

3,080 次查看
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.

 

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

3,070 次查看
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 项奖励
回复

3,067 次查看
lyz
Contributor II

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

thanks!

0 项奖励
回复

2,929 次查看
Keane
Contributor I

楼主你好,

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

盼复。

0 项奖励
回复

2,838 次查看
lyz
Contributor II

使用这两个接口计算,

lyz_0-1667981543871.png

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

0 项奖励
回复

2,828 次查看
Keane
Contributor I

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

0 项奖励
回复