Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
jfinn 9e83468936 manual export 1 gadu atpakaļ
.github/workflows Update CI pipeline 1 gadu atpakaļ
common-api Update dependencies 1 gadu atpakaļ
example manual export 1 gadu atpakaļ
web-client Update CI pipeline 1 gadu atpakaļ
.dockerignore Add /pkg to docker ignore 2 gadus atpakaļ
.gitignore Rename js-client to example 2 gadus atpakaļ
Cargo.toml Change optimization config to most efficient 3 1 gadu atpakaļ
Dockerfile Use near-client from crates.io 1 gadu atpakaļ
README.md Cleared up some of the confusing english 1 gadu atpakaļ
docker-compose.yml Update a Docker file for new integration tests 2 gadus atpakaļ

README.md

Client

CI

Common-API 🦆

Commonly used API among different dependencies. For example key-exchange-server

Web-Client 🦘

The web-client handles the exchange of keys between the meeting moderator and participants. 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. 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.

NOTE! Our implementation uses the maximum key length available for each algorithm

Then we have proper keys for the Diffie–Hellman exchange. We derive the secret with dhx. Once that’s been established we need to provide a uniformly distributed secret key. For this purpose we use the KDF algorithm blake3. Here is the source code pointer to our implementation.

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 with AES-GCM.

Usage of web-client library:

Please follow the official instructions to use the latest package.

Build

wasm-pack build web-client --target bundler --out-dir ../pkg

Test

Pre requirements: Clone a key-exchange-server and near-smartcontracts. Deploy their docker instances:

⚠️ Please keep the order(near-smartcontracts depends on the key-exchange-server network)

  1. key-exchange-server: bash docker-compose up -d
  2. near-smartcontracts: bash docker-compose -f docker-compose.yml -f docker-compose.tests.yml up -d

Then:

docker-compose up