diff --git a/protocols/BTP.md b/protocols/BTP.md index 1e19987c7b10277e636157acf4c1ed4295aa4503..ebecb72b0bb26cf8208f2fa5351fe6fdfeecedd8 100644 --- a/protocols/BTP.md +++ b/protocols/BTP.md @@ -238,7 +238,7 @@ A stream consists of three parts: a **pseudo-random tag**, a **stream header**, Each stream starts with a pseudo-random tag TAG\_LEN bytes long. (*Note:* In the current version of the protocol, TAG\_LEN = 16.) The recipient calculates the same tag in advance and uses it to recognise which sender the stream comes from and which incoming header key should be used for the stream. -The tag for the i<sup>th</sup> stream from a given sender to a given recipient in a given time period is the first TAG\_LEN bytes of PRF(k, int\_16(PROTOCOL\_VERSION) || int\_64(i)), where k is the sender's outgoing tag key (which is also the recipient's incoming tag key) and PROTOCOL\_VERSION is 4 for the current version of BTP. Streams are counted from zero in each time period. +The tag for the i<sup>th</sup> stream from a given sender to a given recipient in a given time period is the first TAG\_LEN bytes of PRF(k, int\_16(protocol\_version) || int\_64(i)), where k is the sender's outgoing tag key (which is also the recipient's incoming tag key) and protocol\_version is 4 for the current version of BTP. Streams are counted from zero in each time period. ### 3.2 Stream Headers @@ -246,7 +246,7 @@ The pseudo-random tag is followed by the stream header, which has the following - nonce = R(NONCE\_LEN) -- stream\_header\_plaintext = int\_16(PROTOCOL\_VERSION) || int\_64(stream\_number) || ephemeral\_cipher\_key +- stream\_header\_plaintext = int\_16(protocol\_version) || int\_64(stream\_number) || ephemeral\_cipher\_key - stream\_header = nonce || ENC(outgoing\_header\_key, nonce, stream\_header\_plaintext)