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 up

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 > ac

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 >> acce

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 >> acce

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: 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 tha

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 low

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 DisabledAlgorithmConstraints

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 stat

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 u

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 tha

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) statem

RFR: 8285431: Assertion in NativeGSSContext constructor

2022-04-21 Thread Xue-Lei Andrew Fan
Hi, May I have the simple update reviewed. In the NativeGSSContext constructor for imported context, the assert is use on the object field, instead of the input parameters. As in a constructor, `'this'` object does not exist yet, this looks like an obvious issue. The fix is straightforward as

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

2022-04-21 Thread Daniel Jeliński
On Fri, 22 Apr 2022 02:13:14 GMT, David Schlosnagle 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 instance