How to use our own public key and signature information, what changes need to be made?

Hi ,

I have some questions about duf Serial routine that I need your help with:

1. Can you explain the implementation process of "pb_decode,pb_encode" and the file structure of ".dat "? Or you can provide reference documents?

2. I have tried to replace the PK public key and the signature information in ".dat "with my own data, but the signature verification fails. What changes do I need to make?

3. What does the NRF_CC310_BL_ECDSA_CONTEXT_INITIALIZED (0xBBAA55DD) value in the program indicate and do you need to change it?

Parents Reply Children
  • Hi Sigurd,

      Thanks for your reply, I have used the SDK version is nRF5_SDK_17.1.0_ddde560, The chip model is nrf52840 ,bootloader used nRF5_SDK_17.1.0_ddde560\examples\dfu\secure_bootloader\pca10056_s140_ble_debug, I have replay the bin code part of the digital signature , just like this:

    I have printed the question in the picture. Thank you very much for your help. Looking forward to your reply

  •   Hi,

    Please ask for your help. If you have any questions, please leave me a message and I will reply to you as soon as possible

  • Hi Shaolin,

    Our experts at DFU in the nRF5 SDK are out of office this week due to vacation.
    If I am not able to help you, they will likely be able to provide better answer than me when they get back next week.

    But here is what I have been able to find:

    1. Can you explain the implementation process of "pb_decode,pb_encode" and the file structure of ".dat "? Or you can provide reference documents?

    For the pb_decode and pb_encode, I have not been able to find any other information than our source code. But you can have a look at that code under "external/nano-pb/".
    I found three earlier cases asking about the .dat file:
    DFU .dat file 

     .dat file DFU packet 

     nrfutil package file.dat format

    From these cases, it looks like the most relevant documentation we have non the .dat file is the Customizing the init packet.

    2. I have tried to replace the PK public key and the signature information in ".dat "with my own data, but the signature verification fails. What changes do I need to make?

    From Customizing the init packet:
    " If you define a custom init packet format, however, you must modify both your DFU bootloader implementation and nRF Util to use this new format."

    Did you change both when you changed your packet?

    3. What does the NRF_CC310_BL_ECDSA_CONTEXT_INITIALIZED (0xBBAA55DD) value in the program indicate and do you need to change it?

    I do not know this, but I will ask our crypto developers about this.

    Did these answers help?

    Regards,
    Sigurd Hellesvik

Related