# Re: What does "reset" mean for IVs in Cipher.doFinal documentation?

Jan Luehe (luehe@laguna.eng.sun.com)
Thu, 6 May 1999 19:23:14 -0700 (PDT)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Aida: "Security Problem"
- Previous message: David Taylor: "What does "reset" mean for IVs in Cipher.doFinal documentation?"
- Maybe in reply to: David Taylor: "What does "reset" mean for IVs in Cipher.doFinal documentation?"

    Message-Id: <199905070223.TAA10595@laguna.eng.sun.com>

    Date: Thu, 6 May 1999 19:23:14 -0700 (PDT)

    From: Jan Luehe <luehe@laguna.eng.sun.com>

    Subject: Re: What does "reset" mean for IVs in Cipher.doFinal documentation?

    To: list-jce@aba.net.au, dtaylor@forge.com.au

David:

I agree, the javadocs are a little misleading here.

After calling "doFinal", your cipher is supposed to be
ready for a
new encryption or decryption operation, respectively,
based on the keys and parameters that it was initialized
with (or the parameters that it itself generated if it
was not initialized w/ any).

Hence, you should be able to do the following:

Cipher c = Cipher.getInstance(xxx);
c.doFinal(somebytes);
c.doFinal(someOtherBytes);
Your cipher will remain initialized after a call to doFinal.

However, you may choose to reinitialize it w/ a different
key.

I will add this clarification to our FAQ in

http://java.sun.com/products/jce/jce12_faq.html

Thanks,

Jan

> X-Authentication-Warning: ballin.forge.com.au: mail set sender to
<dtaylor@forge.com.au> using -f
> X-Lotus-FromDomain: FORGE
> From: "David Taylor" <dtaylor@forge.com.au>
> To: list-jce@aba.net.au
> cc: java-security@java.sun.com
> Date: Fri, 7 May 1999 06:03:42 +1000
> Subject: What does "reset" mean for IVs in Cipher.doFinal documentation?
> Mime-Version: 1.0
> Content-Disposition: inline
>
>
>
> When the JCE docs say a cipher is reset to the state is was in after an
> init, what exactly does that mean?
>
> Is the IV reset to it's initial value for CBC mode block ciphers or is it
> kept at it's current value in anticipation of more cipher operations?
>
> I'm asking because I am always encrypting a block at a time, so
> Cipher.update should always have exactly one block of data to work with.
> I'm having some trouble with it and keep being told to use Cipher.doFinal,
> but that word "reset" concerns me.
>
> Regards,
> David Taylor
> Forge Research.
>
>

- Next message: Aida: "Security Problem"
- Previous message: David Taylor: "What does "reset" mean for IVs in Cipher.doFinal documentation?"
- Maybe in reply to: David Taylor: "What does "reset" mean for IVs in Cipher.doFinal documentation?"