Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signature & Encryption with Web3 #74

Closed
5 of 7 tasks
D4nte opened this issue Apr 28, 2021 · 6 comments · Fixed by waku-org/js.waku.guide#42
Closed
5 of 7 tasks

Signature & Encryption with Web3 #74

D4nte opened this issue Apr 28, 2021 · 6 comments · Fixed by waku-org/js.waku.guide#42
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@D4nte
Copy link
Contributor

D4nte commented Apr 28, 2021

Problem

DApp developers may need to setup private channels or end-to-end encryption for privacy purposes.

Generic symmetric, asymmetric encryption and signature is tracked with #179, using Waku Message version 1.

It is not clear at this stage how users can sign/encrypt with their Ethereum account.

Web3 API provides an API to sign messages eth_sign, some wallets such as Metamask provide an API to decrypt messages and retrieve Ethereum's account public key.

Solution

Encryption of messages maybe limited to using Metamask's eth_decrypt API for now.
The signature is not compatible with WakuMessage version 1 so a wrapper (and spec) will need to be provider.
Encryption with Metamask is unlikely to be compatible with version 1 but it should be investigated and documented. Confirmed, it uses a different encryption schema.

DoD

@D4nte
Copy link
Contributor Author

D4nte commented May 24, 2021

See vacp2p/rfc#373

Best to have few examples ready:

  • Encryption with web3
  • Signature with web3
  • Encryption without web3
  • Signature without web3

@D4nte D4nte mentioned this issue Jun 9, 2021
@D4nte D4nte changed the title Waku message encryption Implement Eth-DM example, showcase encryption and Web3 provider integration Jun 9, 2021
@D4nte D4nte changed the title Implement Eth-DM example, showcase encryption and Web3 provider integration [Epic] Signature & Encryption Jun 9, 2021
@D4nte D4nte changed the title [Epic] Signature & Encryption Signature & Encryption Jun 9, 2021
@D4nte
Copy link
Contributor Author

D4nte commented Jun 20, 2021

First version of Eth-DM done #204

Features:

  • Send private messages to a recipient, only knowing their Ethereum address
  • The messages are encrypted, only the recipient can decrypt
  • Works with metamask (and hopefully status app, will test)
  • Participants need to opt in to receive messages
  • Uses push light protocol

@D4nte
Copy link
Contributor Author

D4nte commented Jul 12, 2021

Lots of work done with #179, using Waku Message version 1.

Web3 API cannot really be used for encryption, except when using metamask.
Web3 API can be used for signing.

Re-focus this issue on web3 integration.

@D4nte D4nte changed the title Signature & Encryption Signature & Encryption with Web3 Jul 12, 2021
@D4nte D4nte added documentation Improvements or additions to documentation enhancement New feature or request examples labels Jul 15, 2021
@D4nte
Copy link
Contributor Author

D4nte commented Jul 15, 2021

Also, to investigate: In Eth-DM, the Eth-DM Public Key is signed with Ethereum account.
We store it in a custom protobuf message. Instead, could version 1 format be used to store the signature? I.e., is web3 signature method eth_sign compatible with web3 format? If so, then we should have symmetric encryption for Eth-DM Public Key Message and use version 1 instead of a custom format.

@D4nte
Copy link
Contributor Author

D4nte commented Jul 15, 2021

Also ask Status team (keycard) to know what message encryption is possible.

@D4nte
Copy link
Contributor Author

D4nte commented Jul 21, 2021

Also, to investigate: In Eth-DM, the Eth-DM Public Key is signed with Ethereum account.
We store it in a custom protobuf message. Instead, could version 1 format be used to store the signature? I.e., is web3 signature method eth_sign compatible with web3 format? If so, then we should have symmetric encryption for Eth-DM Public Key Message and use version 1 instead of a custom format.

Did some research: https://forum.vac.dev/t/eip-191-signature-and-waku-message-version-1/94

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant