RFR: 8253821: Improve ByteBuffer performance with GCM [v2]
Anthony Scarpino
ascarpino at openjdk.java.net
Thu Oct 8 16:58:21 UTC 2020
On Wed, 7 Oct 2020 20:56:28 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 1258:
>
>> 1256: } else {
>> 1257: if (buffered > 0) {
>> 1258: cipher.encrypt(buffer, 0, buffered, new byte[0], 0);
>
> Same comment as above?
So there is a problem here, but not a short buffer. I hadn't realized that encrypt(byte[]..) didn't put data in the
GaloisCounterMode.ibuffer because I did that with encrypt(ByteBuffer..). I added a GCM only method that will cover
this and place the data in the ibuffer for doFinal(ByteBuffer..) can complete the op.
-------------
PR: https://git.openjdk.java.net/jdk/pull/411
More information about the security-dev
mailing list