Integrated: 8294987: Streamline DerOutputStream write

2022-10-07 Thread Weijun Wang
On Fri, 7 Oct 2022 15:47:49 GMT, Weijun Wang wrote: > Return `this` in various output methods so you can write something like > > new DerOutputStream().putInteger(1) > .putOctetString("12345".getBytes(StandardCharsets.UTF_8)) > .write(AlgorithmId.get("ed25

Re: RFR: 8294987: Streamline DerOutputStream write [v2]

2022-10-07 Thread Anthony Scarpino
On Fri, 7 Oct 2022 19:52:15 GMT, Weijun Wang wrote: >> Return `this` in various output methods so you can write something like >> >> new DerOutputStream().putInteger(1) >> .putOctetString("12345".getBytes(StandardCharsets.UTF_8)) >> .write(AlgorithmId.get(

Re: RFR: 8294987: Streamline DerOutputStream write [v2]

2022-10-07 Thread Weijun Wang
> Return `this` in various output methods so you can write something like > > new DerOutputStream().putInteger(1) > .putOctetString("12345".getBytes(StandardCharsets.UTF_8)) > .write(AlgorithmId.get("ed25519")) > .writeImplicit((byte)0x80, ne

Re: RFR: 8294987: Streamline DerOutputStream write

2022-10-07 Thread Weijun Wang
On Fri, 7 Oct 2022 18:39:48 GMT, Anthony Scarpino wrote: > There are a number of methods that call 'write()' then call 'return this;' > they could just be 'return write()', but if that's a style you prefer, that > is fine. Not my style. Will fix them. - PR: https://git.openjdk.or

Re: RFR: 8294987: Streamline DerOutputStream write

2022-10-07 Thread Anthony Scarpino
On Fri, 7 Oct 2022 15:47:49 GMT, Weijun Wang wrote: > Return `this` in various output methods so you can write something like > > new DerOutputStream().putInteger(1) > .putOctetString("12345".getBytes(StandardCharsets.UTF_8)) > .write(AlgorithmId.get("ed25

Re: RFR: 8294731: Improve multiplicative inverse for secp256r1 implementation [v2]

2022-10-07 Thread Xue-Lei Andrew Fan
On Thu, 6 Oct 2022 18:33:51 GMT, Xue-Lei Andrew Fan wrote: >> It seems to me the scalar multiplication enhancement should be done first, >> or maybe integrated with this fix. >> Do you have a bug number for the scalar multiplication enhancement? > >> It seems to me the scalar multiplication enha

Re: RFR: 8294987: Streamline DerOutputStream write

2022-10-07 Thread Jamil Nimeh
On Fri, 7 Oct 2022 15:47:49 GMT, Weijun Wang wrote: > Return `this` in various output methods so you can write something like > > new DerOutputStream().putInteger(1) > .putOctetString("12345".getBytes(StandardCharsets.UTF_8)) > .write(AlgorithmId.get("ed25

Re: RFR: 8294731: Improve multiplicative inverse for secp256r1 implementation [v2]

2022-10-07 Thread Daniel Jeliński
On Wed, 5 Oct 2022 17:37:25 GMT, Xue-Lei Andrew Fan wrote: >> Hi, >> >> May I have this patch reviewed? >> >> This is one of a few steps to improve the EC performance. The multiplicative >> inverse implementation could be improved for better performance. >> >> For secp256r1 prime p, the curr

RFR: 8294987: Streamline DerOutputStream write

2022-10-07 Thread Weijun Wang
Return `this` in various output methods so you can write something like new DerOutputStream().putInteger(1) .putOctetString("12345".getBytes(StandardCharsets.UTF_8)) .write(AlgorithmId.get("ed25519")) .writeImplicit((byte)0x80, new DerOutput

Re: RFR: 8294731: Improve multiplicative inverse for secp256r1 implementation [v2]

2022-10-07 Thread Ferenc Rakoczi
On Fri, 7 Oct 2022 15:37:24 GMT, Daniel Jeliński wrote: >>> It seems to me the scalar multiplication enhancement should be done first, >>> or maybe integrated with this fix. Do you have a bug number for the scalar >>> multiplication enhancement? >> >> I did not file the scalar multiplication e

Re: RFR: 8294731: Improve multiplicative inverse for secp256r1 implementation [v2]

2022-10-07 Thread Daniel Jeliński
On Thu, 6 Oct 2022 18:33:51 GMT, Xue-Lei Andrew Fan wrote: >> It seems to me the scalar multiplication enhancement should be done first, >> or maybe integrated with this fix. >> Do you have a bug number for the scalar multiplication enhancement? > >> It seems to me the scalar multiplication enha

Re: RFR: 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni [v2]

2022-10-07 Thread Alan Bateman
On Mon, 26 Sep 2022 16:51:36 GMT, Michael Ernst wrote: >> 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni > > Michael Ernst has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains six commits: > > - Reinstate t

Re: RFR: 8294731: Improve multiplicative inverse for secp256r1 implementation [v2]

2022-10-07 Thread Ferenc Rakoczi
On Wed, 5 Oct 2022 17:37:25 GMT, Xue-Lei Andrew Fan wrote: >> Hi, >> >> May I have this patch reviewed? >> >> This is one of a few steps to improve the EC performance. The multiplicative >> inverse implementation could be improved for better performance. >> >> For secp256r1 prime p, the curr

Re: RFR: 8294906: Memory leak in PKCS11 TLS server [v2]

2022-10-07 Thread Daniel Jeliński
> C_DeriveKey with mechanisms `CKM_*_KEY_AND_MAC_DERIVE` always returns mac > keys, even if macBits is zero. These keys must be free'd when no longer > needed. > > Verified that: > - SSL server configured with PKCS11-NSS provider leaks memory without this > patch, does not leak memory with this

Re: RFR: 8294906: Memory leak in PKCS11 TLS server

2022-10-07 Thread Daniel Jeliński
On Thu, 6 Oct 2022 13:27:23 GMT, Daniel Jeliński wrote: > C_DeriveKey with mechanisms `CKM_*_KEY_AND_MAC_DERIVE` always returns mac > keys, even if macBits is zero. These keys must be free'd when no longer > needed. > > Verified that: > - SSL server configured with PKCS11-NSS provider leaks me