AES encryption under contiki on CC2650 -
i trying add aes encryption existing beacon-demo uses ti cc2650 sensortag. using aes api provided contiki under core/lib. main looks this:
static const uint8_t aes_key[16] = { 0xc0 , 0xc1 , 0xc2 , 0xc3 , 0xc4 , 0xc5 , 0xc6 , 0xc7 , 0xc8 , 0xc9 , 0xca , 0xcb , 0xcc , 0xcd , 0xce , 0xcf };// aes key static uint8_t plain_text[16] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; // plain-text encrypted. const struct aes_128_driver aes_128; . . . printf("plain_text: %d \r\n", plain_text); aes_128.set_key(aes_key); aes_128.encrypt(plain_text); printf("encrypted_text: %p\r\n", plain_text);
unfortunately when run code plain text unchangeable. using prints, realize encrypt function working output still unchangeable. can please tell me doing wrong here?
please note added following line conf file:
#define aes_128_conf aes_128_driver
Comments
Post a Comment