想用最简单的AES ECB模式加密,用driverlib里面的接口加解密,写了个简单的程序,但是一跑就挂了,请教一下这个接口应该怎么用?
#include <driverlib/rom_crypto.h>
uint8_t aesKey[16] = {1,2,3,4,5,6,7,8,9,10,11,12,13,15,15,16} ;
uint8_t data[22] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,15,15,16,17,18,19,20,21};
uint8_t encData[22] = {0};
memcpy(encData,data,22);
AES_ECB_EncryptData(encData,22,aesKey); //一到这里就飞了
AES_ECB_DecryptData(encData,22,aesKey);
Alvin Chen:
dev.ti.com/…/_crypto_c_c26_x_x_8h.html
Viki Shi:
CC13X0SDK目录下有crypto的例程,路径C:\ti\simplelink_cc13x0_sdk_1_60_00_21\source\ti\drivers\crypto
另外也可使用TI的AES软件: http://www.ti.com/tool/AES-128
Eggsy Pang:
肯定是没有初始化CryptoCC26XX_init();
检查一下handle等于多少handle = CryptoCC26XX_open(Board_CRYPTO0, false, NULL);