by gwillen · 14y ago · 0 comments
The author is correct that ECB is weaker than CBC with a zero IV. This is because there are serious attacks against ECB, and ECB should not be used under any circumstances.
(EDIT: I am not passing any judgement on Apple's choice of API defaults; that's something people should feel free to argue about, and they will. I am only pointing out that the author is mistaken to imply that using CBC with a zero IV is safe or advised under any circumstances, which it is most assuredly not.)
You'd be surprised at who I've heard perpetuating these claims, ranging from developers to cryptography professors at 2nd-tier universities. On that point, the OP is spot on as IVs are not meant to be secret their job is just to prevent detection of patterns, i.e. seed randomizers in many ways.
And, yes, they shouldn't be reused. If they're being reused, they may as well not be there.
The idea of an IV, ECB, CBC, etc are just techniques to be used to make the results of block ciphers more secure, regardless of what algorithm they use.
That's my bigger problem with the "AES is broken on iOS" claim based on IVs. The two things are only loosely related.
I'm not familiar with iOS. Does Apple's SDK provide implementations of any of these higher-level protocols?