On Fri, 9 Oct 2020 00:48:42 GMT, Valerie Peng <valer...@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/GaloisCounterMode.java 
> line 550:
> 
>> 548:
>> 549:         processed += len;
>> 550:         ghashAllToS.update(src, len);
> 
> Isn't input to ghashAllToS always be the produced cipher text? Did I miss 
> something?

method is removed

> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java 
> line 617:
> 
>> 615:
>> 616:         processAAD();
>> 617:         if (len > 0) {
> 
> Even if (len == 0), we should still process the data stored into 'ibuffer'? 
> It seems that both of the
> encrypt(ByteBuffer) and encryptFinal(ByteBuffer) are adapted from their 
> counterpart with byte[] arguments. However, the
> byte[] methods have different entrant conditions due to the buffering in 
> CipherCore. So the impl of the ByteBuffer ones
> may need additional logic to handle all possible calling sequence.

Yes for encryptFinal.  encrypt is removed

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

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

Reply via email to