This repository has been archived by the owner on Jan 13, 2025. It is now read-only.
Create data encryption/decryption standard plus supporting APIs for wallets to implement #1367
Labels
enhancement
New feature or request
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
.Example use case
Let's say I'm making a decentralized health information exchange. Each medical record of mine is stored on-chain (if it was not stored on chain it would not be decentralized). I sign in via my wallet. Then, either after some visit to a doctor's office or when I'm ready to publish my wearable device's biometric data, I get a request from my web3 wallet to encrypt the data with a public key, then another request to store said data in a Solana account (or Arweave or Filecoin or Shadow Drive etc etc). When I view a web dapp later, I should be able to view all my data, so the wallet sends me a request to decrypt my data using my private key. In the future I may want to give access of this encrypted data to another user, which is why my account should somehow be able to generate unique encryption/decryption keypairs for different datasets. Perhaps this simply means I reencrypt the decrypted data with the recipient's public key. An example is let's say I sell my wearable device data and DNA sequencing data to an AI health tech company. In that case I should probably be uploading some copy of that data encrypted with a keypair unique to my relationship with that company.
Details
Relevant discussion in Ethereum: https://ethereum-magicians.org/t/eip-5630-encryption-and-decryption/10761/128
Metamask SDK:
Open related issue in Backpack coral-xyz/backpack#4241
Open related issue in Solana Mobile Seed Vault solana-mobile/seed-vault-sdk#144
The text was updated successfully, but these errors were encountered: