Re: RFR: 8253299: Manifest bytes are read twice when verifying a signed JAR

2020-11-18 Thread Lance Andersen
On Wed, 18 Nov 2020 21:59:01 GMT, Hai-May Chao wrote: > Small change to retrieve the raw bytes of manifest during verifying signed > JAR. The changes looks good. I am assuming that we do not need an additional test for this and if so, please add a noreg label such as noreg-trivial to the bug

Re: RFR: 8253299: Manifest bytes are read twice when verifying a signed JAR

2020-11-18 Thread Claes Redestad
On Wed, 18 Nov 2020 21:59:01 GMT, Hai-May Chao wrote: > Small change to retrieve the raw bytes of manifest during verifying signed > JAR. This seems like a good optimization. I think comparing the manifest name case insensitively might be preferable - e.g. using String.equalsIgnoreCase - but

Re: RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators [v3]

2020-11-18 Thread Remi Forax
An honest question, why do we need so many interfaces for the different categories of RandomGenerator ? My fear is that we are encoding the state of our knowledge of the different kinds of random generators now so it will not be pretty in the future when new categories of random generator are

RFR: 8253299: Manifest bytes are read twice when verifying a signed JAR

2020-11-18 Thread Hai-May Chao
Small change to retrieve the raw bytes of manifest during verifying signed JAR. - Commit messages: - 8253299: Manifest bytes are read twice when verifying a signed JAR Changes: https://git.openjdk.java.net/jdk/pull/1299/files Webrev:

Re: RFR: 8256523: Streamline Java SHA2 implementation

2020-11-18 Thread Valerie Peng
On Wed, 18 Nov 2020 08:29:49 GMT, Aleksey Shipilev wrote: > Current `sun/security/provider/SHA2` implementation is written with lots of > small method invocations on the fastpath in `implCompress0`. Normally it does > not matter much, because compilers are able to inline through it, and then

Re: RFR: 8256507: Add a micro benchmark for JDK-8153005 [v2]

2020-11-18 Thread Weijun Wang
> This is a micro benchmark for various algorithm settings of PKCS keystores. > Strong for new algorithms and weak for old ones. Different iteration counts > are tried. The result should show that the current setting (strong1) is > more efficient than old setting (weak5). Weijun Wang

Re: RFR: 8256507: Add a micro benchmark for JDK-8153005 [v2]

2020-11-18 Thread Weijun Wang
On Wed, 18 Nov 2020 13:50:14 GMT, Aleksey Shipilev wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> not static anymore > > I think the benchmark can be simplified. New commit. No more static fields. Thanks.

Re: RFR: 8202343: Disable TLS 1.0 and 1.1 [v2]

2020-11-18 Thread Sean Mullan
On Wed, 18 Nov 2020 15:45:02 GMT, Sean Coffey wrote: >> Sean Mullan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> More test changes. > > test/lib/jdk/test/lib/security/SecurityUtils.java line 64: > >> 62: } >> 63: >> 64:

Re: RFR: 8256507: Add a micro benchmark for JDK-8153005

2020-11-18 Thread Aleksey Shipilev
On Wed, 18 Nov 2020 14:49:54 GMT, Weijun Wang wrote: >> test/micro/org/openjdk/bench/java/security/PKCS12KeyStores.java line 65: >> >>> 63: } >>> 64: >>> 65: static { >> >> Move these to >> >> @Setup >> public void setup() throws Exception { >> ... >> } >> >> This would save you

Re: RFR: 8202343: Disable TLS 1.0 and 1.1 [v2]

2020-11-18 Thread Sean Coffey
On Tue, 17 Nov 2020 17:55:19 GMT, Sean Mullan wrote: >> This change disables the TLSv1 and TLSv1.1 protocols by adding them to the >> jdk.tls.disabledAlgorithms security property in the java.security file. >> These protocols use weak algorithms and are being deprecated by the IETF. >> They

Re: RFR: 8256507: Add a micro benchmark for JDK-8153005

2020-11-18 Thread Weijun Wang
On Wed, 18 Nov 2020 13:46:04 GMT, Aleksey Shipilev wrote: >> This is a micro benchmark for various algorithm settings of PKCS keystores. >> Strong for new algorithms and weak for old ones. Different iteration counts >> are tried. The result should show that the current setting (strong1) is

Re: RFR: 8256507: Add a micro benchmark for JDK-8153005

2020-11-18 Thread Aleksey Shipilev
On Tue, 17 Nov 2020 21:46:38 GMT, Weijun Wang wrote: > This is a micro benchmark for various algorithm settings of PKCS keystores. > Strong for new algorithms and weak for old ones. Different iteration counts > are tried. The result should show that the current setting (strong1) is > more

RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators

2020-11-18 Thread Jim Laskey
This PR is to introduce a new random number API for the JDK. The primary API is found in RandomGenerator and RandomGeneratorFactory. Further description can be found in the JEP https://openjdk.java.net/jeps/356 . javadoc can be found at

Re: RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators [v3]

2020-11-18 Thread Jim Laskey
On Wed, 18 Nov 2020 13:18:30 GMT, Jim Laskey wrote: >> I am unsure if the intent is also to support external libraries providing >> `RandomGenerator` implementations. Currently there is an implicit contract >> for properties (reflectively invoking a method returning a map with a set of >>

Re: RFR: 8248862: Implement Enhanced Pseudo-Random Number Generators [v3]

2020-11-18 Thread Jim Laskey
On Wed, 18 Nov 2020 00:51:43 GMT, Paul Sandoz wrote: >> Jim Laskey has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 40 commits: >> >> - Merge branch 'master' into 8248862 >> - 8248862: Implement Enhanced Pseudo-Random Number

Withdrawn: 8248862: Implement Enhanced Pseudo-Random Number Generators

2020-11-18 Thread Jim Laskey
On Tue, 17 Nov 2020 19:58:47 GMT, Jim Laskey wrote: > This PR is to introduce a new random number API for the JDK. The primary API > is found in RandomGenerator and RandomGeneratorFactory. Further description > can be found in the JEP https://openjdk.java.net/jeps/356 . This pull request has

Integrated: 8256363: Define toString() for MGF1ParameterSpec

2020-11-18 Thread Weijun Wang
On Fri, 13 Nov 2020 21:13:54 GMT, Weijun Wang wrote: > Without this method, `PSSParameterSpec::toString` shows something like: > MD: SHA-256 > MGF: java.security.spec.MGF1ParameterSpec@77b52d12 > SaltLength: 32 > TrailerField: 1 > This is ugly. > > Noreg-trivial. This pull request has now been

Re: RFR: 8256363: Define toString() for MGF1ParameterSpec [v3]

2020-11-18 Thread Sean Mullan
On Tue, 17 Nov 2020 15:37:18 GMT, Weijun Wang wrote: >> Without this method, `PSSParameterSpec::toString` shows something like: >> MD: SHA-256 >> MGF: java.security.spec.MGF1ParameterSpec@77b52d12 >> SaltLength: 32 >> TrailerField: 1 >> This is ugly. >> >> Noreg-trivial. > > Weijun Wang has

RFR: 8256523: Streamline Java SHA2 implementation

2020-11-18 Thread Aleksey Shipilev
Current `sun/security/provider/SHA2` implementation is written with lots of small method invocations on the fastpath in `implCompress0`. Normally it does not matter much, because compilers are able to inline through it, and then some compilers even intrinsify the entire `implCompress0`. But it