Re: RFR: 8338395: Add test coverage for instantiating NativePRNG with SecureRandomParameters

2024-09-09 Thread Jamil Nimeh
On Thu, 15 Aug 2024 09:29:00 GMT, Fernando Guallini wrote: > In order to improve performance when instantiating NativePRNG, a dummy > constructor was added in the PR: https://github.com/openjdk/jdk/pull/17560 > which takes and ignores a `java.security.SecureRandomParameters`, throwing an > ex

Re: RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v27]

2024-09-09 Thread Kevin Driver
On Sun, 8 Sep 2024 16:22:31 GMT, Alan Bateman wrote: >> Kevin Driver has updated the pull request incrementally with one additional >> commit since the last revision: >> >> updated comments around locking mechanism > > src/java.base/share/classes/java/security/KDFParameters.java line 30: > >

JEP drafts: ML-KEM and ML-DSA

2024-09-09 Thread Wei-Jun Wang
Hi All, We are working on implementing 2 PQC algorithms, ML-KEM and ML-DSA, in OpenJDK. New standard names and parameter set names will be defined. You can read the JEP drafts at https://openjdk.org/jeps/8339009 and https://openjdk.org/jeps/8339010. Feel free to add any comment here. Thanks,

Re: RFR: 8339686: java/foreign/TestMappedHandshake.java fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames [v3]

2024-09-09 Thread Maurizio Cimadamore
> The new test added by https://github.com/openjdk/jdk/pull/20854 fails > spuriously. > While JNI lookup is now moved into the static initializer of the > `MappedMemoryUtils` class, this class might only get initialized while in the > middle of a scoped context. > > To address this, I created a

Re: RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v22]

2024-09-09 Thread Sean Mullan
On Thu, 5 Sep 2024 22:34:41 GMT, Kevin Driver wrote: >> src/java.base/share/classes/javax/crypto/KDF.java line 89: >> >>> 87: * the {@code deriveKey} or {@code deriveData} method is called, and a >>> provider >>> 88: * is chosen that supports the parameters passed to the {@code >>> deriveKey

Re: RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v27]

2024-09-09 Thread Sean Mullan
On Fri, 6 Sep 2024 18:45:42 GMT, Kevin Driver wrote: >> Introduce an API for Key Derivation Functions (KDFs), which are >> cryptographic algorithms for deriving additional keys from a secret key and >> other data. See [JEP 478](https://openjdk.org/jeps/478). >> >> Work was begun in [another PR

Integrated: 8329754: The ThreadSafe attribute is ignored for SecureRandom algorithm aliases

2024-09-09 Thread Artur Barashev
On Mon, 9 Sep 2024 14:00:19 GMT, Artur Barashev wrote: > https://bugs.openjdk.org/browse/JDK-8329754 This pull request has now been integrated. Changeset: 56387a09 Author:Artur Barashev Committer: Weijun Wang URL: https://git.openjdk.org/jdk/commit/56387a09810a3204ed820885e0ff0b264

Re: RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v27]

2024-09-09 Thread Sean Mullan
On Fri, 6 Sep 2024 18:45:42 GMT, Kevin Driver wrote: >> Introduce an API for Key Derivation Functions (KDFs), which are >> cryptographic algorithms for deriving additional keys from a secret key and >> other data. See [JEP 478](https://openjdk.org/jeps/478). >> >> Work was begun in [another PR

Re: RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v15]

