6
$\begingroup$

I have seen many papers on "encrypted firmware" (for example, firmware on Apple Watch like devices) .

Can you tell me how it works? Is there a stub in the firmware which is not encrypted and can decrypt the encrypted firmware on runtime?

Where is the encryption key stored?

$\endgroup$
  • 1
    $\begingroup$ This usually requires a) a trusted processor and b) trusted, tamper-resistant data storage. Given these two parts, you can store a signed image of the bootloader which will decrypt the remaining firmware. $\endgroup$ – SEJPM Jun 6 '16 at 20:28
  • $\begingroup$ If I understand right, a bootloader is stored on the data storage (so the key too?) and can decrypt the firmware ? It will be so easy for a malicious person to steal the key if it so... $\endgroup$ – Duke Nukem Jun 7 '16 at 5:55
5
$\begingroup$

Loading and using encrypted firmware usually requires one of the following conditions to be met:

  1. You have a security (co-)processor and the processor is trusted to follow the instructions given by that (co-)processor

  2. You have a trusted processor and some tamper-resistant storage


Scenario 1

You have a security (co-)processor and the processor is trusted to listen to this coprocessor.
You now also have a firmware image, signed by the manufacturer and symmetrically encrypted using a key hard-coded in the coprocessor. The co-processor will now load, decrypt and verify the image by itself and then pass it on to the processor.
Note that the coprocessor is designed to be tamper-resistant and thus extracting the secret symmetric key or changing the public manufacturer key is impossible.


Scenario 2

In this case you trust your processor to do what it is supposed to do and also have some tamper-resistant storage.
This time, you store your bootloader unencrypted in the tamper-resistant storage which will prevent its exfiltration or manipulation and thus you can just hard-code the secret key needed to load and verify the firmware into the bootloader.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.