Re: RFR: 8342442: Static ACVP sample tests [v11]

2024-11-07 Thread Weijun Wang
> Here we have a launcher and several algorithm-specific tests. Users can > populate "internalProjection.json" files generated by NIST's ACVP Server into > the `data` directory and test them with the launcher. > > Currently, only SHA2, SHA3, ML-KEM, and ML-DSA a

Re: RFR: 8343772: Expected IAPE not thrown in KDF.getInstance (TCK)

2024-11-07 Thread Weijun Wang
On Thu, 7 Nov 2024 16:28:46 GMT, Kevin Driver wrote: > TCK/spec compliance fix for two `getInstance` methods in KDF - unwrap a > wrapped IAPE from an NSAE. src/java.base/share/classes/javax/crypto/KDF.java line 470: > 468:InvalidAlgorithmParameterException { > 469:

Re: RFR: 8298390: Implementing ML-KEM key encapsulation mechanism [v11]

2024-11-06 Thread Weijun Wang
On Wed, 6 Nov 2024 00:00:50 GMT, Valerie Peng wrote: >> Ben Perez has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Added key validity checks to ML_KEM_Provider > > src/java.base/share/classes/sun/security/util/KnownOIDs.java line 319: >

Re: RFR: 8298390: Implementing ML-KEM key encapsulation mechanism [v5]

2024-11-06 Thread Weijun Wang
On Mon, 4 Nov 2024 18:48:51 GMT, Weijun Wang wrote: >> Ben Perez has updated the pull request incrementally with one additional >> commit since the last revision: >> >> NamedParameterSpec constants > > src/java.base/share/classes/com/sun/crypto/provider/ML

Re: RFR: 8298390: Implementing ML-KEM key encapsulation mechanism [v9]

2024-11-06 Thread Weijun Wang
On Tue, 5 Nov 2024 20:17:47 GMT, Sean Mullan wrote: >> Ben Perez has updated the pull request incrementally with one additional >> commit since the last revision: >> >> trailing whitespace > > src/java.base/share/classes/com/sun/crypto/provider/ML_KEM.java line 1: > >> 1: package com.sun.cry

Re: RFR: 8343622: AesDkCrypto.stringToKey should not return null [v2]

2024-11-05 Thread Weijun Wang
On Tue, 5 Nov 2024 15:51:58 GMT, Weijun Wang wrote: >> When an exception happens inside these stringToKey() methods, it returns a >> null. This would lead to unexpected NPE some time in the future. > > Weijun Wang has updated the pull request incrementally with one addition

Re: RFR: 8343622: AesDkCrypto.stringToKey should not return null [v2]

2024-11-05 Thread Weijun Wang
> When an exception happens inside these stringToKey() methods, it returns a > null. This would lead to unexpected NPE some time in the future. Weijun Wang has updated the pull request incrementally with one additional commit since the last revision: let it throw NSAE - C

RFR: 8343622: AesDkCrypto.stringToKey should not return null

2024-11-05 Thread Weijun Wang
When an exception happens inside these stringToKey() methods, it returns a null. This would lead to unexpected NPE some time in the future. - Commit messages: - 8343622: AesDkCrypto.stringToKey should not return null Changes: https://git.openjdk.org/jdk/pull/21908/files Webrev: h

Re: RFR: 8342442: Static ACVP sample tests [v9]

2024-11-04 Thread Weijun Wang
On Mon, 4 Nov 2024 19:56:41 GMT, Roger Riggs wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> check provider availability; SourceRandom in lib; use Utils.toByteArray > > test/

Re: RFR: 8342442: Static ACVP sample tests [v10]

2024-11-04 Thread Weijun Wang
> Here we have a launcher and several algorithm-specific tests. Users can > populate "internalProjection.json" files generated by NIST's ACVP Server into > the `data` directory and test them with the launcher. > > Currently, only SHA2, SHA3, ML-KEM, and ML-DSA a

Re: RFR: 8342442: Static ACVP sample tests [v8]

2024-11-04 Thread Weijun Wang
On Mon, 4 Nov 2024 19:54:32 GMT, Roger Riggs wrote: >> But this is the only main test. I thought `@driver` is used to do some >> preparation work for the main test. > > Right, I thought I saw it spawning another process. I used to write this test in a plugin style, but then I think it's not wor

Re: RFR: 8298390: Implementing ML-KEM key encapsulation mechanism [v5]

2024-11-04 Thread Weijun Wang
On Tue, 15 Oct 2024 22:17:26 GMT, Ben Perez wrote: >> Java implementation of ML-KEM, the [FIPS >> 203](https://csrc.nist.gov/pubs/fips/203/final) post-quantum KEM scheme. >> Depends on https://github.com/openjdk/jdk/pull/21167 > > Ben Perez has updated the pull request incrementally with one ad

Re: RFR: 8342442: Static ACVP sample tests [v8]

2024-11-04 Thread Weijun Wang
On Fri, 1 Nov 2024 20:03:51 GMT, Roger Riggs wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> rename property names, add an example > > test/jdk/sun/security/provider/acvp/L

Re: RFR: 8342442: Static ACVP sample tests [v8]

2024-11-04 Thread Weijun Wang
On Mon, 4 Nov 2024 15:06:17 GMT, Weijun Wang wrote: >> test/jdk/sun/security/provider/acvp/Launcher.java line 45: >> >>> 43: var provProp = System.getProperty("test.acvp.provider"); >>> 44: PROVIDER = provProp != null >>> 45

Re: RFR: 8342442: Static ACVP sample tests [v8]

2024-11-04 Thread Weijun Wang
On Fri, 1 Nov 2024 20:06:32 GMT, Roger Riggs wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> rename property names, add an example > > test/jdk/sun/security/provider/acvp/Launcher.j

Re: RFR: 8342442: Static ACVP sample tests [v9]

2024-11-04 Thread Weijun Wang
> Here we have a launcher and several algorithm-specific tests. Users can > populate "internalProjection.json" files generated by NIST's ACVP Server into > the `data` directory and test them with the launcher. > > Currently, only SHA2, SHA3, ML-KEM, and ML-DSA a

Re: RFR: 8342442: Static ACVP sample tests [v8]

2024-11-01 Thread Weijun Wang
On Fri, 1 Nov 2024 18:32:53 GMT, Weijun Wang wrote: >> Here we have a launcher and several algorithm-specific tests. Users can >> populate "internalProjection.json" files generated by NIST's ACVP Server >> into the `data` directory and test them with the laun

Re: RFR: 8342442: Static ACVP sample tests [v8]

2024-11-01 Thread Weijun Wang
> Here we have a launcher and several algorithm-specific tests. Users can > populate "internalProjection.json" files generated by NIST's ACVP Server into > the `data` directory and test them with the launcher. > > Currently, only SHA2, SHA3, ML-KEM, and ML-DSA a

Re: RFR: 8342442: Static ACVP sample tests [v7]

2024-11-01 Thread Weijun Wang
On Fri, 1 Nov 2024 16:35:34 GMT, Roger Riggs wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> acvp.test.alg system property > > test/jdk/sun/security/provider/acvp/Launcher.java line 50

Re: RFR: 8342442: Static ACVP sample tests [v7]

2024-11-01 Thread Weijun Wang
> Here we have a launcher and several algorithm-specific tests. Users can > populate "internalProjection.json" files generated by NIST's ACVP Server into > the `data` directory and test them with the launcher. > > Currently, only SHA2, SHA3, ML-KEM, and ML-DSA a

Re: RFR: 8342442: Static ACVP sample tests [v6]

2024-11-01 Thread Weijun Wang
> Here we have a launcher and several algorithm-specific tests. Users can > populate "internalProjection.json" files generated by NIST's ACVP Server into > the `data` directory and test them with the launcher. > > Currently, only SHA2, SHA3, ML-KEM, and ML-DSA a

Re: RFR: 8342442: Static ACVP sample tests [v5]

2024-11-01 Thread Weijun Wang
> Here we have a launcher and several algorithm-specific tests. Users can > populate "internalProjection.json" files generated by NIST's ACVP Server into > the `data` directory and test them with the launcher. > > Currently, only SHA2, SHA3, ML-KEM, and ML-DSA a

Re: RFR: 8342442: Static ACVP sample tests [v3]

2024-11-01 Thread Weijun Wang
On Thu, 31 Oct 2024 18:35:05 GMT, Mark Powers wrote: > This looks good to me. Only a few grammatical changes. Why the inclusion of > SHA? Thanks. Fixed. I would like to include as many algorithms as possible. `MessageDigest` seems to be the most basic one so I worked on it. - PR

Re: RFR: 8342442: Static ACVP sample tests [v4]

2024-10-31 Thread Weijun Wang
> Here we have a launcher and several algorithm-specific tests. Users can > populate "internalProjection.json" files generated by NIST's ACVP Server into > the `data` directory and test them with the launcher. > > Currently, only SHA2, SHA3, ML-KEM, and ML-DSA a

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

2024-10-31 Thread Weijun Wang
On Thu, 31 Oct 2024 18:20:26 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: 8342442: Static ACVP sample tests [v3]

2024-10-31 Thread Weijun Wang
> Here we have a launcher and several algorithm-specific tests. Users can > populate "internalProjection.json" files generated by NIST's ACVP Server into > the `data` directory and test them with the launcher. > > Currently, only SHA2, SHA3, ML-KEM, and ML-DSA a

Re: RFR: 8298420: PEM API: Implementation (Preview) [v9]

2024-10-30 Thread Weijun Wang
On Thu, 31 Oct 2024 00:09:19 GMT, Anthony Scarpino wrote: >> src/java.base/share/classes/javax/crypto/EncryptedPrivateKeyInfo.java line >> 339: >> >>> 337: * @throws IllegalArgumentException when an argument causes an >>> 338: * initialization error. >>> 339: * @throws SecurityE

Re: RFR: 8313367: SunMSCAPI cannot read Local Computer certs w/o Windows elevation [v8]

2024-10-30 Thread Weijun Wang
On Tue, 29 Oct 2024 19:50:46 GMT, rebarbora-mckvak wrote: >> This fixes the defect described at >> https://bugs.openjdk.org/browse/JDK-8313367 >> >> If the process does not have write permissions, the store is opened as >> read-only (instead of failing). >> >> Please note that permissions to

Re: RFR: 8298420: PEM API: Implementation (Preview) [v9]

2024-10-30 Thread Weijun Wang
On Mon, 21 Oct 2024 19:52:36 GMT, Anthony Scarpino wrote: >> Hi all, >> >> I need a code review of the PEM API. Privacy-Enhanced Mail (PEM) is a >> format for encoding and decoding cryptographic keys and certificates. It >> will be integrated into JDK24 as a Preview Feature. Preview featur

Re: RFR: 8298420: PEM API: Implementation (Preview) [v9]

2024-10-30 Thread Weijun Wang
On Mon, 21 Oct 2024 19:52:36 GMT, Anthony Scarpino wrote: >> Hi all, >> >> I need a code review of the PEM API. Privacy-Enhanced Mail (PEM) is a >> format for encoding and decoding cryptographic keys and certificates. It >> will be integrated into JDK24 as a Preview Feature. Preview featur

Re: RFR: 8313367: SunMSCAPI cannot read Local Computer certs w/o Windows elevation [v8]

2024-10-30 Thread Weijun Wang
On Tue, 29 Oct 2024 19:50:46 GMT, rebarbora-mckvak wrote: >> This fixes the defect described at >> https://bugs.openjdk.org/browse/JDK-8313367 >> >> If the process does not have write permissions, the store is opened as >> read-only (instead of failing). >> >> Please note that permissions to

Re: RFR: 8298420: PEM API: Implementation (Preview) [v9]

2024-10-30 Thread Weijun Wang
On Mon, 21 Oct 2024 19:52:36 GMT, Anthony Scarpino wrote: >> Hi all, >> >> I need a code review of the PEM API. Privacy-Enhanced Mail (PEM) is a >> format for encoding and decoding cryptographic keys and certificates. It >> will be integrated into JDK24 as a Preview Feature. Preview featur

Re: RFR: 8298420: PEM API: Implementation (Preview) [v9]

2024-10-30 Thread Weijun Wang
On Mon, 21 Oct 2024 19:52:36 GMT, Anthony Scarpino wrote: >> Hi all, >> >> I need a code review of the PEM API. Privacy-Enhanced Mail (PEM) is a >> format for encoding and decoding cryptographic keys and certificates. It >> will be integrated into JDK24 as a Preview Feature. Preview featur

Re: RFR: 8298420: PEM API: Implementation (Preview) [v9]

2024-10-29 Thread Weijun Wang
On Mon, 21 Oct 2024 19:52:36 GMT, Anthony Scarpino wrote: >> Hi all, >> >> I need a code review of the PEM API. Privacy-Enhanced Mail (PEM) is a >> format for encoding and decoding cryptographic keys and certificates. It >> will be integrated into JDK24 as a Preview Feature. Preview featur

Re: RFR: 8298420: PEM API: Implementation (Preview) [v9]

2024-10-29 Thread Weijun Wang
On Tue, 30 Jul 2024 19:11:53 GMT, Anthony Scarpino wrote: >> If it isn't used anywhere, then it's probably from an old idea that I didn't >> completely clean up > > This constructor is eventually used by PEMEncoder for KeyPair. Yes if the > private key encoding did have a public key already

Re: RFR: 8298420: PEM API: Implementation (Preview) [v9]

2024-10-29 Thread Weijun Wang
On Mon, 21 Oct 2024 19:52:36 GMT, Anthony Scarpino wrote: >> Hi all, >> >> I need a code review of the PEM API. Privacy-Enhanced Mail (PEM) is a >> format for encoding and decoding cryptographic keys and certificates. It >> will be integrated into JDK24 as a Preview Feature. Preview featur

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

2024-10-29 Thread Weijun Wang
On Mon, 28 Oct 2024 18:55: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: 8338411: Implement JEP 486: Permanently Disable the Security Manager [v4]

2024-10-29 Thread Weijun Wang
On Mon, 28 Oct 2024 21:02:00 GMT, Sean Mullan wrote: >> Sean Mullan has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 175 commits: >> >> - Merge remote-tracking branch 'jdk-sandbox/jep486' into JDK-8338411 >> - Specify that params

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

2024-10-28 Thread Weijun Wang
On Mon, 28 Oct 2024 18:15:52 GMT, Kevin Driver wrote: >> src/java.base/share/classes/javax/crypto/spec/HKDFParameterSpec.java line >> 415: >> >>> 413: >>> 414: /** >>> 415: * Defines the input parameters of an ExtractThenExpand operation >>> as defined >> >> In the class spec. the n

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

2024-10-28 Thread Weijun Wang
On Mon, 21 Oct 2024 18:21:37 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: 8338411: Implement JEP 486: Permanently Disable the Security Manager [v3]

2024-10-25 Thread Weijun Wang
On Fri, 25 Oct 2024 21:14:25 GMT, Sean Mullan wrote: >> src/java.base/share/classes/java/security/SecureClassLoader.java line 1: >> >>> 1: /* >> >> The class spec still mentions "permissions which are retrieved by the system >> policy by default". Shall we remove it? Also, `getPermissions` alw

Re: RFR: 8338411: Implement JEP 486: Permanently Disable the Security Manager [v3]

2024-10-25 Thread Weijun Wang
On Fri, 25 Oct 2024 20:53:23 GMT, Sean Mullan wrote: >> src/java.base/share/classes/java/security/AccessControlContext.java line 141: >> >>> 139: throws AccessControlException >>> 140: { >>> 141: throw new AccessControlException(""); >> >> No message for this exception? > >

Re: RFR: 8338411: Implement JEP 486: Permanently Disable the Security Manager [v3]

2024-10-25 Thread Weijun Wang
On Thu, 24 Oct 2024 13:19:55 GMT, Sean Mullan wrote: >> This is the implementation of JEP 486: Permanently Disable the Security >> Manager. See [JEP 486](https://openjdk.org/jeps/486) for more details. The >> [CSR](https://bugs.openjdk.org/browse/JDK-8338412) describes in detail the >> main ch

Re: RFR: 8342682: Errors related to unused code on Windows after 8339120 in dt_shmem jdwp security and jpackage

2024-10-23 Thread Weijun Wang
On Mon, 21 Oct 2024 14:34:30 GMT, Julian Waters wrote: > After 8339120, gcc began catching many different instances of unused code in > the Windows specific codebase. Some of these seem to be bugs. I've taken the > effort to mark out all the relevant globals and locals that trigger the > unuse

Re: RFR: 8331958: Update PC/SC Lite for Suse Linux to 2.3.0

2024-10-23 Thread Weijun Wang
On Wed, 16 Oct 2024 21:27:51 GMT, Valerie Peng wrote: > Could someone please help review this PR? It updates the PCSC Lite headers > and the relevant files to v2.3.0. > > Thanks! > Valerie Marked as reviewed by weijun (Reviewer). If the upstream file hasn’t changed, that’s fine. I was just cu

Re: RFR: 8298387: Implementing ML-DSA signature algorithm [v7]

2024-10-21 Thread Weijun Wang
On Mon, 21 Oct 2024 13:48:21 GMT, Sean Mullan wrote: >> Ben Perez has updated the pull request incrementally with one additional >> commit since the last revision: >> >> pack in-place and unpack with an offset > > src/java.base/share/classes/sun/security/provider/SunEntries.java line 204: >

Re: RFR: 8298387: Implementing ML-DSA signature algorithm [v8]

2024-10-21 Thread Weijun Wang
On Mon, 21 Oct 2024 20:07:10 GMT, Sean Mullan wrote: >> Ben Perez has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revert "ML-DSA for jarsigner" >> >> This reverts commit cc231109513d0f3a939f0bff92a890ff921d94e0. > > src/java.base/sh

Re: RFR: 8338411: Implement JEP 486: Permanently Disable the Security Manager [v2]

2024-10-21 Thread Weijun Wang
On Fri, 18 Oct 2024 19:03:30 GMT, Sean Mullan wrote: >> This is the implementation of JEP 486: Permanently Disable the Security >> Manager. See [JEP 486](https://openjdk.org/jeps/486) for more details. The >> [CSR](https://bugs.openjdk.org/browse/JDK-8338412) describes in detail the >> main ch

Re: RFR: 8338411: Implement JEP 486: Permanently Disable the Security Manager [v2]

2024-10-21 Thread Weijun Wang
On Fri, 18 Oct 2024 19:52:35 GMT, Sean Mullan wrote: >> I assume for the second one above you mean >> `javax.security.auth.kerberos.ServicePermission`. These classes still have a >> lot of words like "grant" and "trust". I will make some changes to the >> class descriptions of those classes,

Re: RFR: 8342181: Update tests to use stronger Key and Salt size [v3]

2024-10-21 Thread Weijun Wang
On Mon, 21 Oct 2024 12:50:53 GMT, Fernando Guallini wrote: >> Several tests currently use weak key and salt sizes. Since the purpose of >> these tests is not to evaluate weak keys, they can be updated to use >> stronger keys length (2048-bits) and stronger Salt (16 bytes). This PR does >> not

Re: RFR: 8331958: Update PC/SC Lite for Suse Linux to 2.3.0

2024-10-17 Thread Weijun Wang
On Wed, 16 Oct 2024 21:27:51 GMT, Valerie Peng wrote: > Could someone please help review this PR? It updates the PCSC Lite headers > and the relevant files to v2.3.0. > > Thanks! > Valerie I see there is a `COPYING` file in the same directory as the header files. Does it need any update? ---

Re: RFR: 8338411: Implement JEP 486: Permanently Disable the Security Manager

2024-10-17 Thread Weijun Wang
On Wed, 16 Oct 2024 20:51:49 GMT, Sean Mullan wrote: >> src/jdk.security.jgss/share/classes/com/sun/security/jgss/InquireSecContextPermission.java >> line 31: >> >>> 29: >>> 30: /** >>> 31: * This class is for GSS security context permissions. >> >> Why is the content of _this_ class modifie

Re: RFR: 8342442: Static ACVP sample tests [v2]

2024-10-16 Thread Weijun Wang
> Here we have a launcher and several algorithm-specific tests. Users can > populate "internalProjection.json" files generated by NIST's ACVP Server into > the `data` directory and test them with the launcher. > > Currently, only SHA2, SHA3, ML-KEM, and ML-DSA a

RFR: 8342442: Static ACVP sample tests

2024-10-16 Thread Weijun Wang
Here we have a launcher and several algorithm-specific tests. Users can populate "internalProjection.json" files generated by NIST's ACVP Server into the `data` directory and test them with the launcher. Currently, only SHA2, SHA3, ML-KEM, and ML-DSA are supported. - Commit message

Re: RFR: 8338411: Implement JEP 486: Permanently Disable the Security Manager

2024-10-16 Thread Weijun Wang
On Mon, 14 Oct 2024 13:52:24 GMT, Sean Mullan wrote: > This is the implementation of JEP 486: Permanently Disable the Security > Manager. See [JEP 486](https://openjdk.org/jeps/486) for more details. The > [CSR](https://bugs.openjdk.org/browse/JDK-8338412) describes in detail the > main change

Re: RFR: 8313367: SunMSCAPI cannot read Local Computer certs w/o Windows elevation [v6]

2024-10-15 Thread Weijun Wang
On Mon, 16 Sep 2024 21:22:45 GMT, rebarbora-mckvak wrote: >> This fixes the defect described at >> https://bugs.openjdk.org/browse/JDK-8313367 >> >> If the process does not have write permissions, the store is opened as >> read-only (instead of failing). >> >> Please note that permissions to

Re: RFR: 8313367: SunMSCAPI cannot read Local Computer certs w/o Windows elevation [v5]

2024-10-15 Thread Weijun Wang
On Tue, 15 Oct 2024 08:29:28 GMT, rebarbora-mckvak wrote: >> @rebarbora-mckvak Please put the release note here and I can create it. >> Thanks. > > @wangweij, please see the release note above. @rebarbora-mckvak I've added the release note as https://bugs.openjdk.org/browse/JDK-8340661 last mo

Integrated: 8342002: sun/security/tools/keytool/GenKeyPairSigner.java failed due to missing certificate output

2024-10-14 Thread Weijun Wang
On Mon, 14 Oct 2024 13:53:10 GMT, Weijun Wang wrote: > Previous code change for > [JDK-8340327](https://bugs.openjdk.org/browse/JDK-8340327) changed the > display names for all keys with a `NamedParameterSpec` to be the parameter > set name. This test is not updated. > >

RFR: 8342002: sun/security/tools/keytool/GenKeyPairSigner.java failed due to missing certificate output

2024-10-14 Thread Weijun Wang
Previous code change for [JDK-8340327](https://bugs.openjdk.org/browse/JDK-8340327) changed the display names for all keys with a `NamedParameterSpec` to be the parameter set name. This test is not updated. I've filed an enhancement at [JDK-8342062](https://bugs.openjdk.org/browse/JDK-8342062)

Integrated: 8340327: A common framework to support public key algorithms with standard parameter sets

2024-10-11 Thread Weijun Wang
On Tue, 24 Sep 2024 16:34:25 GMT, Weijun Wang wrote: > To prepare for new PQC algorithms like ML-KEM and ML-DSA where there are only > named standardized parameter sets, a common framework is introduced. > > A example of EdDSA implementation using this framework is included as a

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v16]

2024-10-11 Thread Weijun Wang
> To prepare for new PQC algorithms like ML-KEM and ML-DSA where there are only > named standardized parameter sets, a common framework is introduced. > > A example of EdDSA implementation using this framework is included as a test. Weijun Wang has updated the pull request increm

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v10]

2024-10-11 Thread Weijun Wang
On Tue, 8 Oct 2024 20:17:53 GMT, Weijun Wang wrote: >> src/java.base/share/classes/sun/security/provider/NamedSignature.java line >> 196: >> >>> 194: /// This object will be passed into the [#implVerify] method along >>> with the raw key. >>&

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v14]

2024-10-11 Thread Weijun Wang
On Fri, 11 Oct 2024 18:50:39 GMT, Sean Mullan wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> describe a limitation of this framework > > src/java.base/share/classes/sun/security/provi

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v15]

2024-10-11 Thread Weijun Wang
> To prepare for new PQC algorithms like ML-KEM and ML-DSA where there are only > named standardized parameter sets, a common framework is introduced. > > A example of EdDSA implementation using this framework is included as a test. Weijun Wang has updated the pull request increm

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v14]

2024-10-11 Thread Weijun Wang
> To prepare for new PQC algorithms like ML-KEM and ML-DSA where there are only > named standardized parameter sets, a common framework is introduced. > > A example of EdDSA implementation using this framework is included as a test. Weijun Wang has updated the pull request increm

Integrated: 8341792: Fix ExceptionOccurred in java.security.jgss

2024-10-10 Thread Weijun Wang
On Wed, 9 Oct 2024 16:22:13 GMT, Weijun Wang wrote: > Switch to `ExceptionCheck`. > > This is a part of an umbrella bug [JDK-8341542 JNI uses of > ExceptionOccurred() treated as if function returns a > bool](https://bugs.openjdk.org/browse/JDK-8341542). This pull reque

Re: RFR: 8298387: Implementing ML-DSA signature algorithm [v3]

2024-10-10 Thread Weijun Wang
On Tue, 8 Oct 2024 18:16:47 GMT, Ben Perez wrote: >> Java implementation of ML-DSA, the FIPS 204 post-quantum signature scheme >> https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.204.pdf. Depends on >> https://github.com/openjdk/jdk/pull/21167 > > Ben Perez has updated the pull request incremen

Re: RFR: 8341792: Fix ExceptionOccurred in java.security.jgss

2024-10-09 Thread Weijun Wang
On Wed, 9 Oct 2024 17:23:08 GMT, Justin Lu wrote: >> Switch to `ExceptionCheck`. >> >> This is a part of an umbrella bug [JDK-8341542 JNI uses of >> ExceptionOccurred() treated as if function returns a >> bool](https://bugs.openjdk.org/browse/JDK-8341542). > > src/java.security.jgss/macosx/nat

RFR: 8341792: Fix locations in java.security.jgss

2024-10-09 Thread Weijun Wang
Switch to `ExceptionCheck`. This is a part of an umbrella bug [JDK-8341542 JNI uses of ExceptionOccurred() treated as if function returns a bool](https://bugs.openjdk.org/browse/JDK-8341542). - Commit messages: - the fix Changes: https://git.openjdk.org/jdk/pull/21424/files Web

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v13]

2024-10-09 Thread Weijun Wang
> To prepare for new PQC algorithms like ML-KEM and ML-DSA where there are only > named standardized parameter sets, a common framework is introduced. > > A example of EdDSA implementation using this framework is included as a test. Weijun Wang has updated the pull request increm

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v12]

2024-10-09 Thread Weijun Wang
On Tue, 8 Oct 2024 23:43:42 GMT, Weijun Wang wrote: >> To prepare for new PQC algorithms like ML-KEM and ML-DSA where there are >> only named standardized parameter sets, a common framework is introduced. >> >> A example of EdDSA implementation using this framewo

Re: RFR: 8340133: Investigate if the java launcher could give hints about JShell

2024-10-09 Thread Weijun Wang
On Tue, 8 Oct 2024 15:28:17 GMT, Jan Lahoda wrote: > Currently, running `java` without any parameters will lead to an output that > is a full `--help`, which is over 100 lines (on my computer at least), and it > feels overwhelming. And many people might actually want to run JShell/REPL, > not

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v12]

2024-10-08 Thread Weijun Wang
> To prepare for new PQC algorithms like ML-KEM and ML-DSA where there are only > named standardized parameter sets, a common framework is introduced. > > A example of EdDSA implementation using this framework is included as a test. Weijun Wang has updated the pull request increm

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v10]

2024-10-08 Thread Weijun Wang
On Tue, 8 Oct 2024 19:49:53 GMT, Anthony Scarpino wrote: >> Yes, `this.key` is the one inside `PKCS8Key`. >> >> Since EdDSA and XDH, the private key has taken this OCTET in OCTET approach. >> My code is identical to the EdDSA code at >> https://github.com/openjdk/jdk/blob/adca97b659d725b0dd320

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v11]

2024-10-08 Thread Weijun Wang
> To prepare for new PQC algorithms like ML-KEM and ML-DSA where there are only > named standardized parameter sets, a common framework is introduced. > > A example of EdDSA implementation using this framework is included as a test. Weijun Wang has updated the pull request increm

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v10]

2024-10-08 Thread Weijun Wang
On Tue, 8 Oct 2024 19:16:10 GMT, Sean Mullan wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> null check as asserts, and better exception messages > > src/java.base/share

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v10]

2024-10-08 Thread Weijun Wang
On Tue, 8 Oct 2024 19:11:45 GMT, Sean Mullan wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> null check as asserts, and better exception messages > > src/java.base/share

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v10]

2024-10-08 Thread Weijun Wang
On Tue, 8 Oct 2024 18:46:20 GMT, Sean Mullan wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> null check as asserts, and better exception messages > > src/java.base/share

Re: RFR: 8298387: Implementing ML-DSA signature algorithm

2024-10-08 Thread Weijun Wang
On Fri, 4 Oct 2024 20:59:45 GMT, Ben Perez wrote: > Java implementation of ML-DSA, the FIPS 204 post-quantum signature scheme > https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.204.pdf. Depends on > https://github.com/openjdk/jdk/pull/21167 src/java.base/share/classes/sun/security/provider/ML_

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v10]

2024-10-07 Thread Weijun Wang
On Tue, 8 Oct 2024 01:13:17 GMT, Valerie Peng wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> null check as asserts, and better exception messages > > src/java.base/s

Re: RFR: 8331959: Update PKCS#11 Cryptographic Token Interface to v3.1

2024-10-07 Thread Weijun Wang
On Mon, 7 Oct 2024 21:44:45 GMT, Valerie Peng wrote: > Could someone please help review this PR? It updates the PKCS#11 headers and > the relevant files to v3.1. > > Thanks! > Valerie Looks good to me. Thanks. - Marked as reviewed by weijun (Reviewer). PR Review: https://git.ope

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v10]

2024-10-07 Thread Weijun Wang
> To prepare for new PQC algorithms like ML-KEM and ML-DSA where there are only > named standardized parameter sets, a common framework is introduced. > > A example of EdDSA implementation using this framework is included as a test. Weijun Wang has updated the pull request increm

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v6]

2024-10-07 Thread Weijun Wang
On Mon, 7 Oct 2024 16:46:42 GMT, Sean Mullan wrote: >> Thanks for the explanation. > > So maybe you should also throw `AssertionError` if `fname` is `null` to be > consistent. Yes, I can. - PR Review Comment: https://git.openjdk.org/jdk/pull/21167#discussion_r1790714214

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v9]

2024-10-07 Thread Weijun Wang
On Mon, 7 Oct 2024 16:57:56 GMT, Sean Mullan wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> no need for this when there is no ambiguity > > src/java.base/share/classes/sun/security/

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v9]

2024-10-07 Thread Weijun Wang
> To prepare for new PQC algorithms like ML-KEM and ML-DSA where there are only > named standardized parameter sets, a common framework is introduced. > > A example of EdDSA implementation using this framework is included as a test. Weijun Wang has updated the pull request increm

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v6]

2024-10-07 Thread Weijun Wang
On Fri, 4 Oct 2024 20:05:22 GMT, Kevin Driver wrote: >> I think `this` is necessary when there are input arguments having the same >> name as the instance fields. This happens a lot in a constructor when fields >> are being initialized from input arguments. In other methods, it's more >> commo

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v6]

2024-10-07 Thread Weijun Wang
On Fri, 4 Oct 2024 16:56:05 GMT, Kevin Driver wrote: >> Weijun Wang has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains six addi

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v6]

2024-10-07 Thread Weijun Wang
On Fri, 4 Oct 2024 16:47:53 GMT, Kevin Driver wrote: >> Weijun Wang has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains six addi

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v8]

2024-10-04 Thread Weijun Wang
> To prepare for new PQC algorithms like ML-KEM and ML-DSA where there are only > named standardized parameter sets, a common framework is introduced. > > A example of EdDSA implementation using this framework is included as a test. Weijun Wang has updated the pull request increm

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v7]

2024-10-04 Thread Weijun Wang
> To prepare for new PQC algorithms like ML-KEM and ML-DSA where there are only > named standardized parameter sets, a common framework is introduced. > > A example of EdDSA implementation using this framework is included as a test. Weijun Wang has updated the pull request increm

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v6]

2024-10-04 Thread Weijun Wang
On Fri, 4 Oct 2024 16:21:56 GMT, Kevin Driver wrote: >> src/java.base/share/classes/sun/security/provider/NamedKEM.java line 62: >> >>> 60: this.fname = Objects.requireNonNull(fname); >>> 61: if (pnames == null || pnames.length == 0) { >>> 62: throw new AssertionError

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v6]

2024-10-04 Thread Weijun Wang
On Fri, 4 Oct 2024 16:41:14 GMT, Kevin Driver wrote: >> src/java.base/share/classes/sun/security/provider/NamedKeyPairGenerator.java >> line 144: >> >>> 142: /// @return public key and private key (in this order) in raw bytes >>> 143: /// @throws ProviderException if there is an interna

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v6]

2024-10-04 Thread Weijun Wang
On Fri, 4 Oct 2024 16:10:57 GMT, Kevin Driver wrote: >> Weijun Wang has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains six addi

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v6]

2024-10-04 Thread Weijun Wang
On Fri, 4 Oct 2024 13:05:57 GMT, Sean Mullan wrote: >> Weijun Wang has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains six addi

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v6]

2024-10-03 Thread Weijun Wang
On Thu, 3 Oct 2024 20:00:54 GMT, Weijun Wang wrote: >> Ok, but how are you experimenting? These comments aren't using any markdown >> that I can see, and it's rare that we would generate javadoc for internal >> classes. > > I have quite a lot in `NamedK

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v6]

2024-10-03 Thread Weijun Wang
On Thu, 3 Oct 2024 19:55:02 GMT, Sean Mullan wrote: >> I'm trying out the https://openjdk.org/jeps/467 style javadoc. Still, this >> is not public API so I can take the risk for the experiment. > > Ok, but how are you experimenting? These comments aren't using any markdown > that I can see, and

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v6]

2024-10-03 Thread Weijun Wang
On Thu, 3 Oct 2024 19:09:28 GMT, Sean Mullan wrote: >> Weijun Wang has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains six addi

Re: RFR: 8340327: A common framework to support public key algorithms with standard parameter sets [v6]

2024-10-03 Thread Weijun Wang
> To prepare for new PQC algorithms like ML-KEM and ML-DSA where there are only > named standardized parameter sets, a common framework is introduced. > > A example of EdDSA implementation using this framework is included as a test. Weijun Wang has updated the pull request with

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

2024-10-03 Thread Weijun Wang
On Wed, 2 Oct 2024 22:14:39 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: 8309841: Jarsigner should print a warning if an entry is removed

2024-10-02 Thread Weijun Wang
On Fri, 7 Jun 2024 15:11:29 GMT, Weijun Wang wrote: > There ~are two~ is one change~s~: > > 1. In `jarsigner -verify`, check a .SF file contains un-existing entries and > print them out as > > Warning: nonexistent signed entries detected: [a] > > ~2. In `JarSigner:

  1   2   3   4   5   6   7   8   9   10   >