Could you explain more about "DFU_PRIVATE_KEY=targets/nrf5x_dfu/dfu_private_key.pem" specified during the build ?
This file contains private and public key. My understanding is that the generated zip file used for DFU and initial firware upload will be signed with the private key but will contain only the public key. When the device needs a DFU update the uploaded zip file will be tried to be opened with the public key on the device. If the zip cannot be opened then it is signed with different private key, thus we can be sure that on the device can be uploaded only firmware singed with the appropriate private key right ?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi @Gordon,
Could you explain more about "DFU_PRIVATE_KEY=targets/nrf5x_dfu/dfu_private_key.pem" specified during the build ?
This file contains private and public key. My understanding is that the generated zip file used for DFU and initial firware upload will be signed with the private key but will contain only the public key. When the device needs a DFU update the uploaded zip file will be tried to be opened with the public key on the device. If the zip cannot be opened then it is signed with different private key, thus we can be sure that on the device can be uploaded only firmware singed with the appropriate private key right ?
Thank you!