Shamik Bera | WebAuthn Based Ockam Vault In TypeScript #2381
shazm12
started this conversation in
Help Wanted
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi , Shamik Bera, a 3rd CSE student from Vellore Institute of Technology, Vellore, and I have worked on several projects some of which I am listing below.
Projects
I am well familiar with React, Node, Express, Mongo DB, PostgreSQL, Python, Tensorflow, sklearn , Docker, and such. I currently had completed the Hacktoberfest 2021 within total of 5 PRs made by me. Some of the challenging ones are listed below.
Open Source Contributions
What I understood from the project and my implementations and ideas
Now coming to the main part that is the understanding of the project WebAuthn Based Ockam Vault In TypeScript. So I at first I got a basic idea of what the project's about. The project is an end-to-end encrypted, mutually authenticated, and secure communication channel between two clients, written in Rust, and maintains integrity, authenticity, and confidentiality and providing a secure environment. One of the most important advantages of such systems is most of the modern distributed systems which are highly dynamic and large-scaled systems have applications and machines coming in and forth the network. So such a reliable system can be used to ease the tasks for applications design leads and architects by lessening the trust among network nodes and such.
So we can create two rust programs to create a secure channel and only on a secure handshake via an encrypted key exchange will we allow both clients to send messages to each other in the channel.
For Bob
For Alice
run both the programs using the following command -
cargo run --example bob
cargo run --example bob
This is now an end-to-end encrypted application and now the two client nodes can send messages to each other in a secure channel.
Building an end-to-end encryption channel from scratch
Now coming to building an end-to-end encrypted and secure channel, first I understood all the key components required to build the channel.
Node - The Ockam node is an execution environment that is asynchronous in nature and is used to concurrently execute the workers created.
Worker - The workers are stateful actors that run un the Ockham node and can start other workers when needed according to logic and can handle and receive messages from different nodes also.
Routing - the "echoer" nodes that we can create following the docs can only send and receive messages from the default app worker. The routing would allow us to create hops away from our "app" worker to various other nodes created and not only allow us to create single hops but multiple hops to multiple nodes in the network.
Transport - The Ockam Transport is an additional plugin to Routing allowing us to move Ockam messages in specific protocols like TCP, UDP, WebSockets, Bluetooth, and such. This is important as we can use different protocols depending on the type of data we send through the network. For example, if we have a messaging service then we use TCP protocol, if we are using streaming and even some more complex team chat service application we can use UDP or Websockets and so on.
Now when it comes to creating a secure channel we can first create a responder node which will start a TCP listener and an echoer worker in this way.
Talking about which encryption algo to use
Now coming to the part to use a highly trustable and strong encryption algorithm, AES-256 is considered to be one of the strongest algorithms recommended by the U.S government stating that it would be unbreakable for a few coming years. But looking for alternatives, cryptology researchers are also coming up with bio-dynamic algorithms that simulate real-life dynamics of cyber-attacks to eliminate further attacks.
For digital signatures, the relatively new elliptic curve digital signature algorithm (ECDSA) is highly efficient than RSA and hence I think I will go with EDCSA.
For this, I can use the elliptic API to perform fast elliptic curve encryption in typescript.
This way we can just make verify and generate key pair functions and for now, I am facing a bit of an issue executing this.
Now we can create a middle node to create a TCP listener to listen to any connections and messages from other nodes.
now we shall create an initiator node to actually create a secure channel we we will use two transport hops here.
Making a E2E channel in Ts
now similarly in ts we can create like this -
To be frank, this was the very first time that I explored Rust in a brief to understand this project but I had really learned a lot and found the language and the project to be really interesting and unique. I am always ready to learn new technologies and system designs as it always excites me knowing the fact that I will be learning some new and amazing.
Thank you for reading my post! 😄
Beta Was this translation helpful? Give feedback.
All reactions