[noise] Comments on revision 29

Jason A. Donenfeld Jason at zx2c4.com
Fri May 20 18:48:24 PDT 2016


On Sat, May 21, 2016 at 3:42 AM, Trevor Perrin <trevp at trevp.net> wrote:
>> * Section 5.2 says that "if protocol_name is less than or equal to
>> HASHLEN bytes in length, sets h equal to protocol_name with zero bytes
>> appended to make HASHLEN bytes. Otherwise sets h =
>> HASH(protocol_name)." Could this be simplified to always set h =
>> HASH(protocol_name)?
>
> If you have a short protocol name you could skip the hash, which isn't
> much savings but is something.
>
> Since either way here is fine, we should probably just leave it as-is.

And, importantly, if performance is an issue, HASH(protocol_name) is
pre-computable.


More information about the Noise mailing list