Skip to content

Commit

Permalink
texy
Browse files Browse the repository at this point in the history
  • Loading branch information
ahdinosaur committed Dec 7, 2023
1 parent 296dfed commit 03d68fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ We start with a length chunk, seen here in plaintext:

The length is a 16-bits unsigned integer (encoded as big-endian).

(The maximum content length is $`2^16 - 1`$ bytes or 65,535 bytes or 65.535 Kb)
(The maximum content length is $`2^{16} - 1`$ bytes or 65,535 bytes or 65.535 Kb)

A length of `0` is not a valid length. (And instead refers to a [End-of-stream chunk](#end-of-stream-chunk))

Expand All @@ -106,9 +106,9 @@ We encrypt and authenticate the length with ChaCha20-Poly1305 into the following

A content chunk is simply the content.

From $`0`$ to $`2^16 - 1`$ (65,535) bytes. (Matching the length in the previous chunk.)
From $`0`$ to $`2^{16} - 1`$ (65,535) bytes. (Matching the length in the previous chunk.)

If content is larger than 2^16 - 1 (65,535) bytes, split the bytes across multiple chunks.
If content is larger than $`2^{16} - 1`$ (65,535) bytes, split the bytes across multiple chunks.

```txt
Variable length content (plaintext):
Expand Down

0 comments on commit 03d68fd

Please sign in to comment.