In this picture we have a use of a hash function for message authentication.
M is plaintext message. H is hash function. E is encryption block with K symmetric key. || is concatenation of plaintext M with the output of E.
Is it true that this is vulnerable to bit flipping attack? I'm not sure how though.
This is what they said to me:
You do the bit flipping on the encrypted hash in such a way that it is as you want the hash to be
In a nutshell:
You have plaintext message and the encrypted hash.
If you xor between the plaintext hash and the encrypted hash you get "X" that if decrypted gives you all bytes to 0
So to flip the bits you just xor with the correct hash first and then xor with the malicious hash
But the 2 and 3 are absolutely unclear to me:
Why if I xor between plaintext hash and encrypted hash I get stuff that if decrypted gives 0?
What should I xor? Why doing this now the hash will be what I want?