Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement [v15]

2025-01-10 Thread Sean Mullan
On Thu, 9 Jan 2025 19:06:26 GMT, Weijun Wang wrote: >> Allow `Generic` as an algorithm in the `KeyAgreement::generateSecret(alg)` >> method. > > Weijun Wang has updated the pull request incrementally with one additional > commit since the last revision: > > "secret-key" to "secret key" Mark

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement [v15]

2025-01-09 Thread Weijun Wang
> Allow `Generic` as an algorithm in the `KeyAgreement::generateSecret(alg)` > method. Weijun Wang has updated the pull request incrementally with one additional commit since the last revision: "secret-key" to "secret key" - Changes: - all: https://git.openjdk.org/jdk/pull/226

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement [v14]

2025-01-09 Thread Weijun Wang
> Allow `Generic` as an algorithm in the `KeyAgreement::generateSecret(alg)` > method. Weijun Wang has updated the pull request incrementally with one additional commit since the last revision: not supported - Changes: - all: https://git.openjdk.org/jdk/pull/22650/files - ne

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement [v13]

2025-01-08 Thread Weijun Wang
> Allow `Generic` as an algorithm in the `KeyAgreement::generateSecret(alg)` > method. Weijun Wang has updated the pull request incrementally with one additional commit since the last revision: better exception messages - Changes: - all: https://git.openjdk.org/jdk/pull/22650/

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement [v2]

2025-01-08 Thread Weijun Wang
On Fri, 3 Jan 2025 20:54:06 GMT, Sean Mullan wrote: >> Do you suggest me adding the same to `encapsulate` and `decapsulate` of >> `KEM` in this PR? I can update the title to include it. > > Yes. Finally, no. KEM changes will be in https://github.com/openjdk/jdk/pull/22929. - PR Re

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement [v12]

2025-01-08 Thread Sean Mullan
On Tue, 7 Jan 2025 19:55:34 GMT, Weijun Wang wrote: >> Allow `Generic` as an algorithm in the `KeyAgreement::generateSecret(alg)` >> method. > > Weijun Wang has updated the pull request incrementally with one additional > commit since the last revision: > > address Sean's comments A few mor

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement [v12]

2025-01-07 Thread Weijun Wang
> Allow `Generic` as an algorithm in the `KeyAgreement::generateSecret(alg)` > method. Weijun Wang has updated the pull request incrementally with one additional commit since the last revision: address Sean's comments - Changes: - all: https://git.openjdk.org/jdk/pull/22650/fi

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement [v11]

2025-01-07 Thread Sean Mullan
On Tue, 7 Jan 2025 14:58:22 GMT, Weijun Wang wrote: >> Allow `Generic` as an algorithm in the `KeyAgreement::generateSecret(alg)` >> method. > > Weijun Wang has updated the pull request incrementally with one additional > commit since the last revision: > > cleaner test and harden p11-nss-se

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement [v11]

2025-01-07 Thread Weijun Wang
> Allow `Generic` as an algorithm in the `KeyAgreement::generateSecret(alg)` > method. Weijun Wang has updated the pull request incrementally with one additional commit since the last revision: cleaner test and harden p11-nss-sensitive.txt - Changes: - all: https://git.openjdk

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement [v10]

2025-01-06 Thread Weijun Wang
> Allow `Generic` as an algorithm in the `KeyAgreement::generateSecret(alg)` > method. Weijun Wang has updated the pull request incrementally with one additional commit since the last revision: only trim secrets when it's for TlsPremasterSecret - Changes: - all: https://git.op

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement [v9]

2025-01-06 Thread Weijun Wang
> Allow `Generic` as an algorithm in the `KeyAgreement::generateSecret(alg)` > method. Weijun Wang has updated the pull request incrementally with one additional commit since the last revision: add spec links - Changes: - all: https://git.openjdk.org/jdk/pull/22650/files - n

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement [v7]

2025-01-06 Thread Weijun Wang
On Fri, 3 Jan 2025 22:11:18 GMT, Weijun Wang wrote: >> Allow `Generic` as an algorithm in the `KeyAgreement::generateSecret(alg)` >> method. > > Weijun Wang has updated the pull request incrementally with one additional > commit since the last revision: > > Add KDF and KDFSpi I've reverted

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement [v8]

2025-01-06 Thread Weijun Wang
> Allow `Generic` as an algorithm in the `KeyAgreement::generateSecret(alg)` > method. Weijun Wang has updated the pull request incrementally with one additional commit since the last revision: revert unrelated changes - Changes: - all: https://git.openjdk.org/jdk/pull/22650/f

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement and KEM [v7]

2025-01-06 Thread Sean Mullan
On Fri, 3 Jan 2025 22:12:12 GMT, Weijun Wang wrote: > I've modified too many files and I think they should belong to > https://bugs.openjdk.org/browse/JDK-8346736. We should only touch KEM and > KeyAgreement here. Makes sense. - PR Comment: https://git.openjdk.org/jdk/pull/22650#

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement and KEM [v7]

