RFR: 8253821: Improve ByteBuffer performance with GCM [v2]

Anthony Scarpino ascarpino at openjdk.java.net
Thu Oct 8 15:29:56 UTC 2020


On Wed, 7 Oct 2020 20:34:21 GMT, Valerie Peng <valeriep at openjdk.org> wrote:

>> Anthony Scarpino has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Xuelei comments
>
> src/java.base/share/classes/com/sun/crypto/provider/CipherCore.java line 816:
> 
>> 814:     }
>> 815:
>> 816:     int update(ByteBuffer src, ByteBuffer dst) throws ShortBufferException {
> 
> Is this also one of the "GCM only" methods? If so, same comment as doFinal(ByteBuffer, ByteBuffer)?
> Maybe the name should be more specific to avoid misuse.

Ok.. I see what you mean by renaming the method.  Yeah, I suppose it's better since it's not truely generic

> src/java.base/share/classes/com/sun/crypto/provider/FeedbackCipher.java line 261:
> 
>> 259:
>> 260:     int encryptFinal(ByteBuffer src, ByteBuffer dst)
>> 261:         throws IllegalBlockSizeException, AEADBadTagException,
> 
> Tag is generated during encryption, this can't possibly throw AEADBadTagException, copy-n-paste error maybe?

Yep.  copied decryptFinal.

-------------

PR: https://git.openjdk.java.net/jdk/pull/411



More information about the security-dev mailing list