Hi, Max,

Please find comments in line:

On 11/06/12 00:48, Weijun Wang wrote:
380      AlgorithmParameters getParameters(String algName)

The updated code does not return null anymore. Is there some other reason out of this patch? The init() method below seems to support null for all modes.
Based on the javadoc of the getParameters(String) method, null is returned when the cipher does not use any parameters. The original implementation returns null even for CBC and other modes where an IV is used. So, I fixed this to conform w/ the javadoc.

580                  } else if (key.getAlgorithm().equals("RC2")) {

This seems a bug fix. Is there a regression test for it?
I just noticed this problem when make the enhancement for GCM mode.
I will add a regression test for this.


643, 765  arraycopy

Maybe you can just call Arrays.copyOf()
Ok.

GCMParameters.java:

70 +        this.tLen = gps.getTLen()/8;

Ar you going to check if getTLen() % 8 == 0?
No, I think this check isn't that necessary since it's clearly an invalid value. Even if we were to check it, it should be done inside the javax.crypto.spec.GCMParameterSpec class since the NIST SP800-38D clearly states that TLen must be multiple of bytes.
Thanks,
Valerie

I haven't read GaloisCounterMode, GSTR and GHASH yet. Guess I'll have to study the NIST spec to go on.

Thanks
Max

On 11/03/2012 07: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

Reply via email to