RFR: 8253821: Improve ByteBuffer performance with GCM [v3]
    Valerie Peng 
    valeriep at openjdk.java.net
       
    Mon Nov  2 17:54:03 UTC 2020
    
    
  
On Fri, 23 Oct 2020 16:38:01 GMT, Anthony Scarpino <ascarpino at openjdk.org> wrote:
>> 8253821: Improve ByteBuffer performance with GCM
>
> 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/CipherCore.java line 726:
> 724: 
> 725:         // check output buffer capacity
> 726:         if (getMode() != GCM_MODE && (output == null ||
Is the buffer size for GCM checked somewhere else? For decryption, it's probably ok to skip the check as no output is returned until doFinal(...). For encryption, there is still a chance for ShortBufferException? Javadoc states that for ShortBufferException, the call can be re-tried with a larger buffer.
-------------
PR: https://git.openjdk.java.net/jdk/pull/411
    
    
More information about the security-dev
mailing list