22 lines
584 B
Markdown
22 lines
584 B
Markdown
## 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
|
|
```
|
|
Integers are big endian.
|
|
|
|
## 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. |