Re: RFR: 8326705: Test CertMsgCheck.java fails to find alert certificate_required

2024-06-05 Thread Anthony Scarpino
On Wed, 5 Jun 2024 19:57:34 GMT, Mark Powers wrote: >> Hi, >> >> I need a review for this simple change to fix a threading problem with the >> test. The server thread was not completing before the check occurred on the >> main thread. The failure showed up in windows and macos, but not linux.

Re: RFR: 8330842: Support AES CBC with Ciphertext Stealing (CTS) in SunPKCS11 [v5]

2024-06-05 Thread Valerie Peng
On Wed, 5 Jun 2024 19:39:06 GMT, Francisco Ferrari Bihurriet wrote: >> src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/Config.java line >> 647: >> >>> 645: return Enum.valueOf(enumClass, value); >>> 646: } catch (IllegalArgumentException ignored) { >>> 647:

Re: RFR: 8330842: Support AES CBC with Ciphertext Stealing (CTS) in SunPKCS11 [v6]

2024-06-05 Thread Valerie Peng
On Wed, 5 Jun 2024 20:19:25 GMT, Francisco Ferrari Bihurriet wrote: >> Hi, >> >> I would like to propose an implementation to support AES CBC with Ciphertext >> Stealing (CTS) in SunPKCS11, according to what has been specified in >> [JDK-8330843 CSR](https://bugs.openjdk.org/browse/JDK-833084

Re: RFR: 8326705: Test CertMsgCheck.java fails to find alert certificate_required

2024-06-05 Thread Mark Powers
On Wed, 5 Jun 2024 02:57:41 GMT, Anthony Scarpino wrote: > Hi, > > I need a review for this simple change to fix a threading problem with the > test. The server thread was not completing before the check occurred on the > main thread. The failure showed up in windows and macos, but not linux.

Re: RFR: 8330842: Support AES CBC with Ciphertext Stealing (CTS) in SunPKCS11 [v5]

2024-06-05 Thread Francisco Ferrari Bihurriet
On Wed, 5 Jun 2024 19:35:45 GMT, Valerie Peng wrote: >> Francisco Ferrari Bihurriet 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 >> 13 additi

Re: RFR: 8330842: Support AES CBC with Ciphertext Stealing (CTS) in SunPKCS11 [v6]

2024-06-05 Thread Francisco Ferrari Bihurriet
> Hi, > > I would like to propose an implementation to support AES CBC with Ciphertext > Stealing (CTS) in SunPKCS11, according to what has been specified in > [JDK-8330843 CSR](https://bugs.openjdk.org/browse/JDK-8330843). > > What follows are implementation notes that describe the most releva

Re: RFR: 8330842: Support AES CBC with Ciphertext Stealing (CTS) in SunPKCS11 [v5]

2024-06-05 Thread Francisco Ferrari Bihurriet
On Wed, 5 Jun 2024 19:50:15 GMT, Valerie Peng wrote: >> Francisco Ferrari Bihurriet 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 >> 13 additi

Re: RFR: 8330842: Support AES CBC with Ciphertext Stealing (CTS) in SunPKCS11 [v5]

2024-06-05 Thread Valerie Peng
On Wed, 5 Jun 2024 19:06:14 GMT, Francisco Ferrari Bihurriet wrote: >> Hi, >> >> I would like to propose an implementation to support AES CBC with Ciphertext >> Stealing (CTS) in SunPKCS11, according to what has been specified in >> [JDK-8330843 CSR](https://bugs.openjdk.org/browse/JDK-833084

Re: RFR: 8330842: Support AES CBC with Ciphertext Stealing (CTS) in SunPKCS11 [v5]

2024-06-05 Thread Francisco Ferrari Bihurriet
On Wed, 5 Jun 2024 19:21:02 GMT, Valerie Peng wrote: >> Francisco Ferrari Bihurriet 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 >> 13 additi

Re: RFR: 8330842: Support AES CBC with Ciphertext Stealing (CTS) in SunPKCS11 [v5]

2024-06-05 Thread Valerie Peng
On Wed, 5 Jun 2024 19:06:14 GMT, Francisco Ferrari Bihurriet wrote: >> Hi, >> >> I would like to propose an implementation to support AES CBC with Ciphertext >> Stealing (CTS) in SunPKCS11, according to what has been specified in >> [JDK-8330843 CSR](https://bugs.openjdk.org/browse/JDK-833084

Re: RFR: 8330842: Support AES CBC with Ciphertext Stealing (CTS) in SunPKCS11 [v5]

2024-06-05 Thread Valerie Peng
On Wed, 5 Jun 2024 19:06:14 GMT, Francisco Ferrari Bihurriet wrote: >> Hi, >> >> I would like to propose an implementation to support AES CBC with Ciphertext >> Stealing (CTS) in SunPKCS11, according to what has been specified in >> [JDK-8330843 CSR](https://bugs.openjdk.org/browse/JDK-833084

Re: RFR: 8330842: Support AES CBC with Ciphertext Stealing (CTS) in SunPKCS11 [v3]

2024-06-05 Thread Francisco Ferrari Bihurriet
On Wed, 5 Jun 2024 18:27:11 GMT, Valerie Peng wrote: >> The code does not assume that `outOfs = 0` but that the content of `out` >> (between 0 and `outOfs`) is previously generated output of a multi-part >> operation (not the whole output but one that is multiple of the block size). >> `outOfs

Re: RFR: 8330842: Support AES CBC with Ciphertext Stealing (CTS) in SunPKCS11 [v4]

2024-06-05 Thread Francisco Ferrari Bihurriet
On Wed, 5 Jun 2024 18:28:07 GMT, Valerie Peng wrote: >> Looks good to me. > > Yes, I prefer this. Done in 5fe83b20a10002c4c48e90321e69629bbd0aa9ff. - PR Review Comment: https://git.openjdk.org/jdk/pull/18898#discussion_r1628299501

Re: RFR: 8330842: Support AES CBC with Ciphertext Stealing (CTS) in SunPKCS11 [v5]

2024-06-05 Thread Francisco Ferrari Bihurriet
> Hi, > > I would like to propose an implementation to support AES CBC with Ciphertext > Stealing (CTS) in SunPKCS11, according to what has been specified in > [JDK-8330843 CSR](https://bugs.openjdk.org/browse/JDK-8330843). > > What follows are implementation notes that describe the most releva

Re: RFR: 8330842: Support AES CBC with Ciphertext Stealing (CTS) in SunPKCS11 [v3]

2024-06-05 Thread Martin Balao
On Wed, 5 Jun 2024 18:27:11 GMT, Valerie Peng wrote: >> The code does not assume that `outOfs = 0` but that the content of `out` >> (between 0 and `outOfs`) is previously generated output of a multi-part >> operation (not the whole output but one that is multiple of the block size). >> `outOfs

Re: RFR: 8330842: Support AES CBC with Ciphertext Stealing (CTS) in SunPKCS11 [v4]

2024-06-05 Thread Valerie Peng
On Wed, 5 Jun 2024 14:21:57 GMT, Martin Balao wrote: >> What I like about this suggestion is that it allows unifying the repeated >> logic: the two blocks inside `if (encrypt)` and the corresponding `else` >> would become almost identical, allowing an additional abstraction. How about >> the f

Re: RFR: 8330842: Support AES CBC with Ciphertext Stealing (CTS) in SunPKCS11 [v4]

2024-06-05 Thread Valerie Peng
On Tue, 4 Jun 2024 18:00:27 GMT, Francisco Ferrari Bihurriet wrote: >> Hi, >> >> I would like to propose an implementation to support AES CBC with Ciphertext >> Stealing (CTS) in SunPKCS11, according to what has been specified in >> [JDK-8330843 CSR](https://bugs.openjdk.org/browse/JDK-833084

Re: RFR: 8330842: Support AES CBC with Ciphertext Stealing (CTS) in SunPKCS11 [v3]

2024-06-05 Thread Valerie Peng
On Wed, 5 Jun 2024 03:27:51 GMT, Martin Balao wrote: >> I understand the meaning of `k`. It seems that the code here assumes `outOfs >> = 0`, but this may not always be the case when operating on user-supplied >> output byte array, right? > > The code does not assume that `outOfs = 0` but that

RFR: 8326705: Test CertMsgCheck.java fails to find alert certificate_required

2024-06-05 Thread Anthony Scarpino
Hi, I need a review for this simple change to fix a threading problem with the test. The server thread was not completing before the check occurred on the main thread. The failure showed up in windows and macos, but not linux. With this fix, running 100 times, windows & macos showed no failur

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

2024-06-05 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). Kevin Driver has updated the pull request with a new target base due to a merge or a rebase.

Re: RFR: 8330842: Support AES CBC with Ciphertext Stealing (CTS) in SunPKCS11 [v4]

2024-06-05 Thread Martin Balao
On Wed, 5 Jun 2024 12:54:45 GMT, Francisco Ferrari Bihurriet wrote: >> I have no personal preference, but would suggest that if we change it to cut >> the pad, we keep the decryption case aligned. > > What I like about this suggestion is that it allows unifying the repeated > logic: the two bl

Re: RFR: 8330842: Support AES CBC with Ciphertext Stealing (CTS) in SunPKCS11 [v4]

2024-06-05 Thread Francisco Ferrari Bihurriet
On Wed, 5 Jun 2024 03:49:31 GMT, Martin Balao wrote: >> src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11Cipher.java >> line 1183: >> >>> 1181: // Temporary buffer to the penultimate block >>> 1182: ciphertextBuf.put(start, tmp); >>> 1183:

Re: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v12]

2024-06-05 Thread Tobias Hartmann
On Wed, 22 May 2024 14:19:36 GMT, Volodymyr Paprotski wrote: >> Volodymyr Paprotski 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 17 >> additi