Tool/software: TI C/C++ Compiler
Hello! I applied the library Ti_aes_128. However, I don't quite understand how it works. I see that the function aes_enc_dec(state,key,dir) changes the values of state and key, so I suppose that the encryption result is the new value of state?
I tried to crypt this data:
unsigned char state[ ] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff};
with this key
unsigned char key[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f};
(same to the example) and i got this result:
0xFFEC, 0xFFEE, 0xFFE2, 0xFF80, 0xFF1C, 0xFF6B, 0xFFB5, 0xFFE8, 0xFF0C, 0xFFF8, 0xFF58, 0xFF74, 0xFFB2, 0xFFD4, 0xFFCF, 0xFF3A (state)
so I'm not sure I'm getting the encrypted data right, it seems that either I did'nt get how the function works or there is a problem with the execution of the function.
Is there a risk that the variables state and key crush other varaibles in the memory?
thanks in advance,
Best regards, Imen Diouri