I've just read about CBC encryption and decryption and was wondering how you can change every plaintext block?
Let's say you have an initialization vector, 3 ciphertext blocks, know each block-cipher-decryption and you know each plaintext block too. Then you have some string that you want to change these given plaintexts to. Edit: Assume there is a padding oracle available as well.
If I understood correctly, it will be quite easy to change the very first plaintext block: You take each byte of the initialization vector XORed with each byte of the first plaintext block XORed with the character of the string you want to change these plaintexts to. Putting all these new bytes together, this is now the new initialization vector and XORing this new initialization vector with the first ciphertext block, we will get another plaintext; that one we wanted.
The change of the iv has no effect on the plaintext of the next ciphertext block. But now in order to change the next, namely the second plaintext, we would have to do changes on the first ciphertext block which will sadly destroy the first plaintext block... And the same will happen if we move to the next ciphertext block and try to change its plaintext. So, in the end, there will just be junk plaintext or nothing at all, bad format. But I don't see any other way where you could change all plaintext blocks correctly? : /
I've mainly oriented myself on this nice diagram here from Wikipedia: