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

Anthony Scarpino ascarpino at openjdk.java.net
Wed Nov 18 04:31:12 UTC 2020


On Mon, 16 Nov 2020 19:17:55 GMT, Valerie Peng <valeriep at openjdk.org> wrote:

>> This is a very seldom used code path,  There was only one existing test that accesses this code and it has not offset.
>> 
>> constructBlock() is a generic method.  There should be no case where ibuffer is >= blocksize during this method.   For encryption the two encrypt() only put code in ibuffer.  This method is for normal update() operations.  The other encrypt is for any of the CipherCore internal buffer needs sent to GCM before doing the doFinal.  At that point, ibuffer can be >= blocksize and doFinal will handle it.  Some of this complication will go away with phase 2 of separating GCM from CipherCore
>
> The current impl of constructBlock() seems to have code handling ibuffer >= blocksize scenario. Could you fix that and also pass the input offset into constructBlock() for this RFE?

I redid the whole code

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

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


More information about the security-dev mailing list