Re: RFR: ChaCha20 and ChaCha20/Poly1305 Cipher implementations

2018-03-26 Thread Thomas Lußnig
Hi, this choice is even better than the current version. Because than the default system wide secure random provider is used. Gruß Thomas On 3/27/2018 12:23 AM, Jamil Nimeh wrote: Another thought on #2: Another way we could go with this is to create a new SecureRandom() or use

RFR: ChaCha20 and ChaCha20/Poly1305 Cipher implementations

2018-03-26 Thread Jamil Nimeh
Hello all, This is a request for review for the ChaCha20 and ChaCha20-Poly1305 cipher implementations. Links to the webrev and the JEP which outlines the characteristics and behavior of the ciphers are listed below. http://cr.openjdk.java.net/~jnimeh/reviews/8153028/webrev.01/

Re: RFR: ChaCha20 and ChaCha20/Poly1305 Cipher implementations

2018-03-26 Thread Jamil Nimeh
Hi Thomas, thanks for the feedback 1. Were there guidelines?  Not really, though I looked at other parameter definitions in com.sun.crypto.provider and tried to follow along the same lines that they do.  One thing that should be changed is the LINE_SEP assignment shouldn't be an

Re: RFR: ChaCha20 and ChaCha20/Poly1305 Cipher implementations

2018-03-26 Thread Jamil Nimeh
Another thought on #2: Another way we could go with this is to create a new SecureRandom() or use JceSecurity.RANDOM when the random parameter is null. That would make init(op, key, random) and init(op, key) behave the same when random is null. You would always get a random nonce in these

Re: RFR: ChaCha20 and ChaCha20/Poly1305 Cipher implementations

2018-03-26 Thread Thomas Lußnig
Hi Jamil, 1) where there any guidelines about how the engineToString should be formatted ? I ask because i wondering why we need two new lines with access to the System property. If it is represented as single line json no need to line break would be needed. Gruß Thomas /** * Creates a