Description
Did you mean to not set the value of iv when calling call_oracle on line 146? When I run test.py, the oracle appears to work but when I run test.py using data that I encrypted with a different program, your oracle does not work.
When I started tracing your app, the call of
error = call_oracle(up_cipher, iv)
on line 146 of the run method, iv is never set within the run method. Therefore, at least in my instance, it was using the value of iv returned on line 251 in test.py
cipher, iv = encrypt(bytearray(args.message, "UTF-8"), b"1234567812345678")
Given that the encrypt and decrypt commands use the same key that is hardcoded, if you pass the same iv that was used to encrypt in the first place since it was never defined, the resulting call to decrypt from call_oracle ends up just passing the original iv and key which should always result in a correct decryption right?