Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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).

share|improve this answer
Thanks for clearing it up! I just completely misinterpreted the key schedule. - So, is AES vulnerable to attacks in ECB mode then? –  AUTO Oct 14 '13 at 13:28
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) –  tylo Oct 14 '13 at 14:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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