This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/AES-128: AES-128

Part Number: AES-128

Tool/software: TI C/C++ Compiler


Hello! I applied the library Ti_aes_128. However, I encountered such a problem. If you use a function aes_enc_dec(*state, *key, dir) once, everything works fine. But in the second use, encryption occurs differently (if you look at the control known array from the example). Next and decrypts incorrectly. What could be the problem? 

thank you.

  • Hello Ilshat,

    When using the algorithm, its is "destructive" to the key array supplied. this means it uses the key array for the encryption process as a notepad/workspace. You would need a new copy of the original key for a second encryption process if you wanted to use the same key. this is why in the example main program for the AES ode, two identical key arrays are provided for the encryption, then decryption process.
  • Hello Jace! Many thanks for the quick and qualified reply. everything works great!

**Attention** This is a public forum