This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Question about (auto) commissioning and security

Hello !

I got bad time figuring out how we can prevent a Malicious device to corrupt our thread Network and only allow our device to connect to this mesh network.

I am working on a project where we have 10 Full Thread Device (FTD) scattered across a large perimeter and hundreds of Sleepy End Devices (SED).

All the SED are transmitting to only one of these FTD (that we call the Gateway), no need for internet access in our case.

We are not using the NCP and raspberry pi border router as our SED do not need to connect to internet but only to this Gateway.

So far, our experiments went well, we did not test with hundreds of node but with couple of tens on a large area (200m x 200m).

For practicality, we cannot manually add (commission) each of these SEDs one by one, but require them to connect automatically to the network using a secret (auto-commissioning).

Instead, we need them to have a secret (for now hardcoded) PSKc (in thread) that we will use for the commissioning and get the MasterKey.

My question arises when I try to understand how we can implement this secret and more precisely, how it is implemented in the COAP example.

In the Coap example, we can see that we set the Pan ID and the channel but we do not see any use (or definition) of the PSKc, the Thread Pre Shared Key used to get the network MasterKey.

I spent several day searching for this. I read the whole Thread specification, but do not see how the commissioning is implemented within the Nordic SDK (which is great btw!).

Could you please explain me how the Coap example implements this shared secret and allow only the devices running the example to connect together ?

(or guide me toward explanations or code on the openThread github maybe Slight smile )

Thanks a lot,

Max

Parents
  • Hello Max,

    Sorry for the late reply. 

    I am trying to understand what you need. 

    So you want to pre-program the devices so that when you turn them on, they will automatically connect to each other and form a network? Or do you want all devices to be able to join any network?

    I would have to double check with our Thread team, but I believe that the Masterkey is hardcoded, and if not changed, it is set to 0x00112233445566778899aabbccddeeff.

    It can be overwritten by setting the master key which is located in dataset.h.

    But can you describe how you want the nodes to behave? Should all the nodes be hard coded this specific network, or do you want to commission the nodes, so that you (or a customer) at any time can get a new node, and commission it to any existing network?

    Best regards,

    Edvin

  • Hello Edvin,

    You got my question right, we would like our nodes to to connect to each other and form a private network.

    Thus restricting other devices to connect.

    I would like (for now) these nodes to have hardcoded credentials of the network and join/create automatically.

    Our customer wants the minimum interaction with the system. basically, we power up the nrf52 devices and they should connect automatically. This is the case right now, but we now need to secure the system/network by changing the credentials.

    Later on, we will use DFU update over the air to update the credentials or add user interaction via a push button or so.

    if I understand correctly, the masterkey and the PSKc secret are hardcoded within the openThread library that Nordic compiled.

    Would changing the MasterKey on all devices allow us for setting-up a private network ?

    Do we need to use set the PSKc secret since we are using auto-commissioning ?

  • Hello Max,

    I just wanted you to know that your ticket is not forgotten, but I am still waiting for help from our Thread team.

    Let me know if you for some reason have additional information.

    BR,
    Edvin

  • Hello Edvin,

    I will conduct more tests on the network connection next week, once my code is working properly again.

    (I heavily refactored the whole project to work with GCC, vscode, and integrate tests Unity/Ceedling).

    I will start by assigning a hardcoded Master key and see for the PSKc secret (as per Thread UM)

    BR,

    Max

  • Hello Max,

    Our Thread and Zigbee team has been very busy lately, and I have not received a reply for my internal ticket yet. I will ping the internal ticket, and keep you updated. Thank you for popping by. 

    BR,

    Edvin

Reply Children
No Data
Related