This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMDSLCDK138: C6748 Secure Kernel Runtime Loading

Part Number: TMDSLCDK138

Hi,

In a previous question on the subject of the C6748 Secure Kernel i was very helpfully provided with documentation and some API usage examples. However, these examples do not seem to cover the dynamic loading of secure modules after boot. If i understand things correctly, there is no formal support for this functionality but i was wondering whether example code was available or the following questions could be clarified.

Regarding the usage of SK_load and SK_algoinvoke. I'm trying to implement the runtime loading of a secure module whose code should not be exposed outside of the DSP's secure mode and i understand this is exactly what those APIs are for. Now, i understand (from descriptions in sk_load.h in the examples and sk.h in the TI-RTOS SDK) that i have to invoke SK_load with an encrypted SK_LoadObj object and then call SK_algoinvoke with the algorithm entry point to execute an algorithm from the loaded module but since there are no examples on using these APIs the following things are unclear to me:

  1. How should i produce an encrypted SK_LoadObj object? How is this object encrypted, with what key and what algorithms and how should i transform my plaintext object into an encrypted blob?
  2. Could you give me an example or just describe to me how to construct such an object? Several things in SK_LoadObj are missing to me, such as:
  • loadModMagic: what is the magic number to be set here?
  • sessionKey: what is this used for?
  • signature: how is this to be generated?
  • For the sections (SK_SectHdr) i assume sectHdrMagic should be SK_SECT_HDR_MAGIC, is that correct?
  • How should i set sectDest and sectAccType in the section headers?

Kind regards,

  • Yes, dynamic loading of secure kernel is not supported on the basic secure offering on this device as the device is only designed to support secure boot and limited secure kernel functionality for implementing process of binding the boot image to enable encrypted boot and anti cloning. Secure runtime is not supported. 

    theoretically, the secure kernel APIs are designed to support more run time features but this is out of the scope of support that we provide for this device as the security on the device is not based on full standard security implementation where we have more than one key (RSA and symmetric encryption key) and also allow customers to inject their own key pair into the device.

    Regards,

    Rahul