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

2016-01-06 Thread Wang Weijun
> On Jan 6, 2016, at 5:53 PM, e...@zusammenkunft.net wrote: > > Hello, > > Wang Weijun : >>> On Jan 6, 2016, at 3:31 PM, e...@zusammenkunft.net wrote: >>> is the Intention of the default implementation of getFullEntropy to expand >>> a too short array with the DF as well (which is a dangerous t

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

2016-01-06 Thread ecki
Hello, Wang Weijun : >> On Jan 6, 2016, at 3:31 PM, e...@zusammenkunft.net wrote: >> is the Intention of the default implementation of getFullEntropy to expand a >> too short array with the DF as well (which is a dangerous thing to do IMHO) >> or is the conditional conditioning only to condense

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

2016-01-06 Thread Wang Weijun
nd > -- > http://bernd.eckenfels.net > > -Original Message- > From: Wang Weijun > To: Sean Mullan > Cc: OpenJDK Dev list > Sent: Mi., 06 Jan. 2016 6:19 > Subject: Re: Design and impl review: JEP 273: DRBG-Based SecureRandom > Implementations > > >&

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

2016-01-05 Thread ecki
th). It might not be needed hoewever. Bernd -- http://bernd.eckenfels.net -Original Message- From: Wang Weijun To: Sean Mullan Cc: OpenJDK Dev list Sent: Mi., 06 Jan. 2016 6:19 Subject: Re: Design and impl review: JEP 273: DRBG-Based SecureRandom Implementations > On Jan 6,

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

2016-01-05 Thread Wang Weijun
> On Jan 6, 2016, at 12:01 AM, Sean Mullan wrote: > > If you think getFullEntropy is sufficient, then let's just keep the one > method. I thought about this more and we can actually do /** * An interface of a source of entropy input. * * This interface has 2 methods returning byte arrays

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

2016-01-05 Thread Wang Weijun
> On Jan 6, 2016, at 1:21 AM, Sean Mullan wrote: > > Here are some more comments on the API. I will send some comments on the impl > next. > > * DrbgParameters > > 38 * A DRBG mechanism should extend this class. > > Is this sentence necessary? None of the builtin DRBG mechs extend this cla

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

2016-01-05 Thread Sean Mullan
Here are some more comments on the API. I will send some comments on the impl next. * DrbgParameters 38 * A DRBG mechanism should extend this class. Is this sentence necessary? None of the builtin DRBG mechs extend this class. 175 * If this method is not called, the implementat

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

2016-01-05 Thread Sean Mullan
On 01/04/2016 08:17 PM, Wang Weijun wrote: On Jan 5, 2016, at 6:59 AM, Sean Mullan wrote: Here are some more comments on the API: * EntropyInput: 29 * An interface of a source of entropy input. "interface" is implied, so you can just say "A source of entropy input." Also, I think this int

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

2016-01-04 Thread Wang Weijun
> On Jan 5, 2016, at 6:59 AM, Sean Mullan wrote: > > Here are some more comments on the API: > > * EntropyInput: > > 29 * An interface of a source of entropy input. > > "interface" is implied, so you can just say "A source of entropy input." > Also, I think this interface should be called

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

2016-01-04 Thread Sean Mullan
Here are some more comments on the API: * EntropyInput: 29 * An interface of a source of entropy input. "interface" is implied, so you can just say "A source of entropy input." Also, I think this interface should be called "EntropySource". To me, "Input" means the byte array that is alread

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

2015-12-15 Thread Wang Weijun
Webrev updated: http://cr.openjdk.java.net/~weijun/8051408/webrev.02/ http://cr.openjdk.java.net/~weijun/8051408/webrev.02/specdiff/java/security/package-summary.html Changes: 1. DrbgParameters has a Builder now 2. No more default implementation for reseed() 3. Synchronization is now in

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

2015-12-15 Thread Sean Mullan
On 12/15/2015 03:09 AM, Wang Weijun wrote: Good. But the builder will not provide default values so you will see new DrbgParameters.Builder().build().getAlgorithm() == null which means the getters still return requested values. That's fine, this is no different than what the current class

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

2015-12-15 Thread Wang Weijun
Good. But the builder will not provide default values so you will see new DrbgParameters.Builder().build().getAlgorithm() == null which means the getters still return requested values. In this case, the algorithm will only be known after it is used for a specific DRBG, for example, SHA-256 f

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

2015-12-14 Thread Sean Mullan
The DrbgParameters class has 7 parameters, most of which are optional. A typical use case might involve lots of null parameters: DrbgParameters params = new DrbgParameters(null, null, 256, false, false, nonce, null); That seems awkward, and you have be overly careful to map the right value t

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

2015-11-29 Thread Wang Weijun
Minor updates: spec: http://cr.openjdk.java.net/~weijun/8051408/webrev.01/specdiff/java/security/package-summary.html impl: http://cr.openjdk.java.net/~weijun/8051408/webrev.01/ http://javaweb.us.oracle.com/~weijwan/webrev/8051408/webrev/ <<- test/closed Mostly spec. reseed() has no defa

Design and impl review: JEP 273: DRBG-Based SecureRandom Implementations

2015-11-22 Thread Wang Weijun
spec: http://cr.openjdk.java.net/~weijun/8051408/webrev.00/specdiff/java/security/package-summary.html impl: http://cr.openjdk.java.net/~weijun/8051408/webrev.00/ - No more configure(), it's getInstance(alg, SecureRandomParameters) now. - The *Spec class names are now *Parameters. - Overloaded