Code Review Request for 6996769: support AEAD ciphers

Xuelei Fan xuelei.fan at oracle.com
Thu Nov 8 00:39:46 UTC 2012


I have a concern about the performance. Not a big problem, but may be
nice to consider it.

Unlike CBC ciphers, GCM based ciphers need to update the IV for every
encryption/decryption operation. As means that the Cipher.init() is
required to call in every operation:

   Key key = // the key used for this GCM cipher
   for (every encrypt/decrypt operation) {
       // init the cipher with new IV
       cipher.init(...);

       cipher.updateAAD(...);
       cipher.doFinal(...);
   }

I was wondering whether we can improve the performance a little by
bypass the key size checking in engineInit():
   protected void engineInit(int opmode, Key key, ...) {
       if (!(the key is the same as previous one)) {
           checkKeySize(key, ...);
       }
   }

Xuelei

On 11/3/2012 7:54 AM, Valerie (Yu-Ching) Peng wrote:
> Brad or Max,
> 
> Can either of you review my changes for the following RFE?
> 6996769: support AEAD ciphers
> 
> This is the JCE part of changes for the EFP "Support AEAD CipherSuites".
> 
> The webrev is at:
> http://cr.openjdk.java.net/~valeriep/6996769/webrev.00/
> 
> I included IBM copyright in files where some code are adopted from their
> sample impl.
> 
> Thanks,
> Valerie




More information about the security-dev mailing list