|
@@ -8,14 +8,14 @@ Commonly used **API** among different dependencies. For example **key-exchange-s
|
8
|
8
|
|
9
|
9
|
## Web-Client 🦘
|
10
|
10
|
|
11
|
|
-It's a client that exchange keys between meeting moderator and participants.
|
12
|
|
-To achieve solid security used blockchain as a trust point for establishing secure channels between ```moderator``` and ```participant```. Each user in a blockchain has an ```ED25519``` PublicKey. For creating a secure channel **Diffie–Hellman** algorithm is used, provided by [Dalek cryptography](https://github.com/dalek-cryptography). Unfortunately, it's not possible to exchange keys with ```ED25519``` keys, because it is using a ```Edwards``` point, and for algorithm needs a ```Montgomery``` point. For this purpose, conversion happened [here](https://github.com/Relayz-io/near-client/blob/376708def420a158b3ca4e5af2aff2e380fd58af/src/crypto/dhx.rs#L168).
|
|
11
|
+The web-client handles the exchange of keys between the meeting moderator and participants.
|
|
12
|
+The client leverages blockchain's inherent security model by using it as a trust anchor (instead of any centralized authority or CA) for establishing secure channels between ```moderator``` and ```participant```. Each user in a blockchain has an ```ED25519``` PublicKey. In order to create a secure channel the **Diffie–Hellman** key exchange algorithm is used, provided by [Dalek cryptography](https://github.com/dalek-cryptography). Unfortunately, it's not possible to exchange keys with ```ED25519``` keys, because it uses an ```Edwards``` point, and the algorithm needs a ```Montgomery``` point. For this purpose, conversion happens [here](https://github.com/Relayz-io/near-client/blob/376708def420a158b3ca4e5af2aff2e380fd58af/src/crypto/dhx.rs#L168).
|
13
|
13
|
|
14
|
|
-> NOTE! Used the maximum key length for each algorithm
|
|
14
|
+> NOTE! Our implementation uses the maximum key length available for each algorithm
|
15
|
15
|
|
16
|
|
-Then we have proper keys for the **Diffie–Hellman** exchange. Let's create out secret with [dhx](https://github.com/Relayz-io/key-exchange-client/blob/develop/web-client/src/crypto.rs#LL8C5-L8C5). After we need to provide a uniformly distributed secret key. For this purpose used a ***_KDF_*** algorithm [```blake3```](https://github.com/BLAKE3-team/BLAKE3). [Here](https://github.com/Relayz-io/key-exchange-client/blob/86450c015c2370742c765d94629ae97837224eee/web-client/src/crypto.rs#L18) is an implementation.
|
|
16
|
+Then we have proper keys for the **Diffie–Hellman** exchange. We derive the secret with [dhx](https://github.com/Relayz-io/key-exchange-client/blob/develop/web-client/src/crypto.rs#LL8C5-L8C5). Once that's been established we need to provide a uniformly distributed secret key. For this purpose we use the ***_KDF_*** algorithm [```blake3```](https://github.com/BLAKE3-team/BLAKE3). [Here](https://github.com/Relayz-io/key-exchange-client/blob/86450c015c2370742c765d94629ae97837224eee/web-client/src/crypto.rs#L18) is the source code pointer to our implementation.
|
17
|
17
|
|
18
|
|
-The next stage is to pass a randomly generated key in a secure way for each participant. To do this let's encrypt _generated key_ with a just generated after ***_KDF_*** secure key, that is unique for each ```participant = moderator``` pair. Encrypt randomly generated key by [ChaCha20](https://rust-random.github.io/rand/rand_chacha/struct.ChaCha20Rng.html) with a [AES-GCM](https://github.com/Relayz-io/key-exchange-client/blob/86450c015c2370742c765d94629ae97837224eee/web-client/src/crypto.rs#L30). That's all.
|
|
18
|
+The next stage is to distribute a randomly generated key securely to each participant. To accomplish this we encrypt the _generated key_ with the ***_KDF_*** generated private key that is unique for each ```participant = moderator``` pair. We do this by encrypting the randomly generated key using [ChaCha20](https://rust-random.github.io/rand/rand_chacha/struct.ChaCha20Rng.html) with [AES-GCM](https://github.com/Relayz-io/key-exchange-client/blob/86450c015c2370742c765d94629ae97837224eee/web-client/src/crypto.rs#L30).
|
19
|
19
|
|
20
|
20
|
### Usage of web-client library:
|
21
|
21
|
|