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

Anthony Scarpino ascarpino at openjdk.java.net
Thu Nov 5 16:54:01 UTC 2020


On Tue, 3 Nov 2020 01:31:37 GMT, Valerie Peng <valeriep at openjdk.org> wrote:

>> Anthony Scarpino has updated the pull request incrementally with six additional commits since the last revision:
>> 
>>  - style
>>  - style & comments
>>  - full update
>>  - remove old
>>  - update
>>  - outputsize
>
> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java line 514:
> 
>> 512:             }
>> 513:             len -= remainder;
>> 514:             ibuffer.write(in, len, remainder);
> 
> Any chance that 'ibuffer' already contains earlier buffered bytes? If 'ibuffer' contains bytes. then these need to be processed before processing 'in' and you can't write the to-be-processed bytes into 'ibuffer' here.

I does not.  CipherCore only sends block sized data, and the ByteBuffer code uses this method during final operations.

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

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



More information about the security-dev mailing list