2024-09-09 Thread Sean Mullan
On Fri, 23 Aug 2024 21:48:44 GMT, Kevin Driver wrote: >> Introduce an API for Key Derivation Functions (KDFs), which are >> cryptographic algorithms for deriving additional keys from a secret key and >> other data. See [JEP 478](https://openjdk.org/jeps/478). >> >> Work was begun in [another P

Re: RFR: 8329754: The ThreadSafe attribute is ignored for SecureRandom algorithm aliases [v4]

2024-09-09 Thread duke
On Mon, 9 Sep 2024 18:43:20 GMT, Artur Barashev wrote: >> https://bugs.openjdk.org/browse/JDK-8329754 > > Artur Barashev has updated the pull request incrementally with one additional > commit since the last revision: > > Update copyright @artur-oracle Your change (at version eabc8779d6f90d

Re: RFR: 8329754: The ThreadSafe attribute is ignored for SecureRandom algorithm aliases [v4]

2024-09-09 Thread Weijun Wang
On Mon, 9 Sep 2024 18:43:20 GMT, Artur Barashev wrote: >> https://bugs.openjdk.org/browse/JDK-8329754 > > Artur Barashev has updated the pull request incrementally with one additional > commit since the last revision: > > Update copyright Looks better! - Marked as reviewed by w

Re: RFR: 8339686: java/foreign/TestMappedHandshake.java fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames [v2]

2024-09-09 Thread Alan Bateman
On Mon, 9 Sep 2024 12:59:15 GMT, Maurizio Cimadamore wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Drop spurious change > > src/java.base/share/classes/jdk/internal/access/foreign/MappedMemoryUtilsProxy.j

Re: RFR: 8329754: The ThreadSafe attribute is ignored for SecureRandom algorithm aliases [v4]

2024-09-09 Thread Artur Barashev
> https://bugs.openjdk.org/browse/JDK-8329754 Artur Barashev has updated the pull request incrementally with one additional commit since the last revision: Update copyright - Changes: - all: https://git.openjdk.org/jdk/pull/20916/files - new: https://git.openjdk.org/jdk/pull/

Re: RFR: 8329754: The ThreadSafe attribute is ignored for SecureRandom algorithm aliases [v3]

2024-09-09 Thread Weijun Wang
On Mon, 9 Sep 2024 17:59:36 GMT, Artur Barashev wrote: >> https://bugs.openjdk.org/browse/JDK-8329754 > > Artur Barashev has updated the pull request incrementally with one additional > commit since the last revision: > > Code refactoring: using "List.of" and "Utils.runAndCheckException" Loo

Re: RFR: 8329754: The ThreadSafe attribute is ignored for SecureRandom algorithm aliases [v3]

2024-09-09 Thread Artur Barashev
On Mon, 9 Sep 2024 15:54:36 GMT, Weijun Wang wrote: >> Good idea, added more tests. Alternatively we could re-work the >> `GetInstance` utility class to store the real algo name, but then we should >> update all the callers of that class to use the real algorithm and not the >> (possible) alia

Re: RFR: 8329754: The ThreadSafe attribute is ignored for SecureRandom algorithm aliases [v3]

2024-09-09 Thread Artur Barashev
> https://bugs.openjdk.org/browse/JDK-8329754 Artur Barashev has updated the pull request incrementally with one additional commit since the last revision: Code refactoring: using "List.of" and "Utils.runAndCheckException" - Changes: - all: https://git.openjdk.org/jdk/pull/2091

Re: RFR: 8329754: The ThreadSafe attribute is ignored for SecureRandom algorithm aliases [v2]

2024-09-09 Thread Weijun Wang
On Mon, 9 Sep 2024 15:19:28 GMT, Artur Barashev wrote: >> test/jdk/java/security/SecureRandom/ThreadSafe.java line 77: >> >>> 75: //Bad. Alias of S2, should fail because S2 is marked as >>> ThreadSafe >>> 76: put("alg.Alias.SecureRandom.AliasS2", "S2"); >>> 77: >> >> W

Re: RFR: 8339686: java/foreign/TestMappedHandshake.java fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames [v2]

2024-09-09 Thread Martin Doerr
On Mon, 9 Sep 2024 15:30:47 GMT, Maurizio Cimadamore wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Drop spurious change > > src/java.base/share/classes/java/nio/MappedMemoryUtils.java line 128: > >> 126:

Re: RFR: 8339686: java/foreign/TestMappedHandshake.java fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames [v2]

2024-09-09 Thread Maurizio Cimadamore
On Mon, 9 Sep 2024 15:30:47 GMT, Maurizio Cimadamore wrote: >> The new test added by https://github.com/openjdk/jdk/pull/20854 fails >> spuriously. >> While JNI lookup is now moved into the static initializer of the >> `MappedMemoryUtils` class, this class might only get initialized while in

Re: RFR: 8339686: java/foreign/TestMappedHandshake.java fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames [v2]

2024-09-09 Thread Maurizio Cimadamore
> The new test added by https://github.com/openjdk/jdk/pull/20854 fails > spuriously. > While JNI lookup is now moved into the static initializer of the > `MappedMemoryUtils` class, this class might only get initialized while in the > middle of a scoped context. > > To address this, I created a

Re: RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v24]

2024-09-09 Thread Kevin Driver
On Fri, 6 Sep 2024 18:23:27 GMT, Kevin Driver wrote: >> src/java.base/share/classes/com/sun/crypto/provider/HkdfKeyDerivation.java >> line 259: >> >>> 257: os.writeBytes(CipherCore.getKeyBytes(workItem)); >>> 258: } >>> 259: return os.toByteAr

Re: RFR: 8329754: The ThreadSafe attribute is ignored for SecureRandom algorithm aliases [v2]

