Re: RFR: 8319332: Security properties files inclusion [v19]

2024-09-16 Thread Martin Balao
On Thu, 5 Sep 2024 20:20:28 GMT, Sean Mullan wrote: >> I don't like the silent mode. If no one uses that key name, then everything >> is fine anyway. Otherwise, if someone really sets it, it's very likely they >> will want to read it somewhere and expect a non `null` value. >> >> Can we just s

Re: RFR: 8319332: Security properties files inclusion [v20]

2024-09-16 Thread Weijun Wang
On Wed, 21 Aug 2024 17:50:26 GMT, Francisco Ferrari Bihurriet wrote: >> The implementation of this proposal is based on the requirements, >> specification and design choices described in the [JDK-8319332] ticket and >> its respective CSR [JDK-8319333]. What follows are implementation notes >>

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

2024-09-16 Thread Weijun Wang
On Mon, 16 Sep 2024 19:02:18 GMT, Kevin Driver wrote: >> src/java.base/share/classes/javax/crypto/KDFSpi.java line 95: >> >>> 93: * If the required parameters were not supplied and can be >>> generated by >>> 94: * the {@code KDF} object, the generated parameters are returned; >>> 95:

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

2024-09-16 Thread Weijun Wang
On Mon, 16 Sep 2024 19:17:14 GMT, Kevin Driver wrote: >> Consequently, there are other spacing/formatting changes in this diff. > > Fixed an IDE formatting error in > https://github.com/openjdk/jdk/pull/20301/commits/6e9a70311873c6c3977314165db713e30b1814e0. Thanks. We can continue with (1a) an

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

2024-09-16 Thread Weijun Wang
On Mon, 16 Sep 2024 19:06:48 GMT, Kevin Driver wrote: >> src/java.base/share/classes/javax/crypto/KDF.java line 670: >> >>> 668: } >>> 669: } >>> 670: throw new InvalidAlgorithmParameterException( >> >> Should this ever happen? We already made sure `firstPairOfSpiAnd

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

2024-09-16 Thread rebarbora-mckvak
> 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 use a certificate in a local machine store > must be granted - in a m

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

2024-09-16 Thread Sean Mullan
On Wed, 11 Sep 2024 21:50:52 GMT, Kevin Driver wrote: >> src/java.base/share/classes/com/sun/crypto/provider/HkdfKeyDerivation.java >> line 148: >> >>> 146: // JDK 17 >>> 147: // Also, JEP 305 came out in JDK 14, so we can't declare a >>> variable >>> 148: // in instanc

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

2024-09-16 Thread rebarbora-mckvak
On Wed, 10 Apr 2024 21:10:16 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: 8319332: Security properties files inclusion [v19]

2024-09-16 Thread Martin Balao
On Fri, 16 Aug 2024 16:13:17 GMT, Weijun Wang wrote: >> Francisco Ferrari Bihurriet has updated the pull request incrementally with >> one additional commit since the last revision: >> >> Code review and additional changes >> >> Throw an IllegalArgumentException exception if Security.get

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

2024-09-16 Thread Kevin Driver
On Mon, 16 Sep 2024 17:34:50 GMT, Weijun Wang wrote: >> It is intended to refer to the pair/combination of algorithm and parameters. >> This wording was chosen by another reviewer. > > It that reviewer was me, I'm sorry I changed my mind. The current sentence is > a little misleading IMO. Will

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

2024-09-16 Thread Kevin Driver
On Mon, 16 Sep 2024 17:28:11 GMT, Weijun Wang wrote: >> `@see DPS` is also present in the header/javadoc for `getProviderName` >> currently. I don't think I understand that part of your comment. >> >> The intent is to refer the reader to the *entire* DPS selection of the class >> specification

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

2024-09-16 Thread Kevin Driver
On Mon, 16 Sep 2024 19:07:46 GMT, Kevin Driver wrote: >> I've addressed (1b) (`serviceIterator`) and (3) of your above statements >> here: >> https://github.com/openjdk/jdk/pull/20301/commits/ea5ba798819568ca86d639ba6c7a9489d4e66c95. > > Consequently, there are other spacing/formatting changes

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

2024-09-16 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) [v37]

2024-09-16 Thread Kevin Driver
On Mon, 16 Sep 2024 13:12:30 GMT, Weijun Wang wrote: >> Kevin Driver has updated the pull request incrementally with one additional >> commit since the last revision: >> >> remove unused debug field > > src/java.base/share/classes/javax/crypto/KDF.java line 670: > >> 668: } >> 66

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

2024-09-16 Thread Kevin Driver
On Sat, 14 Sep 2024 22:39:18 GMT, Weijun Wang wrote: >> Kevin Driver has updated the pull request incrementally with one additional >> commit since the last revision: >> >> refine wording on DPS getInstance with params exception > > src/java.base/share/classes/javax/crypto/KDF.java line 345:

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

2024-09-16 Thread Kevin Driver
On Mon, 16 Sep 2024 19:04:33 GMT, Kevin Driver wrote: >> For (2), I'll see if the another reviewer has a comment. >> For (3), my IDE automatically indents 8 chars. It's IntelliJ IDEA of 2024. > > I've addressed (1b) (`serviceIterator`) and (3) of your above statements > here: > https://github.c

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

2024-09-16 Thread Kevin Driver
On Mon, 16 Sep 2024 16:42:15 GMT, Kevin Driver wrote: >> src/java.base/share/classes/javax/crypto/KDF.java line 207: >> >>> 205: * Returns a {@code KDF} object that implements the specified >>> algorithm. >>> 206: * >>> 207: * @see Delayed Provider >>> Selection >> >> Put `@see

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

2024-09-16 Thread Kevin Driver
On Mon, 16 Sep 2024 17:43:15 GMT, Weijun Wang wrote: >> For (2), the name `Delegate` was chosen by another reviewer. >> >> For (3), we need a valid IDE formatting spec. In 2024, we should not be >> manually indenting. I'll attempt to find a way to specify this in IntelliJ's >> config. > > For

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

2024-09-16 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) [v37]

