Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-06-07 Thread Valerie Peng
On Fri, 4 Jun 2021 01:29:36 GMT, Anthony Scarpino wrote: >> engine is one time use per encryption/decryption. But 'originalOut' is for >> overlap detection/protection which may be used multiple times during >> multi-part encryption/decrypion. For each overlapDetection()/restoreOut() >> pair, t

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-06-03 Thread Anthony Scarpino
On Thu, 3 Jun 2021 22:30:38 GMT, Valerie Peng wrote: >> A engine is a one time use, so setting originalOut to null isn't necessary. >> engineDoFinal() sets engine = null. > > engine is one time use per encryption/decryption. But 'originalOut' is for > overlap detection/protection which may be

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-06-03 Thread Valerie Peng
On Wed, 2 Jun 2021 03:18:49 GMT, Anthony Scarpino wrote: >> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java >> line 942: >> >>> 940: >>> 941: System.arraycopy(out, originalOutOfs, originalOut, >>> originalOutOfs, >>> 942: len); >> >> Don

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-06-03 Thread Valerie Peng
On Wed, 2 Jun 2021 20:23:38 GMT, Anthony Scarpino wrote: >> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java >> line 1610: >> >>> 1608: // update the input parameters for what was taken >>> out of 'in' >>> 1609: inOfs += inUsed;

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-06-02 Thread Anthony Scarpino
On Fri, 21 May 2021 01:19:44 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix perf problem by reorganizing doLastBlock() > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounte

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-06-02 Thread Valerie Peng
On Wed, 2 Jun 2021 03:26:03 GMT, Anthony Scarpino wrote: >> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java >> line 975: >> >>> 973: doUpdate(in, inOff, inLen, output, 0); >>> 974: } catch (ShortBufferException e) { >>> 975:

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-06-02 Thread Anthony Scarpino
On Fri, 21 May 2021 00:03:40 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix perf problem by reorganizing doLastBlock() > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounte

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-06-02 Thread Valerie Peng
On Wed, 2 Jun 2021 01:53:51 GMT, Anthony Scarpino wrote: >> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java >> line 741: >> >>> 739: } else { >>> 740: // If the remaining in buffer + data does >>> not fill a >>> 741

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-06-02 Thread Anthony Scarpino
On Fri, 21 May 2021 00:05:17 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix perf problem by reorganizing doLastBlock() > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounte

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-06-02 Thread Anthony Scarpino
On Thu, 20 May 2021 22:59:18 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix perf problem by reorganizing doLastBlock() > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounte

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-06-02 Thread Anthony Scarpino
On Thu, 20 May 2021 23:27:51 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix perf problem by reorganizing doLastBlock() > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounte

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-06-02 Thread Anthony Scarpino
On Thu, 20 May 2021 20:00:07 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix perf problem by reorganizing doLastBlock() > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounte

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-06-02 Thread Anthony Scarpino
On Thu, 20 May 2021 19:46:51 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix perf problem by reorganizing doLastBlock() > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounte

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-06-02 Thread Anthony Scarpino
On Thu, 20 May 2021 19:06:31 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix perf problem by reorganizing doLastBlock() > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounte

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-06-02 Thread Anthony Scarpino
On Thu, 20 May 2021 18:38:35 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix perf problem by reorganizing doLastBlock() > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounte

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-06-01 Thread Anthony Scarpino
On Thu, 20 May 2021 18:05:48 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix perf problem by reorganizing doLastBlock() > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounte

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-06-01 Thread Anthony Scarpino
On Thu, 20 May 2021 01:17:14 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix perf problem by reorganizing doLastBlock() > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounte

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-06-01 Thread Anthony Scarpino
On Thu, 20 May 2021 00:37:44 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix perf problem by reorganizing doLastBlock() > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounte

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-06-01 Thread Anthony Scarpino
On Tue, 1 Jun 2021 19:28:44 GMT, Valerie Peng wrote: >> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java >> line 874: >> >>> 872: } else if (!src.isDirect() && !dst.isDirect()) { >>> 873: // if src is read only, then we need a copy >>> 874:

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-06-01 Thread Anthony Scarpino
On Wed, 19 May 2021 23:59:36 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix perf problem by reorganizing doLastBlock() > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounte

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-06-01 Thread Anthony Scarpino
On Wed, 19 May 2021 23:10:07 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix perf problem by reorganizing doLastBlock() > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounte

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-06-01 Thread Anthony Scarpino
On Wed, 19 May 2021 22:05:16 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix perf problem by reorganizing doLastBlock() > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounte

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-06-01 Thread Valerie Peng
On Thu, 20 May 2021 00:57:42 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix perf problem by reorganizing doLastBlock() > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounte

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-06-01 Thread Valerie Peng
On Fri, 21 May 2021 04:15:44 GMT, Anthony Scarpino wrote: >> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java >> line 628: >> >>> 626: } >>> 627: >>> 628: int mergeBlock(byte[] buffer, int bufOfs, byte[] in, int inOfs, >> >> Can be made 'static'? No

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-05-24 Thread Valerie Peng
On Fri, 21 May 2021 04:07:05 GMT, Anthony Scarpino wrote: >> src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java >> line 640: >> >>> 638: * @return number of bytes used from 'in' >>> 639: */ >>> 640: int mergeBlock(byte[] buffer, int bufOfs, int

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-05-20 Thread Anthony Scarpino
On Fri, 21 May 2021 02:03:56 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix perf problem by reorganizing doLastBlock() > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounte

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-05-20 Thread Anthony Scarpino
On Fri, 21 May 2021 01:58:43 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix perf problem by reorganizing doLastBlock() > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounte

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-05-20 Thread Anthony Scarpino
On Fri, 21 May 2021 01:57:08 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix perf problem by reorganizing doLastBlock() > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounte

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-05-20 Thread Anthony Scarpino
On Wed, 19 May 2021 21:18:15 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix perf problem by reorganizing doLastBlock() > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounte

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-05-20 Thread Anthony Scarpino
On Wed, 19 May 2021 21:18:27 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix perf problem by reorganizing doLastBlock() > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounte

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-05-20 Thread Valerie Peng
On Wed, 19 May 2021 20:21:23 GMT, Anthony Scarpino wrote: >> Hi, >> >> I need a review of this rather large change to GCM. GCM will no longer use >> CipherCore, and AESCrypt to handle it's buffers and other objects. It is >> also a major code redesign limits the amount of data copies and m

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-05-20 Thread Anthony Scarpino
On Tue, 18 May 2021 21:56:38 GMT, Valerie Peng wrote: >> Anthony Scarpino has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix perf problem by reorganizing doLastBlock() > > src/java.base/share/classes/com/sun/crypto/provider/GaloisCounte

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-05-19 Thread Valerie Peng
On Wed, 19 May 2021 20:21:23 GMT, Anthony Scarpino wrote: >> Hi, >> >> I need a review of this rather large change to GCM. GCM will no longer use >> CipherCore, and AESCrypt to handle it's buffers and other objects. It is >> also a major code redesign limits the amount of data copies and m

Re: RFR: 8255557: Decouple GCM from CipherCore [v4]

2021-05-19 Thread Anthony Scarpino
> Hi, > > I need a review of this rather large change to GCM. GCM will no longer use > CipherCore, and AESCrypt to handle it's buffers and other objects. It is > also a major code redesign limits the amount of data copies and make some > performance-based decisions. > > Thanks > > Tony An