2024-09-09 Thread Artur Barashev
On Mon, 9 Sep 2024 14:19:02 GMT, Weijun Wang wrote: >> Artur Barashev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Adding more tests for algorithm alias > > test/jdk/java/security/SecureRandom/ThreadSafe.java line 77: > >> 75:

Re: RFR: 8329754: The ThreadSafe attribute is ignored for SecureRandom algorithm aliases [v2]

2024-09-09 Thread Artur Barashev
> https://bugs.openjdk.org/browse/JDK-8329754 Artur Barashev has updated the pull request incrementally with one additional commit since the last revision: Adding more tests for algorithm alias - Changes: - all: https://git.openjdk.org/jdk/pull/20916/files - new: https://git.

Re: RFR: 8339686: java/foreign/TestMappedHandshake.java fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames

2024-09-09 Thread Martin Doerr
On Mon, 9 Sep 2024 12:57:17 GMT, Maurizio Cimadamore wrote: > The new test added by https://github.com/openjdk/jdk/pull/20854 fails > spuriously. > While JNI lookup is now moved into the static initializer of the > `MappedMemoryUtils` class, this class might only get initialized while in the

Re: RFR: 8329754: The ThreadSafe attribute is ignored for SecureRandom algorithm aliases

2024-09-09 Thread Weijun Wang
On Mon, 9 Sep 2024 14:00:19 GMT, Artur Barashev wrote: > https://bugs.openjdk.org/browse/JDK-8329754 test/jdk/java/security/SecureRandom/ThreadSafe.java line 77: > 75: //Bad. Alias of S2, should fail because S2 is marked as > ThreadSafe > 76: put("alg.Alias.SecureRandom

RFR: 8329754: The ThreadSafe attribute is ignored for SecureRandom algorithm aliases

2024-09-09 Thread Artur Barashev
https://bugs.openjdk.org/browse/JDK-8329754 - Commit messages: - 8329754: The ThreadSafe attribute is ignored for SecureRandom algorithm aliases Changes: https://git.openjdk.org/jdk/pull/20916/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20916&range=00 Issue: https://

Integrated: JDK-8338587 - Internal XOF Methods for SHAKE128 and SHAKE256

2024-09-09 Thread Ferenc Rakoczi
On Mon, 19 Aug 2024 19:38:37 GMT, Ferenc Rakoczi wrote: > In preparation for the new PQC algorithms implementations, internal XOF > (eXtendable Output Function) methods are added to the SHAKE128 and SHAKE256 > implementations. This pull request has now been integrated. Changeset: c54fc08a Aut

Re: RFR: 8339686: java/foreign/TestMappedHandshake.java fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames

2024-09-09 Thread Jorn Vernee
On Mon, 9 Sep 2024 12:57:17 GMT, Maurizio Cimadamore wrote: > The new test added by https://github.com/openjdk/jdk/pull/20854 fails > spuriously. > While JNI lookup is now moved into the static initializer of the > `MappedMemoryUtils` class, this class might only get initialized while in the

Re: RFR: JDK-8338587 - Internal XOF Methods for SHAKE128 and SHAKE256 [v6]

2024-09-09 Thread duke
On Fri, 6 Sep 2024 14:13:15 GMT, Ferenc Rakoczi wrote: >> In preparation for the new PQC algorithms implementations, internal XOF >> (eXtendable Output Function) methods are added to the SHAKE128 and SHAKE256 >> implementations. > > Ferenc Rakoczi has updated the pull request incrementally with

Re: RFR: 8339686: java/foreign/TestMappedHandshake.java fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames

2024-09-09 Thread Maurizio Cimadamore
On Mon, 9 Sep 2024 12:57:17 GMT, Maurizio Cimadamore wrote: > The new test added by https://github.com/openjdk/jdk/pull/20854 fails > spuriously. > While JNI lookup is now moved into the static initializer of the > `MappedMemoryUtils` class, this class might only get initialized while in the

Re: RFR: 8339686: java/foreign/TestMappedHandshake.java fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames

2024-09-09 Thread Maurizio Cimadamore
On Mon, 9 Sep 2024 12:57:17 GMT, Maurizio Cimadamore wrote: > The new test added by https://github.com/openjdk/jdk/pull/20854 fails > spuriously. > While JNI lookup is now moved into the static initializer of the > `MappedMemoryUtils` class, this class might only get initialized while in the

RFR: 8339686: java/foreign/TestMappedHandshake.java fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames

2024-09-09 Thread Maurizio Cimadamore
The new test added by https://github.com/openjdk/jdk/pull/20854 fails spuriously. While JNI lookup is now moved into the static initializer of the `MappedMemoryUtils` class, this class might only get initialized while in the middle of a scoped context. To address this, I created a new proxy int