From 39a9d2bea8cf354f3f623e6a0b1b68068401b8bf Mon Sep 17 00:00:00 2001 From: trevnoise Date: Thu, 11 May 2017 01:22:38 +0000 Subject: Mention "psk" token earlier --- noise.md | 9 ++++++--- output/noise.html | 7 +++++-- output/noise.pdf | Bin 361916 -> 362053 bytes 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/noise.md b/noise.md index 0d71853..ce931e1 100644 --- a/noise.md +++ b/noise.md @@ -265,7 +265,7 @@ Noise depends on the following **cipher functions**: * **`REKEY(k)`**: Returns a new 32-byte cipher key as a pseudorandom function of `k`. If this function is not specifically defined for some set of cipher functions, then it defaults to returning the first 32 bytes from `ENCRYPT(k, - maxnonce, zerolen, zeros)`, where `MAXNONCE` equals 2^64^-1, `zerolen` is a + maxnonce, zerolen, zeros)`, where `maxnonce` equals 2^64^-1, `zerolen` is a zero-length byte sequence, and `zeros` is a sequence of 32 bytes filled with zeros. @@ -419,6 +419,8 @@ A `SymmetricState` responds to the following methods: * If `HASHLEN` is 64, then truncates `temp_k` to 32 bytes. * Calls `InitializeKey(temp_k)`. +\newpage + * **`EncryptAndHash(plaintext)`**: Sets `ciphertext = EncryptWithAd(h, plaintext)`, calls `MixHash(ciphertext)`, and returns `ciphertext`. Note that if `k` is `empty`, the `EncryptWithAd()` call will set `ciphertext` equal to `plaintext`. @@ -455,8 +457,9 @@ portion of the handshake pattern: * **`initiator`**: A boolean indicating the initiator or responder role. * **`message_patterns`**: A sequence of message patterns. Each message - pattern is a sequence of tokens from the set `("e", "s", "ee", "es", - "se", "ss")`. + pattern is a sequence of tokens from the set `("e", "s", "ee", "es", "se", + "ss")`. (An additional `"psk"` token is introduced in [Section + 9](pre-shared-symmetric-keys), but we defer its explanation until then.) A `HandshakeState` responds to the following methods: diff --git a/output/noise.html b/output/noise.html index 965bacc..cf56b09 100644 --- a/output/noise.html +++ b/output/noise.html @@ -168,7 +168,7 @@

4.3. Hash functions

Noise depends on the following hash function (and associated constants):

@@ -244,6 +244,9 @@
  • If HASHLEN is 64, then truncates temp_k to 32 bytes.
  • Calls InitializeKey(temp_k).
  • + + +