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:
- 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?
- 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,