[noise] MixKey during initialization

Jason A. Donenfeld Jason at zx2c4.com
Mon Aug 31 06:23:03 PDT 2015


session.Initialize() first calls kernel.Initialize(), which sets k and
n to all zeros. Then it calls kernel.MixKey(). MixKey in turn calls
KDF, which in turn calls GETKEY which in turn calls ENCRYPT.

Because k is all zeros, GETKEY winds up encrypting a block of zeros
using a key of all zeros. The result isn't exactly zero, since with
ChaCha we're having the block counter start at 1, but still, it might
as well be. I seem to remember before you specifying, "If GETKEY is
called and k is empty, return empty." Is this still the current
intention?


More information about the Noise mailing list