From 0cb8cb51ff098796c42af6b6be5f8958879f39b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= Date: Wed, 16 May 2018 18:56:32 -0400 Subject: [PATCH] Update Protocol --- Protocol.md | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/Protocol.md b/Protocol.md index a3888ab5..2eaf56df 100644 --- a/Protocol.md +++ b/Protocol.md @@ -59,19 +59,23 @@ certificate. The account archive is an encrypted JSON object with the following structure: -`{`\ -`    "ringAccountKey": (PEM-encoded account private key string),`\ -`    "ringAccountCert": (PEM-encoded account certificate string),`\ -`    "ringAccountCRL": (PEM-encoded account CRL string)`\ -`}` +``` +{ +    "ringAccountKey": (PEM-encoded account private key string), +    "ringAccountCert": (PEM-encoded account certificate string), +    "ringAccountCRL": (PEM-encoded account CRL string) +} +``` The JSON object can contain additional implementation-defined key-value pairs. Implementation-defined key names shouldn't start with "ring". The string JSON object is encrypted using a key defined as : -`salt = PIN + timestamp`\ -`key = argon2(password, salt)` +``` +salt = PIN + timestamp +key = argon2(password, salt) +``` Where PIN is a random 32bits number in hexadecimal form, "+" is string concatenation, timestamp is the current UNIX timestamp divided by 1200 @@ -127,10 +131,11 @@ format. An ICE message is a chunk of binary data, following This protocol is a compound of msgpack values, successively packed in this order: -`* an integer giving the version of ICE message format protocol used for the rest of the data. Current defined protocol version is `**`1`**`.`\ -`* a 2-elements array of strings of the ICE local session ufrag and the ICE local session password`\ -`* an integer giving the number of components in the ICE session`\ -`* an array of string, of the previous number entries, where each string describe the ICE candidate, formated as an "a=" line (without the "a=" header) described in `[`rfc5245,` + +* an integer giving the version of ICE message format protocol used for the rest of the data. Current defined protocol version is `**`1`**`. +*  a 2-elements array of strings of the ICE local session ufrag and the ICE local session password +*  an integer giving the number of components in the ICE session +*  an array of string, of the previous number entries, where each string describe the ICE candidate, formated as an "a=" line (without the "a=" header) described in `[`rfc5245,` `section` `4.3`](https://tools.ietf.org/html/rfc5245#page-26) - **Sending the Answer**