<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div><font face="sans-serif">The NONCE_LENGTH I fixed last night in response to JVT comments.  I will do the clone also.  Thanks for the comments!</font></div><div><br></div><div><br></div><div><br></div><div id="composer_signature"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">--Jamil</div><div><br></div><div style="font-size:100%;color:#000000"><!-- originalMessage --><div>-------- Original message --------</div><div>From: Sean Mullan <sean.mullan@oracle.com> </div><div>Date: 4/26/18  10:22 AM  (GMT-08:00) </div><div>To: Jamil Nimeh <jamil.j.nimeh@oracle.com>, OpenJDK Dev list <security-dev@openjdk.java.net> </div><div>Subject: Re: RFR: ChaCha20 and ChaCha20/Poly1305 Cipher implementations </div><div><br></div></div>On 4/26/18 11:57 AM, Sean Mullan wrote:<br>> The ChaCha20ParameterSpec.java file should have an @since 11 annotation <br>> on it.<br><br>Also:<br><br>   65         if (nonce.length == 12) {<br>   66             this.nonce = nonce.clone();<br>   67         } else {<br>   68             throw new IllegalArgumentException(<br>   69                     "Nonce must be 96-bits in length");<br>   70         }<br><br>You should clone nonce before you check the length and check the length <br>on the copy, not the parameter passed in. Also, you should use <br>NONCE_LENGTH instead of 12 since it is already defined as a constant in <br>the class.<br><br>--Sean<br><br>> <br>> --Sean<br>> <br>> On 3/26/18 3:08 PM, Jamil Nimeh wrote:<br>>> Hello all,<br>>><br>>> This is a request for review for the ChaCha20 and ChaCha20-Poly1305 <br>>> cipher implementations.  Links to the webrev and the JEP which <br>>> outlines the characteristics and behavior of the ciphers are listed <br>>> below.<br>>><br>>> http://cr.openjdk.java.net/~jnimeh/reviews/8153028/webrev.01/<br>>> http://openjdk.java.net/jeps/329<br>>><br>>> Thanks,<br>>> --Jamil<br></body></html>