Accessing Provisioning PDUs in BLE Mesh

I am currently working on encrypting "Provisioning public key PDU" with a public key of end node that was received out of band the by provisioner before transmitting it to the provisionee who can then decrypt it with its public key. This will be in accordance to Mesh Protocol v1.1 . Where are the files in which I can access provisioning PDUs?

Parents Reply Children
  • Hi,

    Provisioner never sends back device public key. Provisioner sends its own public key so that both provisioner and provisionee are able to calculate ECDH secret and generate session key and session nonce. Public key is not used for encryption/decryption but only for key derivation. Public key is not secret, and it is not required to be encrypted. Device public key is provided as shown here

    Provisioning protocol PDUs can be available over registered bearer API. From bearer, PDUs are raised further to provisioner or provisionee  parts of the protocol. You can have a look at callbacks from bearer to host.

    The function bt_mesh_provision() is used for storing provisioning data.

    Best regards,
    Dejan

  • Hi,

    Your previous reply got deleted. Did you do it yourself on purpose?

    Best regards,
    Dejan

  • Hi, yes I deleted it on purpose after I got some clarity. Apologies for that

    Actually I have tried using remote pub key set but I have the following questions regarding it.

    Q1. The public Key that I had created using PSA crypto APIs have an array length of 65 instead of 64. So what are the changes that I need to make before I pass it to the remote pub key set function?

    Q2. Also when I set the function on the provisioner with the device public key and pass the public and private keys in the bt_mesh_prov structure during the time of testing I am getting the following warnings and the provisioning fails

    <wrn> bt mesh prov: unexpected msg 0x03 != 0xff

    <wrn> bt mesh prov: unexpected msg 0x05 != 0xff

    <wrn> bt mesh pb adv : Giving up transaction 

    What I could deduce from the warning is that the end device is receiving msgs that were not expected at that time in the procisioning process. Need help regarding that

Related