I am developing a web application where user can share data/messages to another user. I am using IPFS to develope this web application.
I have a scenario,
- opens a web page
- Alice ipfs-js node is initialized (2 keys are generated)-> private key stored in datastore -> public key (hash/unique id generated by ipfs)
In order to share link of web app to Bob,
- Alice uses Bob’s email
- Bob receives Alices email
- In email, alice has sent her public key + accpt/reject msg + signature through link
- when bob clicks on link web app opens in browser
- Bobs js-ipfs node is initialized (2 keys are genrated)
- Bob verifies alice using her signature
- Bob Accepts msgs and sends his public key + signature + msg accept
- Alice receives Bob’s accept msg + Bob’s pubic key + Bob’s signature
- Alice verifies its really Bob(who she sent email invitation)
Alice and Bob
- Verification complete
- Continues sending data/msg
I am new to working with ipfs-js. I have to explain public/private key exchange scenario to professor and class. I want to know is this scenario is correct/ working.
Help, really appreciated.
How is this part being done? How are Alice and Bob talking to each other at this point?
Most of this scenario doesn’t really seem to be IPFS specific. Really you’re using email as the trusted channel for public key exchange/“authentication”, which maybe isn’t the best way for trusted public key exchange.
I did not find any other way to distribute public key. I want to explain the underlying architecture of ipfs. How security is handled in ipfs
A public key can be shared anywhere: blog post, email, printed flyers, etc. It’s just a matter of making sure that the public key corresponds to the individual you want to have encrypted communications with.
Maybe I’m missing something, but the scheme in your original post doesn’t appear to be dependent on IPFS. And it’s not clear how you’re using IPFS for Alice and Bob to communicate (e.g., pubsub, libp2p streams, something else).
IPFS already uses public/private key encryption for communication between nodes. If you’re sure that a node id is controlled by the individual you’re intending to communicate with, then the individual controlling the node should already be authenticated in a sense.