aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortrevp <github@trevp.net>2015-11-12 17:56:22 -0800
committertrevp <github@trevp.net>2015-11-12 17:56:22 -0800
commitb45b671d64669f169ecc5142ea38c1758709a376 (patch)
tree926d2564a414d63258ea95af54a0f15ef6f92951
parentAdd mailing list (diff)
downloadnoise-b45b671d64669f169ecc5142ea38c1758709a376.tar.xz
noise-b45b671d64669f169ecc5142ea38c1758709a376.zip
Clarify conditions on empty / non-empty (s,e,rs,re).
-rw-r--r--noise.md19
1 files changed, 11 insertions, 8 deletions
diff --git a/noise.md b/noise.md
index 473bde5..cf7d0eb 100644
--- a/noise.md
+++ b/noise.md
@@ -4,7 +4,7 @@ Noise v0 (draft)
* **Author:** Trevor Perrin (noise @ trevp.net)
* **Date:** 2015-11-8
- * **Revision:** 17 (work in progress)
+ * **Revision:** 18 (work in progress)
* **Copyright:** This document is placed in the public domain
1. Introduction
@@ -261,10 +261,12 @@ A `HandshakeState` responds to the following methods:
* Fetches the next message pattern and sequentially processes each token:
- * For "e": Sets `e = GENERATE_KEYPAIR()`. Appends
- `EncryptAndHash(e.public_key)` to the buffer.
+ * For "e": Sets `e = GENERATE_KEYPAIR()`, overwriting any previous
+ value for `e`. Appends `EncryptAndHash(e.public_key)` to the buffer.
- * For "s": Appends `EncryptAndHash(s.public_key)` to the buffer.
+ * For "s": Appends `EncryptAndHash(s.public_key)` to the buffer. On
+ encountering this token `s` must be non-empty, otherwise the pattern is
+ invalid and this function aborts.
* For "dh*xy*": Calls `MixKey(DH(x, ry))`.
@@ -281,11 +283,12 @@ A `HandshakeState` responds to the following methods:
* For "e": Sets `data` to the next `DHLEN + 16` bytes of the message if `has_key ==
True`, or to the next `DHLEN` bytes otherwise. Sets `re` to
- `DecryptAndHash(data)`.
+ `DecryptAndHash(data)`, overwriting any previous value for `re`.
- * For "s": Sets `data` to the next `DHLEN + 16` bytes of the message if `has_key ==
- True`, or to the next `DHLEN` bytes otherwise. Sets `rs` to
- `DecryptAndHash(data)`.
+ * For "s": Sets `data` to the next `DHLEN + 16` bytes of the message if
+ `has_key == True`, or to the next `DHLEN` bytes otherwise. Sets `rs`
+ to `DecryptAndHash(data)`. On encountering this token `rs` must be
+ empty, otherwise the pattern is invalid and this function aborts.
* For "dh*xy*": Calls `MixKey(DH(y, rx))`.