bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug crypto/27849] getIV() call on cipher for DESede/CBC returns null


From: vivekl at redhat dot com
Subject: [Bug crypto/27849] getIV() call on cipher for DESede/CBC returns null
Date: 13 Jun 2006 16:13:57 -0000


------- Comment #15 from vivekl at redhat dot com  2006-06-13 16:13 -------
First a response to Raif's last comment... I agree about adding mauve tests, I
will do so for all subsequent confirmed bugs I report, thanks for suggesting
this.

Secondly, about the implementation of the patch without the addition to IMode:
I had thought about that, but correct me if I am wrong, the name() method in
IBlockCipher returns the canonical name, the common implementation for it being
in BaseMode which returns ModeName(CipherName). I can definitely parse out the
mode name from this and do the check you mentioned. I think adding cipherName()
to IBlockCipher and modeName() to IMode may not be a bad idea. I remember
talking about this with Casey about this on IRC sometime back and he agreed
with it, it slipped my mind to add this. It would be nice to get Raif's
approval as well. I can update the patch to reflect whatever you prefer pretty
easily. 

The reason why I added the requiresIV() was because I wasnt sure if there is a
chance that additional modes will be added in the future. If we will add more
then hardcoding this logic into CipherAdapter may not be the best thing to do.
If not, and ECB is the only mode we foresee to not require an IV then what Raif
suggested is just fine.

About Casey's comment about engineInitHandler: It is easy to miss it in the
patch but I replaced one of the engineInit() methods with this to extract the
common logic in the two engineInit()s and made them call engineInitHandler()
instead. I have applied the patch locally and tested it, pretty sure it should
work fine for you.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27849





reply via email to

[Prev in Thread] Current Thread [Next in Thread]