I was trying to decrypt a text encrypted with AES and ECB mode.
I did try several keys and IV. I solved it by ignoring IV. (The IV was given, but it was maybe a distraction)
My question is in which cases IV is needed and in which is not?
A quick list from Wikipedia;
There is a mode of AES that can survive without an IV under certain assumptions.
In particular, the XEX form of AES is designed to function in the absence of a working IV and in particular survives IV reuse. There's one downside in that if you do something like write enough data to the same block and an attacker can see all of the states the security collapses, but it's good it what it's designed for.
There are modes that are "deterministic", in the sense that each invocation of encryption does neither depend on a random number generator for a random IV, nor depend on a state being kept for a nonce.
An earlier question has attracted some useful answers that may be helpful to readers of this question.