i.MX6 CAAM - keyblob decryption fails after kernel upgrade

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

i.MX6 CAAM - keyblob decryption fails after kernel upgrade

跳至解决方案
1,002 次查看
nreis
Contributor II

Hi,

We are currently upgrading a custom board from Kernel 4.1 to 5.15.

We are using NXP's CAAM driver to securely store a keyblob.

After updating on a security-enabled device, decryption fails.

Adding some debug prints in sm_store.c yields that the job returns with JRSTA_CCBERR_ERRID_ICVCHKL

If I print the status instead of just returning -EBADMSG, I get the following output: 

[   30.153764] caam_jr 2101000.jr: 2000081a: CCB: desc idx 8: AES: ICV check failed.
[   30.161259] caam_jr 2101000.jr: 2000081a: CCB: desc idx 8: AES: ICV check failed.

The raw return value is 0x2000 081A<u+202c>, in case there is more information there.

 nbsp;w

Any help is highly welcome. I can of course provide more information if needed.

 

Thanks in advance and best regards

 

Niklas Reisser

0 项奖励
回复
1 解答
797 次查看
nreis
Contributor II

Hi,

 

thanks for the replies. We were able to find the solution in the updated kernel module which extracts the key.

 

Kind regards,

 

Niklas

在原帖中查看解决方案

0 项奖励
回复
3 回复数
798 次查看
nreis
Contributor II

Hi,

 

thanks for the replies. We were able to find the solution in the updated kernel module which extracts the key.

 

Kind regards,

 

Niklas

0 项奖励
回复
955 次查看
harold07douglas
Contributor I

The transition between kernels can introduce subtle changes in cryptographic APIs or hardware interactions that aren’t immediately apparent but have far-reaching implications, like in this case with keyblob handling and AES operations. Debugging such issues not only requires a deep understanding of the kernel internals but also a meticulous review of descriptor handling and parameter consistency. It’s impressive to see how tightly coupled cryptographic integrity checks are to kernel upgrades—almost like a puzzle where one misplaced piece can disrupt the entire system.

0 项奖励
回复
958 次查看
Harvey021
NXP TechSupport
NXP TechSupport

Hi,

Did you use caam_keygen to generate the keyblob in bsp5.15? If not, it is recommended to use caam_keygen.

 

Regards

Harvey

0 项奖励
回复