So, having read a variety of documentations on AES encryption, I came to the unknowledgeable conclusion that the key schedule applied to the array of chunks, and not just the 14 cycles on a single chunk. Thus I concluded that AES was not a linear hash, such that ciphering sequential equivalent chunks would produce a set of non-equivalent chunks.

I guess I kinda didn't pay attention though - I just used AES encryption source code to cipher an array of the same character, and got a very linear result. x-)

Is the AES key constant for all chunks? And should I be using a block-cipher mode other than ecb? Or is AES strong enough on its own?


1 Answer 1


The full AES key schedule used by each call to the AES block cipher. The use of the key schedule does not stretch across different calls for different block encryptions.

Internally, the 14 rounds (for 256 bit keys) of the AES round function use each of the 14 round keys. Those 14 round keys are what comprise the key schedule.

The linear property you observed is indeed correct when AES is used this way. Each block is encrypted without context, and always encrypts to the same ciphertext. This method is called ECB mode. In the real world, that property is a weakness and a different mode like CBC would be used to destroy that property (although the key schedule is not used to do so).

  • $\begingroup$ Thanks for clearing it up! I just completely misinterpreted the key schedule. - So, is AES vulnerable to attacks in ECB mode then? $\endgroup$
    – Codesmith
    Oct 14, 2013 at 13:28
  • 1
    $\begingroup$ yes and no. The weakness is in the ECB mode of operation, and not in AES. Even if AES was a truly random permutation (same permutation used for all blocks), it would suffer from this effect. An example for this weakness is shown on Wikipedia, where an encrypted bitmap shows its patterns (I am not sure about their exact construction, but you can put only 4 or 5 pixel into a single AES block- assuming you use 24 or 32 bit per pixel) $\endgroup$
    – tylo
    Oct 14, 2013 at 14:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.