Re: RFR: 8333364: Minor cleanup could be done in com.sun.crypto.provider

2024-06-11 Thread Valerie Peng
On Tue, 4 Jun 2024 02:32:31 GMT, Mark Powers wrote: > https://bugs.openjdk.org/browse/JDK-864 BTW, need to add noreg-xxx label to the bug record. - PR Comment: https://git.openjdk.org/jdk/pull/19535#issuecomment-2162083354

Re: RFR: 8333364: Minor cleanup could be done in com.sun.crypto.provider

2024-06-11 Thread Valerie Peng
On Tue, 4 Jun 2024 02:32:31 GMT, Mark Powers wrote: > https://bugs.openjdk.org/browse/JDK-864 src/java.base/share/classes/com/sun/crypto/provider/CipherCore.java line 969: > 967: private int finalNoPadding(byte[] in, int inOfs, byte[] out, int > outOfs, > 968:

Re: RFR: 8333364: Minor cleanup could be done in com.sun.crypto.provider

2024-06-11 Thread Valerie Peng
On Tue, 4 Jun 2024 02:32:31 GMT, Mark Powers wrote: > https://bugs.openjdk.org/browse/JDK-864 src/java.base/share/classes/com/sun/crypto/provider/CipherCore.java line 874: > 872: int len = Math.addExact(buffered, inputLen); > 873: // calculate padding length > 874: i

Re: RFR: 8333364: Minor cleanup could be done in com.sun.crypto.provider

2024-06-11 Thread Valerie Peng
On Tue, 4 Jun 2024 02:32:31 GMT, Mark Powers wrote: > https://bugs.openjdk.org/browse/JDK-864 src/java.base/share/classes/com/sun/crypto/provider/DHKeyAgreement.java line 408: > 406: if (keysize >= BlowfishConstants.BLOWFISH_MAX_KEYSIZE) > 407: keysize = Blowfis

Re: RFR: 8333364: Minor cleanup could be done in com.sun.crypto.provider

2024-06-11 Thread Valerie Peng
On Tue, 4 Jun 2024 02:32:31 GMT, Mark Powers wrote: > https://bugs.openjdk.org/browse/JDK-864 src/java.base/share/classes/com/sun/crypto/provider/PBES2Parameters.java line 214: > 212: { > 213: String kdfAlgo; > 214: String cipherAlgo; nit: merge these with where they a

Re: RFR: 8333364: Minor cleanup could be done in com.sun.crypto.provider

2024-06-11 Thread Valerie Peng
On Tue, 4 Jun 2024 02:32:31 GMT, Mark Powers wrote: > https://bugs.openjdk.org/browse/JDK-864 src/java.base/share/classes/com/sun/crypto/provider/RC2Parameters.java line 224: > 222: > 223: if (version != 0) { > 224: > sb.append(LINE_SEP).append("version:").append(LINE_

Re: RFR: 8333867: SHA3 performance can be improved

