Re: RFR: 8283022: com/sun/crypto/provider/Cipher/AEAD/GCMBufferTest.java failing with -Xcomp after 8273297 [v2]

2022-04-21 Thread Anthony Scarpino
On Mon, 18 Apr 2022 20:43:06 GMT, Smita Kamath wrote: >> When input length provided to the intrinsic is 8192, only 7680 bytes are >> processed as the intrinsic operates on multiples of 768 bytes. >> In implGCMCrypt(ByteBuffer src, ByteBuffer dst) method, >> dst.put(bout, 0, PARALLEL_LEN)

Re: RFR: 8285398: Cache the results of constraint checks

2022-04-21 Thread David Schlosnagle
On Thu, 21 Apr 2022 19:58:39 GMT, Daniel Jeliński wrote: > Profiling the TLS handshakes using SSLHandshake benchmark shows that a large > portion of time is spent in HandshakeContext initialization, specifically in > DisabledAlgorithmConstraints class. > > There are only a few instances of

Re: RFR: 8209038: Clarify the javadoc of Cipher.getParameters() [v2]

2022-04-21 Thread Valerie Peng
On Thu, 21 Apr 2022 23:15:10 GMT, Valerie Peng wrote: >>> For (1), how about something like below: >>> >>> > ``` >>> > * The returned parameters may be the same that were used to initialize >>> > * this cipher, or may contain additional default or random parameter >>> > * values used by the

Re: RFR: 8209038: Clarify the javadoc of Cipher.getParameters() [v2]

2022-04-21 Thread Valerie Peng
On Wed, 20 Apr 2022 16:40:34 GMT, Sean Mullan wrote: >>> Hmm, I tried the suggested approach in (1), the result looks very lengthy. >>> Actually, the Cipher.init(..) methods already has a few paragraphs >>> describing the behavior for parameter generation, perhaps we should not >>> repeat

Re: RFR: 8285398: Cache the results of constraint checks

2022-04-21 Thread Peter Firmstone
Nice. On 22/04/2022 6:47 am, Daniel Jeliński wrote: On Thu, 21 Apr 2022 19:58:39 GMT, Daniel Jeliński wrote: Profiling the TLS handshakes using SSLHandshake benchmark shows that a large portion of time is spent in HandshakeContext initialization, specifically in

RFR: 8285398: Cache the results of constraint checks

2022-04-21 Thread Daniel Jeliński
Profiling the TLS handshakes using SSLHandshake benchmark shows that a large portion of time is spent in HandshakeContext initialization, specifically in DisabledAlgorithmConstraints class. There are only a few instances of that class, and they are immutable. Caching the results should be a

Re: RFR: 8285398: Cache the results of constraint checks

2022-04-21 Thread Daniel Jeliński
On Thu, 21 Apr 2022 19:58:39 GMT, Daniel Jeliński wrote: > Profiling the TLS handshakes using SSLHandshake benchmark shows that a large > portion of time is spent in HandshakeContext initialization, specifically in > DisabledAlgorithmConstraints class. > > There are only a few instances of

Re: RFR: 8285380: Fix typos in security [v2]

2022-04-21 Thread Magnus Ihse Bursie
> I ran `codespell` on modules owned by the security team (`java.security.jgss > java.security.sasl java.smartcardio java.xml.crypto jdk.crypto.cryptoki > jdk.crypto.ec jdk.crypto.mscapi jdk.security.auth jdk.security.jgss`), and > accepted those changes where it indeed discovered real typos. >

Re: RFR: 8285380: Fix typos in security

2022-04-21 Thread Alan Bateman
On Thu, 21 Apr 2022 14:11:08 GMT, Alan Bateman wrote: >> I ran `codespell` on modules owned by the security team (`java.security.jgss >> java.security.sasl java.smartcardio java.xml.crypto jdk.crypto.cryptoki >> jdk.crypto.ec jdk.crypto.mscapi jdk.security.auth jdk.security.jgss`), and >>

Re: RFR: 8285380: Fix typos in security

2022-04-21 Thread Magnus Ihse Bursie
On Thu, 21 Apr 2022 14:11:08 GMT, Alan Bateman wrote: >> I ran `codespell` on modules owned by the security team (`java.security.jgss >> java.security.sasl java.smartcardio java.xml.crypto jdk.crypto.cryptoki >> jdk.crypto.ec jdk.crypto.mscapi jdk.security.auth jdk.security.jgss`), and >>

Re: RFR: 8285380: Fix typos in security

2022-04-21 Thread Alan Bateman
On Thu, 21 Apr 2022 13:51:27 GMT, Magnus Ihse Bursie wrote: > I ran `codespell` on modules owned by the security team (`java.security.jgss > java.security.sasl java.smartcardio java.xml.crypto jdk.crypto.cryptoki > jdk.crypto.ec jdk.crypto.mscapi jdk.security.auth jdk.security.jgss`), and >

RFR: 8285380: Fix typos in security

2022-04-21 Thread Magnus Ihse Bursie
I ran `codespell` on modules owned by the security team (`java.security.jgss java.security.sasl java.smartcardio java.xml.crypto jdk.crypto.cryptoki jdk.crypto.ec jdk.crypto.mscapi jdk.security.auth jdk.security.jgss`), and accepted those changes where it indeed discovered real typos. I will

Re: RFR: 8284910: Buffer clean in PasswordCallback [v2]

2022-04-21 Thread Xue-Lei Andrew Fan
On Thu, 21 Apr 2022 06:50:58 GMT, Xue-Lei Andrew Fan wrote: >> I'd recommend setting `cleanable` to null after it's been cleaned to make >> the state machine easier to reason about. The invariant would be: if >> `cleanable` is non-null, then we have something dirty that needs to be >>

Re: RFR: 8284910: Buffer clean in PasswordCallback [v2]

2022-04-21 Thread Xue-Lei Andrew Fan
On Wed, 20 Apr 2022 23:38:59 GMT, Stuart Marks wrote: >> Calling `Cleanable.clean()` calls the `Runnable` action at-most-once. >> Each `Cleanable` inserted in a list when it is created and is removed when >> `clear()` or `clean()` is invoked. >> The action is called only if it is still in the

Re: RFR: 8284910: Buffer clean in PasswordCallback [v4]

2022-04-21 Thread Xue-Lei Andrew Fan
> Please review this password cleanup enhancement in the PasswordCallback > implementation. This is one of the effort to clean up the buffered passwords. > > The PasswordCallback.setPassword() clones the password, but is not registered > for cleanup. An application could call clearPassword()