[noise] New branch: hkdf

Trevor Perrin trevp at trevp.net
Mon Oct 12 21:15:36 PDT 2015


On Mon, Oct 12, 2015 at 2:10 PM, Jason A. Donenfeld <Jason at zx2c4.com> wrote:
>> Split(): Creates two child CipherState objects by calling HKDF(ck, empty)
>> where empty is a zero-length byte sequence.
>
> When the keyed mode of blake2b(key, data) is used instead of
> HMAC-SHA2-256(key, data), and when data = zero length empty, this
> simply amounts to hashing a block of zeros:
>
>     memset(block, 0, BLAKE2B_BLOCKBYTES);
>     memcpy(block, key, keylen);
>     blake2b_update(state, block, BLAKE2B_BLOCKBYTES);
>
> Thus, for using blake2b with HKDF, I will replace:
>
>     temp = KDF(chaining_key, empty zero byte sequence)
>
> With:
>
>     temp = HASH(chaining_key)

it's simpler to not special-case the key-derivation in Split(), and
just use the same HKDF function.

Trevor


More information about the Noise mailing list