diff options
author | 2015-11-09 17:50:08 -0800 | |
---|---|---|
committer | 2015-11-09 17:50:08 -0800 | |
commit | 719d7f065cf132ff4d59f8ac0f81b1ce00559ffd (patch) | |
tree | b76bc7ff03b9dc0ea434aebb102d90a13f59a057 | |
parent | revision -> 17 (diff) | |
download | noise-719d7f065cf132ff4d59f8ac0f81b1ce00559ffd.tar.xz noise-719d7f065cf132ff4d59f8ac0f81b1ce00559ffd.zip |
Clarify HKDF input lengths.
-rw-r--r-- | noise.md | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -117,11 +117,13 @@ Noise depends on the following **hash function** (and associated constants): Noise defines an additional function based on the above `HASH` function. The `||` operator indicates concatentation of byte sequences: - * **`HKDF(chaining_key, input_key_material)`**: Sets the value `temp_key = - HMAC-HASH(chaining_key, input_key_material)`. Sets the value `output1 = - HMAC-HASH(temp_key, 0x01)`. Sets the value `output2 = HMAC-HASH(temp_key, - output1 || 0x02)`. These three values are all `HASHLEN` bytes in length. - Returns the pair (`output1`, `output2`). + * **`HKDF(chaining_key, input_key_material)`**: Takes a `chaining_key` which + is `HASHLEN` bytes in length, and an `input_key_material` byte sequence + which is either `DHLEN` bytes in length or zero bytes in length. Sets the + value `temp_key = HMAC-HASH(chaining_key, input_key_material)`. Sets the + value `output1 = HMAC-HASH(temp_key, 0x01)`. Sets the value `output2 = + HMAC-HASH(temp_key, output1 || 0x02)`. These three values are all `HASHLEN` + bytes in length. Returns the pair (`output1`, `output2`). 4.2. The `CipherState` object |