i.MX6 CAAM - keyblob decryption fails after kernel upgrade

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

i.MX6 CAAM - keyblob decryption fails after kernel upgrade

ソリューションへジャンプ
1,021件の閲覧回数
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 解決策
816件の閲覧回数
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 返答(返信)
817件の閲覧回数
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 件の賞賛
返信
974件の閲覧回数
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 件の賞賛
返信
977件の閲覧回数
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 件の賞賛
返信