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

DHKey calculation

I am trying to understand the Passkey LESC pairing on S140 soft device using the latest SDK 14.0.2. The message sequence charts has a block "App starts DHKey calculation" and "App completes DHKey calculation". Where is this done - in peer manager? Can you point me to related APIs?

If this is not done by the peer manager - can you provide some examples to perform DHKey calculation? I referred to this link, but didn't answer my question.

  • Hi,

    The reason for this entry in the MSC is that we do not ship any libraries that can do these calculations, and instead provide hints for integrating e.g. micro-ecc.

    There's multiple reasons for why we went with this solution, but the main reason is space. The LESC feature is already quite heavy in code size, and cramming another library in there would make it really tight to perform dual-banked DFU. Some users also want to use ECDH for signing the DFU images, and then the library must be available outside the SoftDevice for this to work. Others might want non-included features from the same library, leading to overhead and waste. So the decision was to let this be up to the application.

    As the link above describes, there is a back-end in the SDK to integrate your library of choice.

Related