//#include #include //#include "./printf.h" AES aes ; byte *key = (unsigned char*)"0123456789010123"; const int size_mesg=16*15; //real iv = iv x2 ex: 01234567 = 0123456701234567 unsigned long long int my_iv = 36753562; unsigned char NwkSkey[16] = { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C }; unsigned char AppSkey[16] = { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C }; void setup () { Serial.begin (57600) ; // printf_begin(); delay(500); // printf("\n===testng mode\n") ; randomSeed(134); // otfly_test () ; // otfly_test256 () ; } void loop () { prekey_test () ; delay(2000); } void prekey (int bits) { aes.iv_inc(); byte iv [N_BLOCK] ; byte plain[size_mesg]; byte cipher [size_mesg] ; byte check [size_mesg] ; randomSeed(334); for(int i=0;i