Re: Design review: JEP 273: DRBG-Based SecureRandom Implementations

2016-01-13 Thread Wang Weijun
There's been a long time, the current status is http://cr.openjdk.java.net/~weijun/8051408/webrev.03/ http://cr.openjdk.java.net/~weijun/8051408/webrev.03/specdiff/java/security/package-summary.html Two main changes: 1. s/EntropyInput/EntropySource/g. 2. Two methods in EntropySource, getFullEnt

Re: Design review: JEP 273: DRBG-Based SecureRandom Implementations

2015-11-21 Thread Wang Weijun
> On Nov 20, 2015, at 8:23 AM, Wang Weijun wrote: > >>> 2. For each of these, if you have getInstance(alg, params), there is no >>> getInstance(alg). Obviously, for SecureRandom we need to have both. >> >> Right, this is the first case where we have both variants of getInstance. >> >> Just lo

Re: Design review: JEP 273: DRBG-Based SecureRandom Implementations

2015-11-21 Thread Wang Weijun
> On Nov 21, 2015, at 8:59 AM, Wang Weijun wrote: > > That said, I re-read SP 800-90A again and seems there is a feature I haven't > supported yet. The full generate function is > > Generate_function (state_handle, requested_number_of_bits, > requested_security_strength, > prediction_re

Re: Design review: JEP 273: DRBG-Based SecureRandom Implementations

2015-11-20 Thread Wang Weijun
> On Nov 21, 2015, at 6:46 AM, Anthony Scarpino > wrote: > > On 11/18/2015 05:32 AM, Sean Mullan wrote: >> The getInstance methods can now take a SecureRandomParameterSpec object >> (rather than an AlgorithmParameterSpec). They should throw >> InvalidAlgorithmParameterException (not IllegalArgu

Re: Design review: JEP 273: DRBG-Based SecureRandom Implementations

2015-11-20 Thread Anthony Scarpino
On 11/18/2015 05:32 AM, Sean Mullan wrote: The getInstance methods can now take a SecureRandomParameterSpec object (rather than an AlgorithmParameterSpec). They should throw InvalidAlgorithmParameterException (not IllegalArgumentException) if the parameters are null or not the right type to be co

Re: Design review: JEP 273: DRBG-Based SecureRandom Implementations

2015-11-20 Thread Sean Mullan
On 11/19/2015 07:23 PM, Wang Weijun wrote: On Nov 20, 2015, at 1:11 AM, Sean Mullan wrote: >> >>However, I cannot get it working, and I found difficulties understanding the EngineDescription inner class inside Provider.java. >> >>1. For each engine that can take an extra parameter (not provide

Re: Design review: JEP 273: DRBG-Based SecureRandom Implementations

2015-11-19 Thread Wang Weijun
> On Nov 20, 2015, at 1:11 AM, Sean Mullan wrote: >> >> However, I cannot get it working, and I found difficulties understanding the >> EngineDescription inner class inside Provider.java. >> >> 1. For each engine that can take an extra parameter (not provider) in >> getInstance(), it is alway

Re: Design review: JEP 273: DRBG-Based SecureRandom Implementations

2015-11-19 Thread Sean Mullan
On 11/19/2015 08:41 AM, Wang Weijun wrote: On Nov 18, 2015, at 9:32 PM, Sean Mullan wrote: The getInstance methods can now take a SecureRandomParameterSpec object (rather than an AlgorithmParameterSpec). They should throw InvalidAlgorithmParameterException (not IllegalArgumentException) if

Re: Design review: JEP 273: DRBG-Based SecureRandom Implementations

2015-11-19 Thread Wang Weijun
> On Nov 18, 2015, at 9:32 PM, Sean Mullan wrote: > > The getInstance methods can now take a SecureRandomParameterSpec object > (rather than an AlgorithmParameterSpec). They should throw > InvalidAlgorithmParameterException (not IllegalArgumentException) if the > parameters are null or not th

Re: Design review: JEP 273: DRBG-Based SecureRandom Implementations

2015-11-18 Thread Sean Mullan
A few more comments - The name of the new interface should be SecureRandomParameterSpec instead of SecureRandomSpec. The getInstance methods can now take a SecureRandomParameterSpec object (rather than an AlgorithmParameterSpec). They should throw InvalidAlgorithmParameterException (not Ille

Re: Design review: JEP 273: DRBG-Based SecureRandom Implementations

2015-11-16 Thread Wang Weijun
> On 2015年11月14日, at 上午1:56, Sean Mullan wrote: > > On 11/12/2015 07:58 PM, Wang Weijun wrote: >>> What happens if configure is called more than once, or >>> simultaneously by more than one thread? >> The state is reset. The last one rules. The implementation can be >> made synchronized. >> >>

Re: Design review: JEP 273: DRBG-Based SecureRandom Implementations

2015-11-13 Thread Sean Mullan
On 11/12/2015 07:58 PM, Wang Weijun wrote: What happens if configure is called more than once, or simultaneously by more than one thread? The state is reset. The last one rules. The implementation can be made synchronized. * This method can be called multiple times. After each call, this * {@co

Re: Design review: JEP 273: DRBG-Based SecureRandom Implementations

2015-11-12 Thread Wang Weijun
> On Nov 12, 2015, at 11:23 PM, Sean Mullan wrote: > > Hi Max, > > Still reviewing, but a couple of initial comments .. > > On 11/09/2015 09:54 AM, Wang Weijun wrote: >> Hi All >> >> The following is API/SPI to support NIST 800-90A DRBGs. The JEP is at >> >> https://bugs.openjdk.java.net/b

Re: Design review: JEP 273: DRBG-Based SecureRandom Implementations

2015-11-12 Thread Sean Mullan
Hi Max, Still reviewing, but a couple of initial comments .. On 11/09/2015 09:54 AM, Wang Weijun wrote: Hi All The following is API/SPI to support NIST 800-90A DRBGs. The JEP is at https://bugs.openjdk.java.net/browse/JDK-8051408 Some notes before the text: 1. Mainly, new methods are add

Re: Design review: JEP 273: DRBG-Based SecureRandom Implementations

2015-11-09 Thread Wang Weijun
> On Nov 10, 2015, at 10:13 AM, Bernd wrote: > > Hello, > > The JEP does not specifically talk about getInstanceStrong(). Will it be > possible to configure one of the new algorithms with the existing security > parameter mechanism (and will the default change given that ShA1 has a pretty >

Re: Design review: JEP 273: DRBG-Based SecureRandom Implementations

2015-11-09 Thread Bernd
Hello, The JEP does not specifically talk about getInstanceStrong(). Will it be possible to configure one of the new algorithms with the existing security parameter mechanism (and will the default change given that ShA1 has a pretty narrow state space to generate larger crypto keys. Typo in DrbgS