I have this problem where I need to guess if bob wrote "yes" or "no" It is using AES-128-CBC and it tells me the next IV to be used. it takes input as a hex string and does the encryption for me I thought I completely understood this problem but I am not getting matching ciphertexts.
My thought process is myGuess XOR BobIV XOR nextIV then I encrypt that with AES-128-CBC and It should match his ciphertext.
This is my code to XOR
then the output from r2 is what i plug into the field and what should happen is the next IV should cancel out with itself then what is being sent into AES is myGuess XOR bobIV which should be exactly what his was going through AES leading to identical ciphertexts but as you can see they are not...