3
votes

I am working on AES security in Contiki OS.I have AES library, which supports two type of encryption/decryption:

  1. On the fly
  2. 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.

1
It is based on your requirement. generally fixed key will be used.mahendiran.b
need more info. who needs to decrypt this data?guest
Transmitter will encrypt data before sending.And receiver will decrypt data.Dhaval Chauhan

1 Answers

0
votes

The difference between on-the-fly vs fix-key is explained in the original Rijndael proposal section 4.3.2 the Note section.

"The key schedule can be implemented without explicit use of the array W[Nb*(Nr+1)]. For implementations where RAM is scarce, the Round Keys can be computed on-the-fly using a buffer of Nk words with almost no computational overhead."

Essentially on-the-fly key scheduling will be save some memory because you do not need to store the whole expanded key, but you compute it in every round. The advantages of on the fly key scheduling are only really matter in very small micro controllers or hardware implementations.

Disadvatages are that its slower to do the decryption, because you need to expand the key first before starting to decrypt.