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.

LAUNCHCC3235MOD: aes use from cc3200

Part Number: LAUNCHCC3235MOD
Other Parts Discussed in Thread: CC3200, SYSCONFIG

How would I adapt some cc3200 code that looks like:

//AESCrypt(uiConfig,uiKeySize,puiKey1,puiData,puiResult,uiDataLength,uiIV); 
AESCryptuc(uiConfig,uiKeySize,puiKey1,&(acmsg[iuse][0]),&(acmsg[iuse2d][0]),uiDataLength,uiIV);
//UART_PRINT("\r\n Decryption done");

//...
AESCryptuc(uiConfig,uiKeySize,puiKey1,&(acmsg[iuse][0]),&(acmsg[iuse2d][0]),uiDataLength,uiIV);
//UART_PRINT("\r\n Encryption done");
 

To the CC3235MOD? Would such be as simple as '#include "aes.h"' and
'#include "aes_vector.h"' and using properly sized buffer and keys?

  • Hi,

    I assume this is related to your post here https://e2e.ti.com/support/wireless-connectivity/wi-fi-group/wifi/f/wi-fi-forum/1291175/launchcc3235mod-aes-rijndael-c-code-example

    Please set the post as resolved if you decide to keep this one so we don't have redundancies.

    As I replied, the AES (as for other peripherals) is now composed of the Driver lib (which is hardware dependent) and TI Drivers which is independent and serves as an adaptation layer.

    The AES driver lib has not changed. You can see AES.c/h files are in the new SDK as well and they are identical. The TI drivers layer is added to the new SDK and is implemented in CryptoCC32xx.c.h. It is highly recommended to use TI Drivers layer and not directly the Driver lib.

    If I look at the specific AES application from CC3200, it is equivalent to CryptoCC32XX_aesProcess() in the new SDK so you can call it instead. Of course, you would need to explore a little and initialize it, open it via CryptoCC32XX_open() and get the handle and finally call CryptoCC32XX_aesProcess(). You would also need to add the Crypto in the sysconfig of the file.

    Unfortunately, there is no example with encrypt/decrypt, only with sign/verify (OTA and cryptohmac) but you can use it as reference.

    Regards,

    Shlomi

  • Code supplied was wrong.

  • Hi,

    There is no CryptoCC32XX_aesInit() API. I suggest using the CryptoCC32XX_encrypt() and CryptoCC32XX_deccrypt() APIs which are the wrappers for the process. You can see that there is some semaphore protection in the CryptoCC32XX_encrypt() and CryptoCC32XX_deccrypt() APIs. Please note that you would also need to add the Crypto in the sysconfig of the file.

    But, if you prefer to call directly the APIs, you can do it but I cannot verify it would work. You can try.

    Shlomi