2024-09-16 Thread Weijun Wang
On Mon, 16 Sep 2024 17:06:26 GMT, Kevin Driver wrote: >> src/java.base/share/classes/javax/crypto/KDF.java line 1: >> >>> 1: /* >> >> I have some overall comments on the implementation of this class: >> >> 1. If I understand correctly, whether DPS is completed depends only on >> whether `pair

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

2024-09-16 Thread Weijun Wang
On Mon, 16 Sep 2024 16:59:15 GMT, Kevin Driver wrote: >> src/java.base/share/classes/javax/crypto/KDF.java line 426: >> >>> 424: * @throws InvalidAlgorithmParameterException >>> 425: * if the specified provider does not support a {@code KDFSpi} >>> 426: * implementation fo

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

2024-09-16 Thread Weijun Wang
On Mon, 16 Sep 2024 16:36:24 GMT, Kevin Driver wrote: >> src/java.base/share/classes/javax/crypto/KDF.java line 194: >> >>> 192: * otherwise {@code null} is returned. >>> 193: * >>> 194: * @see Delayed Provider >>> Selection >> >> Why `@see DPS`? The paragraph above has nothing

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

2024-09-16 Thread Kevin Driver
On Mon, 16 Sep 2024 12:59:28 GMT, Weijun Wang wrote: >> Kevin Driver has updated the pull request incrementally with one additional >> commit since the last revision: >> >> remove unused debug field > > src/java.base/share/classes/javax/crypto/KDF.java line 1: > >> 1: /* > > I have some ove

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

2024-09-16 Thread Kevin Driver
On Sat, 14 Sep 2024 22:40:15 GMT, Weijun Wang wrote: >> Kevin Driver has updated the pull request incrementally with one additional >> commit since the last revision: >> >> refine wording on DPS getInstance with params exception > > src/java.base/share/classes/javax/crypto/KDF.java line 426:

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

2024-09-16 Thread Kevin Driver
On Sat, 14 Sep 2024 22:27:36 GMT, Weijun Wang wrote: >> Kevin Driver has updated the pull request incrementally with one additional >> commit since the last revision: >> >> refine wording on DPS getInstance with params exception > > src/java.base/share/classes/javax/crypto/KDF.java line 207:

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

2024-09-16 Thread Kevin Driver
On Sat, 14 Sep 2024 22:11:21 GMT, Weijun Wang wrote: >> Kevin Driver has updated the pull request incrementally with one additional >> commit since the last revision: >> >> refine wording on DPS getInstance with params exception > > src/java.base/share/classes/javax/crypto/KDF.java line 194:

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

2024-09-16 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) [v37]

2024-09-16 Thread Weijun Wang
On Fri, 13 Sep 2024 22:36:15 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-16 Thread Weijun Wang
On Fri, 13 Sep 2024 22:36:15 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