[noise] Reworking PSK usage
Trevor Perrin
trevp at trevp.net
Tue May 2 13:50:07 PDT 2017
On Tue, May 2, 2017 at 7:56 PM, Jason A. Donenfeld <Jason at zx2c4.com> wrote:
>
> MixKeyAndHash(psk):
> ck, k, temp = HKDF(ck, psk)
> MixHash(temp)
>
>
> Actually, my suggestion and what I placed in that pull request is:
>
> MixKeyAndHash(psk):
> ck, temp, k = HKDF(ck, psk)
> MixHash(temp)
>
> The reason is that there are cases in which k is overwritten again without
> being used.
That makes sense - h is always used after every token, but sometimes k isn't.
Trevor
More information about the Noise
mailing list