Add 'spec.md'
parent
bbc222d793
commit
f2dd0ff0ec
|
@ -0,0 +1,21 @@
|
|||
## 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
|
||||
```
|
||||
|
||||
## 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.
|
Loading…
Reference in New Issue