This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to provide authorization of app before connection?

Hello, I am using secure_dfu_secure_dfu_ble_s132_pca10040 project. Now I want that the user who has specific key can only access the nrf my device and then can send the zip package for dfu. How should I implement this? I am using nrf52 amd sdk12. I am able to transfer zip package using nrf toolbox.

The file is nrf_ble_dfu.txt

Modified code is code.txt

Ble_gap.h ble_gap.txt

  • Hello Hung, I have few question.

    1. The public and private key that I have is only for demo purpose. So if I want to go for production then how should I generate those keys?
    2. Can I use 2 keys in firmware? One key will be common for our company and other key will be different for different users.

    We want to send common updated firmware to all user so one key will be same and generated by our company. At the user end we want to add other key so that will be different for different users.

    Now my concern is how to update key at run time without compiling it?

    At present I need to manually add keys in dfu_public_keys.

    Thanks

    1. How did you get that "demo" keys ? As far as I know the private key for demo is not available.

    To generate your own key, please follow the instruction here on how to generate cryptography keys.

    1. You would need to modify the bootloader code. What was designed is only for 1 pair of key. If you want 2 pairs, there should be 2 check, one for each key. (two check before throwing the Your plan is to make the 2nd keys dynamic, how do you plan to update the 2nd key ? You may need to update the bootloader so that it has an extra command to receive a new key, store it into flash. The bootloader then read the flash to get the key next time it starts.
Related