cancel
Showing results for 
Search instead for 
Did you mean: 

Smart Bluetooth

hachc_2137126
Contributor II

Hi,

  Is there anyone tried these 2 functions?

  I've tried to call these 2 functions in timer (1s freq) of sample hello_sensor.c, but it will cause firmware crash.


  I'm using SDK 2.2 + TAG3 evb board.

0 Likes
1 Solution
ArvindS_76
Employee

The AES implementation available in the 20737 was originally written by Brian Gladman (BRG Main SIte), see WICED-Smart-SDK/Wiced-Smart/bleapp/lestack/smp/aes*.h. You should be able to get more information from this site.

View solution in original post

5 Replies
MichaelF_56
Moderator
Moderator

I noticed these are used in the AES API that is available on the BCM20737 and located within the SDK under: WICED-Smart-SDK/Wiced-Smart/bleapp/lestack/smp/aes*.*

Unfortunately, we do not provide any additional documentation on our AES implementation and how it is used.

0 Likes
Anonymous
Not applicable

Could you please provide some documentation or tips for developer, tell them how to use the AES driver?

0 Likes
ArvindS_76
Employee

The AES implementation available in the 20737 was originally written by Brian Gladman (BRG Main SIte), see WICED-Smart-SDK/Wiced-Smart/bleapp/lestack/smp/aes*.h. You should be able to get more information from this site.

View solution in original post

user_2195381
New Contributor II

You can try my program,

#include "aes.h"

    UINT8 in[16] = {0 ,17 ,34 ,51, 68 ,85 ,102 ,119 ,136 ,153 ,170 ,187 ,204 ,221 ,238 ,255}; // plain text input buffer

    UINT8 temp[16]; // crypt text buffer

    UINT8 out[16];   // plain text output buffer

    UINT8 key[32] = {0 ,1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9 ,10 ,11 ,12 ,13 ,14 ,15,

            16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};

   

    aes_context ctx[1];

    aes_set_key(key, 32 /* key size */,ctx);   // set key, you can retry AES-128 bits by key size = 16

    aes_encrypt(in, temp, ctx);

    ble_trace3("\nEN OK %2X-%2X-%2X\n",in[2],temp[2],key[2]);   // index = 2, 0-15 you can retry it

    aes_decrypt(temp, out, ctx);

    ble_trace3("\nDE OK %2X-%2X-%2X\n",temp[2],out[2],key[2]); // index = 2, 0-15 you can retry it  

0 Likes
Anonymous
Not applicable

Hello wangchris10​.  I got the following link error.  Do you know how to fix it?  Thank you for your help.

undefined reference to `aes_set_key'

0 Likes