pixelflut-udp/spec.md

22 lines
584 B
Markdown
Raw Permalink Normal View History

2021-11-18 00:17:29 +00:00
## Unencrypted
The packet contains 6-byte set instructions. There may be multiple instructions, concatenated together.
An instruction is:
```
12 bits - x
12 bits - y
24 bits - rgb
```
2021-11-21 17:13:32 +00:00
Integers are big endian.
2021-11-18 00:17:29 +00:00
## Encrypted
The encrypted protocol works by encapsulating an unencrypted packet.
The format is as follows:
```
32 bytes - An X25519 public key.
24 bytes - Cipher nonce.
16 bytes - MAC
rest - Ciphertext
```
Please note that all operations are being done with the [Monocypher](https://monocypher.org) library.
Implementations using other libraries may be incompatible.