Skip to content
Snippets Groups Projects
Commit 21be5357 authored by akwizgran's avatar akwizgran
Browse files

Update BTP.md

parent 484c7f7e
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment