aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortrevp <github@trevp.net>2015-11-09 17:50:08 -0800
committertrevp <github@trevp.net>2015-11-09 17:50:08 -0800
commit719d7f065cf132ff4d59f8ac0f81b1ce00559ffd (patch)
treeb76bc7ff03b9dc0ea434aebb102d90a13f59a057
parentrevision -> 17 (diff)
downloadnoise-719d7f065cf132ff4d59f8ac0f81b1ce00559ffd.tar.xz
noise-719d7f065cf132ff4d59f8ac0f81b1ce00559ffd.zip
Clarify HKDF input lengths.
-rw-r--r--noise.md12
1 files changed, 7 insertions, 5 deletions
diff --git a/noise.md b/noise.md
index 7cf3122..473bde5 100644
--- a/noise.md
+++ b/noise.md
@@ -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