2024-06-11 Thread Ferenc Rakoczi
On Tue, 11 Jun 2024 18:18:41 GMT, Daniel Jeliński wrote: >> This PR removes some unnecessary conversions between byte arrays and long >> arrays during SHA3 digest computations. > > src/java.base/share/classes/sun/security/provider/SHA3.java line 70: > >> 68: private long[] state = new long[

Re: RFR: 8333364: Minor cleanup could be done in com.sun.crypto.provider

2024-06-11 Thread Valerie Peng
On Tue, 4 Jun 2024 02:32:31 GMT, Mark Powers wrote: > https://bugs.openjdk.org/browse/JDK-864 src/java.base/share/classes/com/sun/crypto/provider/RSACipher.java line 276: > 274: outputSize = n; > 275: bufOfs = 0; > 276: if (Objects.equals(paddingType, PAD_NONE)) { N

Re: RFR: 8333364: Minor cleanup could be done in com.sun.crypto.provider

2024-06-11 Thread Valerie Peng
On Tue, 4 Jun 2024 02:32:31 GMT, Mark Powers wrote: > https://bugs.openjdk.org/browse/JDK-864 src/java.base/share/classes/com/sun/crypto/provider/TlsKeyMaterialGenerator.java line 109: > 107: SecretKey serverMacKey = null; > 108: SecretKey clientCipherKey; > 109: Se

Re: RFR: 8333867: SHA3 performance can be improved

2024-06-11 Thread Daniel Jeliński
On Mon, 10 Jun 2024 15:01:55 GMT, Ferenc Rakoczi wrote: > This PR removes some unnecessary conversions between byte arrays and long > arrays during SHA3 digest computations. src/java.base/share/classes/sun/security/provider/SHA3.java line 70: > 68: private long[] state = new long[DM*DM]; >

Re: RFR: 8333867: SHA3 performance can be improved

2024-06-11 Thread Daniel Jeliński
On Tue, 11 Jun 2024 17:39:29 GMT, Vladimir Kozlov wrote: >> There is no other use.. That array is there for the sole purpose of holding >> the input as a long array before it gets xor-ed into the state. > > okay Could you try using MethodHandles instead of b2lLittle? Similar to what's used in

Re: RFR: 8333867: SHA3 performance can be improved

2024-06-11 Thread Vladimir Kozlov
On Tue, 11 Jun 2024 09:55:11 GMT, Ferenc Rakoczi wrote: >> This PR removes some unnecessary conversions between byte arrays and long >> arrays during SHA3 digest computations. > > Some microbenchmark data (the percentages are improvements in ops/sec): > Benchmark

Re: RFR: 8333867: SHA3 performance can be improved

2024-06-11 Thread Vladimir Kozlov
On Tue, 11 Jun 2024 17:30:37 GMT, Ferenc Rakoczi wrote: >> Thank you for explanation. >> >> An other question. Is any other use of `longBuf` array after >> `implCompress0()` call which load values from it? Because Intrinsic code >> will not update it. > > There is no other use.. That array is

Re: RFR: 8333867: SHA3 performance can be improved

2024-06-11 Thread Ferenc Rakoczi
On Tue, 11 Jun 2024 15:53:33 GMT, Vladimir Kozlov wrote: >> Oh, and about the length: buffer is allocated in the constructor of the >> parent class (DigestBase) like this: >> buffer = new byte[blockSize]; >> Here blockSize is one of { 72, 104, 136, 144, 168 }, so divisible by 8. >> buffer.leng

Re: RFR: 8333867: SHA3 performance can be improved

2024-06-11 Thread Vladimir Kozlov
On Tue, 11 Jun 2024 08:03:48 GMT, Ferenc Rakoczi wrote: >> Well, the intrinsic function treats the input and state as long arrays >> anyways, and so it only works on little endian architectures, where the >> conversion is a no-op. There is no additional array copy, this b2lLittle() >> call use

[jdk23] Integrated: 8333829: ProblemList sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java due to JDK-8333317

2024-06-11 Thread Matthew Donovan
On Mon, 10 Jun 2024 18:54:38 GMT, Matthew Donovan wrote: > 8333829: ProblemList sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java due > to JDK-817 This pull request has now been integrated. Changeset: 9e22b6de Author:Matthew Donovan URL: https://git.openjdk.org/jdk/commit/9e

Re: [jdk23] RFR: 8333829: ProblemList sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java due to JDK-8333317

2024-06-11 Thread Sean Mullan
On Mon, 10 Jun 2024 18:54:38 GMT, Matthew Donovan wrote: > 8333829: ProblemList sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java due > to JDK-817 817 should have a `problemlist` label. And 8333829 should have a label too, probably `noreg-self`? Otherwise looks fine. -

[jdk23] RFR: 8333829: ProblemList sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java due to JDK-8333317

2024-06-11 Thread Matthew Donovan
8333829: ProblemList sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java due to JDK-817 - Commit messages: - Backport b25476200ab8bea4f25a671d5b9351662d11c5b4 Changes: https://git.openjdk.org/jdk/pull/19636/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19636&range=0

Re: [jdk23] RFR: 8333829: ProblemList sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java due to JDK-8333317

2024-06-11 Thread Kevin Rushforth
On Mon, 10 Jun 2024 18:54:38 GMT, Matthew Donovan wrote: > 8333829: ProblemList sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java due > to JDK-817 @mpdonova Backports to jdk23 stabilization branch do not need maintainer approval, but they do need a review from a Reviewer. You might want

Re: RFR: 8333867: SHA3 performance can be improved

2024-06-11 Thread Ferenc Rakoczi
On Mon, 10 Jun 2024 15:01:55 GMT, Ferenc Rakoczi wrote: > This PR removes some unnecessary conversions between byte arrays and long > arrays during SHA3 digest computations. Some microbenchmark data (the percentages are improvements in ops/sec): Benchmark

Re: RFR: 8333867: SHA3 performance can be improved

2024-06-11 Thread Ferenc Rakoczi
On Mon, 10 Jun 2024 21:09:16 GMT, Ferenc Rakoczi wrote: >> src/java.base/share/classes/sun/security/provider/SHA3.java line 100: >> >>> 98: b2lLittle(b, ofs, longBuf, 0, blockSize); >>> 99: for (int i = 0; i < blockSize / 8; i++) { >>> 100: state[i] ^= longBuf[i]; >>