Koniverse / SubWallet-Extension

SubWallet is the comprehensive non-custodial wallet solution for Polkadot, Substrate & Ethereum ecosystems.
https://www.subwallet.app
Apache License 2.0
89 stars 61 forks source link

Support public and private key encryption #516

Open RyanDinh8 opened 1 year ago

RyanDinh8 commented 1 year ago

Is your feature request related to a problem? Please describe.

Support asymmetric encryption/decryption feature on SubWallet

Sumi Network (wallet-to-wallet communication solution - https://www.sumi.network/) is asking SubWallet to support them in terms of public and private key encryption.

Solution for Substrate accounts:

Solution for EVM accounts

Documentations from MetaMask:

More information:

S2kael commented 1 year ago

The reason Metamask deprecated encrypt/decrypt functions on their Extension (Video).

sondotpin commented 1 year ago

https://github.com/polkadot-js/common/blob/9e3b42b32e2823fae3590a9c65350b6a08396e54/packages/keyring/src/pair/index.spec.ts#L182

encrypt/decrypt using sr25519 has supported via this PR