Re: RFR: ChaCha20 and ChaCha20/Poly1305 Cipher implementations

2018-05-19 Thread sha . jiang
Hi Jamil, On 19/05/2018 22:40, Jamil Nimeh wrote: Hi John, comments below: On 5/19/2018 1:31 AM, sha.ji...@oracle.com wrote: Hi Jamil, On 19/05/2018 07:27, Jamil Nimeh wrote: Hi John, Yes, the second call must throw IllegalStateException.  See the class description in

Re: RFR: ChaCha20 and ChaCha20/Poly1305 Cipher implementations

2018-05-19 Thread Jamil Nimeh
Hi John, comments below: On 5/19/2018 1:31 AM, sha.ji...@oracle.com wrote: Hi Jamil, On 19/05/2018 07:27, Jamil Nimeh wrote: Hi John, Yes, the second call must throw IllegalStateException.  See the class description in javax.crypto.Cipher where it talks about AEAD modes and AAD

Re: RFR: ChaCha20 and ChaCha20/Poly1305 Cipher implementations

2018-05-19 Thread sha . jiang
Hi Jamil, On 19/05/2018 07:27, Jamil Nimeh wrote: Hi John, Yes, the second call must throw IllegalStateException.  See the class description in javax.crypto.Cipher where it talks about AEAD modes and AAD processing.  It states that all AAD has to be supplied before update and/or doFinal