Re: RFR: 8298865: Excessive memory allocation in CipherOutputStream AEAD decryption [v2]

2022-12-19 Thread Valerie Peng
On Fri, 16 Dec 2022 07:58:47 GMT, Daniel Jeliński wrote: >> Perhaps it's the way you read the sentence, when I read it bit before your >> comment, I interpreted the change as an open-ended comment where AEAD may or >> may not return without being specific. I'm neutral to changing it to >> spe

Re: RFR: 8298865: Excessive memory allocation in CipherOutputStream AEAD decryption [v2]

2022-12-16 Thread Daniel Jeliński
On Thu, 15 Dec 2022 23:33:21 GMT, Anthony Scarpino wrote: >> src/java.base/share/classes/javax/crypto/CipherOutputStream.java line 95: >> >>> 93: * >>> 94: * If obuffer is null/zero-sized, do not allocate a new buffer. >>> 95: * This reduces allocation for AEAD ciphers that never

Re: RFR: 8298865: Excessive memory allocation in CipherOutputStream AEAD decryption [v3]

2022-12-16 Thread Daniel Jeliński
> This patch modifies `CipherOutputStream` to avoid pointless memory > allocations when decrypting data using AEAD ciphers. This is related to > #11597, which fixed a similar issue in `CipherInputStream`. > > `Cipher.update` does not output any data when doing AEAD decryption; all data > is buf

Re: RFR: 8298865: Excessive memory allocation in CipherOutputStream AEAD decryption [v2]

2022-12-15 Thread Anthony Scarpino
On Thu, 15 Dec 2022 22:46:47 GMT, Valerie Peng wrote: >> Daniel Jeliński has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix test failure > > src/java.base/share/classes/javax/crypto/CipherOutputStream.java line 95: > >> 93: * >> 9

Re: RFR: 8298865: Excessive memory allocation in CipherOutputStream AEAD decryption [v2]

2022-12-15 Thread Anthony Scarpino
On Thu, 15 Dec 2022 18:06:38 GMT, Daniel Jeliński wrote: >> This patch modifies `CipherOutputStream` to avoid pointless memory >> allocations when decrypting data using AEAD ciphers. This is related to >> #11597, which fixed a similar issue in `CipherInputStream`. >> >> `Cipher.update` does no

Re: RFR: 8298865: Excessive memory allocation in CipherOutputStream AEAD decryption [v2]

2022-12-15 Thread Valerie Peng
On Thu, 15 Dec 2022 18:06:38 GMT, Daniel Jeliński wrote: >> This patch modifies `CipherOutputStream` to avoid pointless memory >> allocations when decrypting data using AEAD ciphers. This is related to >> #11597, which fixed a similar issue in `CipherInputStream`. >> >> `Cipher.update` does no

Re: RFR: 8298865: Excessive memory allocation in CipherOutputStream AEAD decryption [v2]

2022-12-15 Thread Valerie Peng
On Thu, 15 Dec 2022 18:06:38 GMT, Daniel Jeliński wrote: >> This patch modifies `CipherOutputStream` to avoid pointless memory >> allocations when decrypting data using AEAD ciphers. This is related to >> #11597, which fixed a similar issue in `CipherInputStream`. >> >> `Cipher.update` does no

Re: RFR: 8298865: Excessive memory allocation in CipherOutputStream AEAD decryption [v2]

2022-12-15 Thread Mark Powers
On Thu, 15 Dec 2022 18:06:38 GMT, Daniel Jeliński wrote: >> This patch modifies `CipherOutputStream` to avoid pointless memory >> allocations when decrypting data using AEAD ciphers. This is related to >> #11597, which fixed a similar issue in `CipherInputStream`. >> >> `Cipher.update` does no

Re: RFR: 8298865: Excessive memory allocation in CipherOutputStream AEAD decryption [v2]

2022-12-15 Thread Daniel Jeliński
> This patch modifies `CipherOutputStream` to avoid pointless memory > allocations when decrypting data using AEAD ciphers. This is related to > #11597, which fixed a similar issue in `CipherInputStream`. > > `Cipher.update` does not output any data when doing AEAD decryption; all data > is buf

RFR: 8298865: Excessive memory allocation in CipherOutputStream AEAD decryption

2022-12-15 Thread Daniel Jeliński
This patch modifies `CipherOutputStream` to avoid pointless memory allocations when decrypting data using AEAD ciphers. This is related to #11597, which fixed a similar issue in `CipherInputStream`. `Cipher.update` does not output any data when doing AEAD decryption; all data is buffered, and i