Re: IVParameterSpec

Jan Luehe (luehe@laguna.eng.sun.com)
Wed, 30 Sep 1998 09:18:45 -0700 (PDT)

Andreas:

> the IvParameterSpec in javax.crypto.spec as well as RC2ParameterSpec and
> RC5ParameterSpec all contain initialization vectors. Code that just cares
> about the IV but not about the others parameters, like a generic CBC, OFB,
> ... implementation currently has to separately check and support all those
> different *ParameterSpec classes plus possibly more in the future.
>
> Wouldn't it make much more sense to make RCnParameterSpec subclasses of
> IvParameterSpec so that one instanceof and getIV() would suffice?
>
> Andreas Sterbenz mailto:sterbenz@iaik.tu-graz.ac.at
>

I went through this issue with RSA Data Security.

Note that there is an RC5ParameterSpec that just takes
a "int version, int rounds, int wordSize" (but no IV),
and there is an RC2ParameterSpec that just takes
a "int effectiveKeyBits" (but no IV).

Jan