csec CMAC check

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

csec CMAC check

1,396件の閲覧回数
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 返答(返信)

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

1,383件の閲覧回数
lyz
Contributor II

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

thanks!

0 件の賞賛
返信

1,245件の閲覧回数
Keane
Contributor I

楼主你好,

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

盼复。

0 件の賞賛
返信

1,154件の閲覧回数
lyz
Contributor II

使用这两个接口计算,

lyz_0-1667981543871.png

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

0 件の賞賛
返信

1,144件の閲覧回数
Keane
Contributor I

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

0 件の賞賛
返信