Verify signed images from Linux user space

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

Verify signed images from Linux user space

2,310件の閲覧回数
jb2
Contributor III

Hello

I succeed to use the UBoot and kernel verification with the HAB API but I want to go further in sign verification.

I've two partitions and a mechanism to update the kernel (and rootfs) from the linux user space. What I want is to verify the authenticity of the kernel before burn it to the non-active partition.

The HAB API is in the boot ROM and, as far as I could find, it's not possible to use this API in the user space. Is it all right?

So I'm trying to do the verification my self:

- Read SRK in UBoot and transfer in the user space with the bootcmd

- Verify the two certificate with this SRK (CFS and IMG certificate)

- Verify the signature of the command and the kernel with openssl.

My questions are:

1) Do you think is it possible to verify the kernel in that way?

2) I don't know how to verify the CFS/IMG certificate 

3) The signature check failed with open SSL. Here are information:

      ivt.bin: interrupt vector for kernel

      linux.csf: csf file for kernel

      test_signature.sh: script to check the signature of the kernel image

            In code file I've: from 0x0 (beginning of the kernel to the end of IVT)

            Signature is the signature after IMG1_cert

            Certificate is the IMG1_ certificate

            response: "Verification Failure"

Thank you

タグ(3)
4 返答(返信)

1,651件の閲覧回数
michael_glembot
Contributor IV

Hi @jb2 , we are currently asking ourselves exactly the same question. Have you found a solution to test the flash.bin or other signed boot artifacts from Linux against the blown SRKs? I would be interested in your solution.

0 件の賞賛

1,631件の閲覧回数
jb2
Contributor III

Hi @michael_glembot ,

Sorry I don't remember if I succeed and I no longer have access to the source code.

 

0 件の賞賛

2,204件の閲覧回数
Yuri
NXP Employee
NXP Employee

Hello,

 

  We recommend to use the DM-crypt after U-boot and kernel are verified.

Use  app note  AN12714  (i.MX Encrypted Storage Using CAAM Secure Keys)

https://www.nxp.com/docs/en/application-note/AN12714.pdf 

 

Have a great day,

Yuri.

 

-------------------------------------------------------------------------------

Note:

- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored

 

Please open a new thread and refer to the closed one, if you have a related question at a later point in time.

1,649件の閲覧回数
michael_glembot
Contributor IV

Hi @Yuri,

Did you read @jb2 's question at all? And if so, did you understand them? There are over 600 views interested in a solution.