2025-01-03 Thread Weijun Wang
On Fri, 3 Jan 2025 22:11:18 GMT, Weijun Wang wrote: >> Allow `Generic` as an algorithm in the `KeyAgreement::generateSecret(alg)` >> method. > > Weijun Wang has updated the pull request incrementally with one additional > commit since the last revision: > > Add KDF and KDFSpi I've modified

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement and KEM [v7]

2025-01-03 Thread Weijun Wang
> Allow `Generic` as an algorithm in the `KeyAgreement::generateSecret(alg)` > method. Weijun Wang has updated the pull request incrementally with one additional commit since the last revision: Add KDF and KDFSpi - Changes: - all: https://git.openjdk.org/jdk/pull/22650/files

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement and KEM [v6]

2025-01-03 Thread Weijun Wang
> Allow `Generic` as an algorithm in the `KeyAgreement::generateSecret(alg)` > method. Weijun Wang has updated the pull request incrementally with one additional commit since the last revision: missed one place - Changes: - all: https://git.openjdk.org/jdk/pull/22650/files -

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement and KEM [v5]

2025-01-03 Thread Weijun Wang
> Allow `Generic` as an algorithm in the `KeyAgreement::generateSecret(alg)` > method. Weijun Wang has updated the pull request incrementally with one additional commit since the last revision: more places - Changes: - all: https://git.openjdk.org/jdk/pull/22650/files - new:

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement and KEM [v4]

2025-01-03 Thread Weijun Wang
On Fri, 3 Jan 2025 20:55:33 GMT, Sean Mullan wrote: > Can you also replace the link in `Key.getAlgorithm` with the new section you > will be adding? OK, and maybe more. I just found `SecretKeySpec` and `EncodedKeySpec`. - PR Comment: https://git.openjdk.org/jdk/pull/22650#issuecom

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement [v2]

2025-01-03 Thread Sean Mullan
On Fri, 3 Jan 2025 16:55:09 GMT, Weijun Wang wrote: >> Good idea. > > Do you suggest me adding the same to `encapsulate` and `decapsulate` of `KEM` > in this PR? I can update the title to include it. Yes. - PR Review Comment: https://git.openjdk.org/jdk/pull/22650#discussion_r1902

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement [v4]

2025-01-03 Thread Sean Mullan
On Fri, 3 Jan 2025 18:43:12 GMT, Weijun Wang wrote: >> Allow `Generic` as an algorithm in the `KeyAgreement::generateSecret(alg)` >> method. > > Weijun Wang has updated the pull request incrementally with one additional > commit since the last revision: > > new year 2025 Can you also replac

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement [v4]

2025-01-03 Thread Weijun Wang
> Allow `Generic` as an algorithm in the `KeyAgreement::generateSecret(alg)` > method. Weijun Wang has updated the pull request incrementally with one additional commit since the last revision: new year 2025 - Changes: - all: https://git.openjdk.org/jdk/pull/22650/files - ne

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement [v2]

2025-01-03 Thread Weijun Wang
On Fri, 3 Jan 2025 16:17:43 GMT, Weijun Wang wrote: >> src/java.base/share/classes/javax/crypto/KeyAgreement.java line 662: >> >>> 660: * subsequent operations. >>> 661: * >>> 662: * @param algorithm the requested secret-key algorithm. This is >> >> Did you consider instead refer

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement [v3]

2025-01-03 Thread Weijun Wang
> Allow `Generic` as an algorithm in the `KeyAgreement::generateSecret(alg)` > method. 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 four

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement [v2]

2025-01-03 Thread Weijun Wang
On Fri, 3 Jan 2025 13:41:05 GMT, Sean Mullan wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add key size adjustment clarification > > src/java.base/share/classes/javax/crypto/KeyAgreement.java line 662: > >> 660:

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement [v2]

2025-01-03 Thread Sean Mullan
On Wed, 18 Dec 2024 22:33:28 GMT, Weijun Wang wrote: >> Allow `Generic` as an algorithm in the `KeyAgreement::generateSecret(alg)` >> method. > > Weijun Wang has updated the pull request incrementally with one additional > commit since the last revision: > > add key size adjustment clarifica

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement [v2]

2024-12-19 Thread Michael StJohns
I ran into a few problems related to a similar approach in my own code.  Basically, PKCS12 requires some sort of OID/Algorithm identifier to map to/from the algorithm name.    Anything that you allow for here ideally needs to be supported by KeyStore there. It doesn't help that PKCS11 has CKK_G

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement [v2]

2024-12-18 Thread Weijun Wang
> Allow `Generic` as an algorithm in the `KeyAgreement::generateSecret(alg)` > method. Weijun Wang has updated the pull request incrementally with one additional commit since the last revision: add key size adjustment clarification - Changes: - all: https://git.openjdk.org/jdk

Re: RFR: 8189441: Define algorithm names for keys derived from KeyAgreement

2024-12-09 Thread Weijun Wang
On Mon, 9 Dec 2024 17:26:49 GMT, Weijun Wang wrote: > Allow `Generic` as an algorithm in the `KeyAgreement::generateSecret(alg)` > method. The comparison of algorithm names was inconsistent, sometimes `equals` and sometimes `equalsIgnoreCase`. This is even more suspicious in the `P11KeyAgreem