High Availability Boot (HAB) is a technique described here in an NxP application note. This is best summarised as:
“HAB authentication is based on public key cryptography using the RSA algorithm in which image data is signed offline using a series of private keys. The resulting signed image data is then verified on the i.MX processor using the corresponding public keys. This key structure is known as a PKI tree. Super Root Keys, or SRK, are components of the PKI tree. HAB relies on a table of the public SRKs to be hashed and placed in fuses on the target.”
The procedure burns Super Root Key (SRK) fuses using a software tool called srktool. In it’s proper use, I would use an SSL certificate with the OID set for code-signing. This would have an oid of 126.96.36.199.188.8.131.52.3.
However, there doesn’t appear to be anything that stops me from using a certificate that is created for other purposes, e.g. for client authentication with the OID of 184.108.40.206.220.127.116.11.2.
The problem is that if I have two certificates from the same CA:
- Code-signing certificate
- Client certificate
I could sign the image with the code-signing certificate. If I could update the public key on the target device, then it would be possible to sign it with the client certificate and it would be accepted as valid.
The only option is use different CAs for both code-signing and client certs. I’m wondering if there’s some way to check the OIDs?