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

2024-09-13 Thread Weijun Wang
On Fri, 13 Sep 2024 19:39:04 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: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v36]

2024-09-13 Thread Weijun Wang
On Fri, 13 Sep 2024 19:39:04 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: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v37]

2024-09-13 Thread Kevin Driver
> 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](https://github.com/openjdk/jdk/pull/18924). Kevin Driver

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

2024-09-13 Thread Kevin Driver
On Fri, 13 Sep 2024 21:32:10 GMT, Weijun Wang wrote: >> @wangweij: I have changed the wording, though I will leave these >> descriptions in-place. See: >> https://github.com/openjdk/jdk/pull/20301/commits/f513525c78aaf0797446c023329d22559eb39ac1. > > I still think appending to or creating a lis

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

2024-09-13 Thread Weijun Wang
On Fri, 13 Sep 2024 21:40:16 GMT, Kevin Driver wrote: >> You can also append the `object` word here. > > @wangweij: double-check your comment; I see: > > > * Returns a {@code Builder} for building {@code Extract} and > * {@code ExtractThenExpand} objects. I meant "returns a Builder

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

2024-09-13 Thread Kevin Driver
On Fri, 13 Sep 2024 21:33:25 GMT, Weijun Wang wrote: >> @wangweij: Addressed in >> https://github.com/openjdk/jdk/pull/20301/commits/f513525c78aaf0797446c023329d22559eb39ac1. > > You can also append the `object` word here. @wangweij: double-check your comment; I see: * Returns a {@code

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

2024-09-13 Thread Weijun Wang
On Fri, 13 Sep 2024 18:14:23 GMT, Kevin Driver wrote: >> src/java.base/share/classes/javax/crypto/spec/HKDFParameterSpec.java line >> 158: >> >>> 156: * be assembled piece-meal or if part of the IKM is to be >>> supplied by a >>> 157: * hardware crypto device. This method app

Integrated: 8335288: SunPKCS11 initialization will call C_GetMechanismInfo on unsupported mechanisms

2024-09-13 Thread Valerie Peng
On Wed, 17 Jul 2024 00:48:20 GMT, Valerie Peng wrote: > Can someone help review this fix? Changed the required-mechanism check by > checking if the particular mechanism is inside the list of enabled supported > mechanisms. This should be more reliable than calling C_GetMechanismInfo(..) > on t

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

2024-09-13 Thread Kevin Driver
> 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](https://github.com/openjdk/jdk/pull/18924). Kevin Driver

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

2024-09-13 Thread Kevin Driver
On Fri, 13 Sep 2024 15:30:04 GMT, Weijun Wang wrote: >> Kevin Driver has updated the pull request incrementally with one additional >> commit since the last revision: >> >> remove explicit zeroing in favor of finally blocks > > src/java.base/share/classes/javax/crypto/spec/HKDFParameterSpec.j

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

2024-09-13 Thread Kevin Driver
> 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](https://github.com/openjdk/jdk/pull/18924). Kevin Driver

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

2024-09-13 Thread Kevin Driver
On Fri, 13 Sep 2024 16:23:39 GMT, Weijun Wang wrote: >> Kevin Driver has updated the pull request incrementally with one additional >> commit since the last revision: >> >> remove explicit zeroing in favor of finally blocks > > src/java.base/share/classes/javax/crypto/spec/HKDFParameterSpec.j

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

2024-09-13 Thread Kevin Driver
On Fri, 13 Sep 2024 15:30:51 GMT, Weijun Wang wrote: >> Kevin Driver has updated the pull request incrementally with one additional >> commit since the last revision: >> >> remove explicit zeroing in favor of finally blocks > > src/java.base/share/classes/javax/crypto/spec/HKDFParameterSpec.j

Re: RFR: 8309841: Jarsigner should print a warning if an entry is removed [v4]

2024-09-13 Thread Hai-May Chao
On Fri, 13 Sep 2024 16:23:40 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::sign0`, when creat

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

2024-09-13 Thread Kevin Driver
On Thu, 5 Sep 2024 15:12:55 GMT, Viktor Klang wrote: >> Kevin Driver has updated the pull request incrementally with one additional >> commit since the last revision: >> >> change impl class to use byte arrays rather than SecretKey objects where >> possible > > src/java.base/share/classes/co

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

2024-09-13 Thread Kevin Driver
> 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](https://github.com/openjdk/jdk/pull/18924). Kevin Driver

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

2024-09-13 Thread Kevin Driver
On Fri, 13 Sep 2024 15:22:34 GMT, Weijun Wang wrote: >> Updated in >> https://github.com/openjdk/jdk/pull/20301/commits/e7e5b3e5a017c7b7ce6db3c17ea4c1fca27cd901. > > Sorry for another round on this. It's still possible that > `consolidateKeyMaterial` works fine on `ikms` but throws IKE on `salt

Integrated: 8340082: Use inline return tag in java.base

2024-09-13 Thread Joe Darcy
On Fri, 13 Sep 2024 02:47:18 GMT, Joe Darcy wrote: > Candidates for this refactoring were found programmatically; the program to > find candidates is in a comment on the bug. This pull request has now been integrated. Changeset: 89c172ac Author:Joe Darcy URL: https://git.openjdk.or

Re: RFR: 8340082: Use inline return tag in java.base

2024-09-13 Thread Chen Liang
On Fri, 13 Sep 2024 02:47:18 GMT, Joe Darcy wrote: > Candidates for this refactoring were found programmatically; the program to > find candidates is in a comment on the bug. Looks good. It might be feasible to run a more complex tool that analyzes the tokenized javadoc AST from javac as later

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

2024-09-13 Thread Weijun Wang
On Fri, 13 Sep 2024 14:59:10 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: 8340082: Use inline return tag in java.base

2024-09-13 Thread Joe Darcy
On Fri, 13 Sep 2024 13:13:58 GMT, Pavel Rappo wrote: > > This patch only captures one-line returns without extra sentences. Is it > > possible for us to handle slightly more complex documentations like > > `ParameterizedType::getActualTypeArguments`? > > Sure, it is possible. However, there's

Re: RFR: 8340082: Use inline return tag in java.base

2024-09-13 Thread Naoto Sato
On Fri, 13 Sep 2024 02:47:18 GMT, Joe Darcy wrote: > Candidates for this refactoring were found programmatically; the program to > find candidates is in a comment on the bug. `java.nio.charset` and `java.time.format` changes look good - Marked as reviewed by naoto (Reviewer). PR

Re: RFR: 8309841: Jarsigner should print a warning if an entry is removed [v4]

2024-09-13 Thread Weijun Wang
> 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::sign0`, when creating a new .SF file, only include signed > file entries.~ > >

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

2024-09-13 Thread Weijun Wang
On Fri, 13 Sep 2024 14:54:59 GMT, Kevin Driver wrote: >> Now that you have them in `finally`, the cleanup lines you added last time >> can be removed. > > Updated in > https://github.com/openjdk/jdk/pull/20301/commits/e7e5b3e5a017c7b7ce6db3c17ea4c1fca27cd901. Sorry for another round on this. I

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

2024-09-13 Thread Kevin Driver
On Fri, 13 Sep 2024 03:17:42 GMT, Weijun Wang wrote: >> @wangweij: Further changes in >> https://github.com/openjdk/jdk/pull/20301/commits/07480619a0fccc6b862712d015645421d887b984. > > Now that you have them in `finally`, the cleanup lines you added last time > can be removed. Updated in http

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

2024-09-13 Thread Kevin Driver
> 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](https://github.com/openjdk/jdk/pull/18924). Kevin Driver

Re: RFR: 8340082: Use inline return tag in java.base

2024-09-13 Thread Daniel Jeliński
On Fri, 13 Sep 2024 02:47:18 GMT, Joe Darcy wrote: > Candidates for this refactoring were found programmatically; the program to > find candidates is in a comment on the bug. Marked as reviewed by djelinski (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/20981#pullreques

Re: RFR: 8340082: Use inline return tag in java.base

2024-09-13 Thread Pavel Rappo
On Fri, 13 Sep 2024 13:07:03 GMT, Chen Liang wrote: > This patch only captures one-line returns without extra sentences. Is it > possible for us to handle slightly more complex documentations like > `ParameterizedType::getActualTypeArguments`? Sure, it is possible. However, there's a tradeoff

Re: RFR: 8340082: Use inline return tag in java.base

2024-09-13 Thread Chen Liang
On Fri, 13 Sep 2024 02:47:18 GMT, Joe Darcy wrote: > Candidates for this refactoring were found programmatically; the program to > find candidates is in a comment on the bug. This patch only captures one-line returns without extra sentences. Is it possible for us to handle slightly more comple

Re: RFR: 8340082: Use inline return tag in java.base

2024-09-13 Thread Lance Andersen
On Fri, 13 Sep 2024 02:47:18 GMT, Joe Darcy wrote: > Candidates for this refactoring were found programmatically; the program to > find candidates is in a comment on the bug. I went through the changes and they look fine. - Marked as reviewed by lancea (Reviewer). PR Review: http

Re: RFR: 8340082: Use inline return tag in java.base

2024-09-13 Thread Pavel Rappo
On Fri, 13 Sep 2024 02:47:18 GMT, Joe Darcy wrote: > Candidates for this refactoring were found programmatically; the program to > find candidates is in a comment on the bug. Thanks, Joe. This looks good, especially considering that the change was produced with the help of a quick-and-dirty, r

Re: RFR: 8340082: Use inline return tag in java.base

2024-09-13 Thread Pavel Rappo
On Fri, 13 Sep 2024 07:29:00 GMT, ExE Boss wrote: > The old version of the doc comments had a `.` at the end of the first  > sentence: The new version has it too, but in the final, generated form: https://docs.oracle.com/en/java/javase/22/docs/specs/javadoc/doc-comment-spec.html#return `{@retu

Re: RFR: 8340082: Use inline return tag in java.base

2024-09-13 Thread ExE Boss
On Fri, 13 Sep 2024 02:47:18 GMT, Joe Darcy wrote: > Candidates for this refactoring were found programmatically; the program to > find candidates is in a comment on the bug. The old version of the doc comments had a `.` at the end of the first sentence: src/java.base/share/classes/java/io/Obj