anza-xyz / wallet-standard

Solana extensions to the Wallet Standard.
Apache License 2.0
79 stars 42 forks source link

Create data encryption/decryption standard plus supporting APIs for wallets to implement #25

Open ozyman42 opened 1 year ago

ozyman42 commented 1 year ago

Motivation

Many potential applications might prefer to encrypt end user data via a public key the user controls rather than encrypting via a user's password (i.e. lastpass), as passwords are a poor UX compared to a web 3 wallet. Metamask currently is the only web 3 wallet I'm aware of which offers the ability to decrypt via private key. Ideally Solana wallets should support this, and ideally all the wallets would use the same algorithm for obtaining a public encryption key and the same asymmetric encryption algo too. In the linked EIP you see a proposal for wallets to offer an RPC for encryption via secp256k1 + ECIES.

Details

Relevant discussion in Ethereum: https://ethereum-magicians.org/t/eip-5630-encryption-and-decryption/10761/128 Metamask SDK:

Open related issue in Backpack https://github.com/coral-xyz/backpack/issues/4241 Open related issue in Solana Mobile Seed Vault https://github.com/solana-mobile/seed-vault-sdk/issues/144 Closed related issue in Solana web3 repo https://github.com/solana-labs/solana-web3.js/issues/1367

jordaaash commented 1 year ago

Thanks! I'll drop some related links for now and follow up properly soon:

jordaaash commented 1 year ago

At a high level, the current plan is:

buffalojoec commented 1 year ago

Hey @ozyman42 ! I just added some replies to the sRFC's Jordan linked and updated the Keyring Program with my latest commits, including a more detailed README.

I encourage you to comment in sRFC 00007 so we can rope in the folks on the thread, as well as sRFC 00009 if it's of interest to you!