Bladeren bron

Update 'README.md'

master
Pascal Gloor 5 jaren geleden
bovenliggende
commit
864375d641
1 gewijzigde bestanden met toevoegingen van 12 en 11 verwijderingen
  1. 12
    11
      README.md

+ 12
- 11
README.md Bestand weergeven

@@ -33,7 +33,7 @@ The timestamp is a unixtimestamp represented as a 64 bits signed integer.

### PROOF

The PROOF token proves the origin of the message. It is composed of the hash of the client concatenated with a random nonce generated by the client and encrypted using the client's private key and encoded in base64. It is directly followed by the nonce encoded in base64. The nonce should be 16 octets long and should change for every message sent.
The PROOF token proves the origin and signs the message. It is composed of the hash of the client concatenated with a SHA256 of the message without the TIMESTAMP, PROOF and with a metric value of 0.

### Key=value pairs

@@ -41,6 +41,7 @@ NOTE: All encrypted data is represented as base64.

* rsa: the RSA public key, represented in base64 in a single line.
* nickname: the nickname chosen by the client.
* key: a symetric key encrypted with the target rsa key.
* icon: base64 encoded png.
* hash: SHA256 of the RSA public key.
* chatid: a uuid defining the chat group.
@@ -53,29 +54,29 @@ NOTE: All encrypted data is represented as base64.
### path anouncement and withdrawal

```
<TIMESTAMP> <PROOF> CLIENT ONLINE {rsa, nickname, icon, metric}
<TIMESTAMP> <PROOF> CLIENT UPDATE {nonce, nickname, icon, metric}
<TIMESTAMP> <PROOF> CLIENT OFFLINE
<TIMESTAMP> <PROOF> <MSGHASH> <KEY> CLIENT ONLINE {rsa, nickname, icon, metric}
<TIMESTAMP> <PROOF> <MSGHASH> <KEY> CLIENT UPDATE {nonce, nickname, icon, metric}
<TIMESTAMP> <PROOF> <MSGHASH> <KEY> CLIENT OFFLINE
```

### KEEPALIVE

```
<TIMESTAMP> <PROOF> KEEPALIVE QUERY
<TIMESTAMP> <PROOF> KEEPALIVE RESPONSE
<TIMESTAMP> <PROOF> <MSGHASH> <KEY> KEEPALIVE QUERY
<TIMESTAMP> <PROOF> <MSGHASH> <KEY> KEEPALIVE RESPONSE
```

### MESSAGE

```
<TIMESTAMP> <PROOF> MESSAGE SEND {target_hash, chatid, msgid, message}
<TIMESTAMP> <PROOF> MESSAGE RECV {target_hash, chatid, msgid}
<TIMESTAMP> <PROOF> MESSAGE READ {target_hash, chatid, msgid}
<TIMESTAMP> <PROOF> <MSGHASH> <KEY> MESSAGE SEND {target_hash, chatid, msgid, key, message}
<TIMESTAMP> <PROOF> <MSGHASH> <KEY> MESSAGE RECV {target_hash, chatid, msgid}
<TIMESTAMP> <PROOF> <MSGHASH> <KEY> MESSAGE READ {target_hash, chatid, msgid}
```

### NEIGHBOURS

```
<TIMESTAMP> <PROOF> NEIGHBORS REQUEST # request the neighbours of your neighbour
<TIMESTAMP> <PROOF> NEIGHBORS RESPONSE {neighbour,..} # neighbours list, multiple time the same key
<TIMESTAMP> <PROOF> <MSGHASH> <KEY> NEIGHBORS REQUEST # request the neighbours of your neighbour
<TIMESTAMP> <PROOF> <MSGHASH> <KEY> NEIGHBORS RESPONSE {neighbour,..} # neighbours list, multiple time the same key
```

Laden…
Annuleren
Opslaan