I am working with symmetric algorithms in Java with javax.crypo and Bouncy Castle libraries and I need to calculate the avalanche effect of different symmetric algorithms such as DES, 3DES, Blowfish and AES.
I have read about the avalanche effect and means that when an input text is changed slightly (for example, flipping a single bit) the output changes significantly. To calculate this, I made some test by creating a new text changing the first word in the original text and later encrypting both texts. After this I compared the bits that had changed between the original text and the new text.
To this tests I used the four algorithms in CBC operation mode and with PKCS5PADDING. As I know, the change between the encrypted texts must to be high although the changed word is only in the first block of the text, because the input in CBC mode is the encrypted text generated by the previous block, so all blocks are used to generate the final text. So, I think that the change must be considerable.
I read that the 50% of change is a satisfactory value because it means that a change of a word or a single bit in the input changes the output with a 50% probability, and it is strong. The problem is that the results in my tests are about 50% for the four algorithms, and I think that it is no correct, because the difference will be higher and I suppose that AES that works with S-boxes as substitution for encryption must have more change. I have been searching a estimation of avalanche effect result values for these algorithms, to contrast with my results, but I haven't found a estimation. So, I don't know if I am calculating the avalanche effect correctly.
I calculated the avalanche effect in the resulting ciphertexts, not in each round during the encryption process.
I was looking for information and I have found few articles on this subject in which they show: the password used, the original ciphertext, and the encrypted text on it that has made one change. The comparison is performed by bitwise between the two ciphered texts, and so I understand, not in the ciphertext during rounds in the encryption process. It is not like this? Some of these articles are: link and link
Am I calculating the avalanche effect correctly in the symmetric algorithms?
Is there some estimated values about this effect in the algorithms?