Comment 4 for bug 1176482

Revision history for this message
Legrandin (gooksankoo) wrote :

As soon as the value of the IV member changes, it is not the IV anymore so I am a bit puzzled by the educational value.
We are rather talking about one of the internal states of the cipher (and exactly which state strongly depends on the type of chaining mode).

On the other hand, it is also a misleading naming because sometimes I may need to know the original IV the cipher was initialized with and accessing cipher.IV is very intuitive.

Perhaps:
1. the IV member should be removed entirely as you say (easy)
2. a new get_IV() method introduced (easy)
3. some form of chaining-mode specific callback could be defined for those that want to monitor how the internal state changes for teaching purposes (more difficult)

As far as CMAC goes, there are cleaner ways to achieve the same result. ;-)