[noise] [Noise] Go implementation
jonathan at titanous.com
Sun Jul 6 13:12:49 PDT 2014
On Jul 6, 2014, at 12:45 PM, Trevor Perrin <trevp at trevp.net> wrote:
> The KDF logic in your deriveKey() could be clearer.
I refactored it a bit last night:
Is there anything specific that you think would make it clearer? It’s probably a bit more complex than it needs to be because I’m also using this implementation as an excuse to golf memory allocations in Go.
> Also, KDFNum is just a uint8
Ah, that makes way more sense. Maybe annotate it as (byte)kdf_num to make that more clear?
> and I think incrementing it every time won't work if the
> Crypter is reused, maybe the spec should be clearer on kdf_num in some
I’m also saving cv and cc in the Crypter. I’ve started implementing pipes, I’ll see how explicitly passing the state around vs keeping it in the Crypter struct feels. There might also be some middle ground…
BTW, why does kdf_num start at 2 for pipes?
More information about the Noise