title: When to use on the fly AES encryption and fixed key AES encryption?
body: <p>I am working on AES security in <code>Contiki OS</code>.I have AES library, which supports two type of encryption/decryption:</p>
  
  <ol>
  <li>On the fly </li>
  <li>Fixed key</li>
  </ol>
  
  <p>In <code>on-the-fly</code>, 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.</p>
  
  <p>In the <code>fixed-key</code> algorithm, one fixed key is used for all enc/dec.</p>
  
  <p>I am confused , which method I should select? I don't know pros and cons of this two methods.</p>