I have created an application that will be able to read any file and encrypt it using AES Encryption. For efficiency, I am reading a block of data, encrypting it and so on. So for decrypting, I just have to read each block and decrypt using the same key to get the data back. This was what I had in mind.
But it turns out that the size of each encrypted block varies, so I am currently saving the encrypted block size before each block into my encrypted file.
And my question is: Is it normal that AES produces encrypted blocks of varying lengths or am I overlooking something?
(I'm using a padding, as my input block size is not always a multiple of the AES block size.)
I faced the same issue when I had used C++ a few years back, and now
as3crypto library for an AIR application while implementing the same application.