I am working on AES security in Contiki OS
.I have AES library, which supports two type of encryption/decryption:
- On the fly
- Fixed key
In on-the-fly
, when I encrypt data using key, new key and encrypted data get generated.This newly generated key is used to decrypt data. So every time I perform enc/dec operation, my key get changed.
In the fixed-key
algorithm, one fixed key is used for all enc/dec.
I am confused , which method I should select? I don't know pros and cons of this two methods.