<aside> 💡 Arweave is the infrastructure that undertakes the important mission in terms of permanently storing the crystallization of human wisdom. As the increasingly development of Web3, Arweave being an infrastructure will be applied by more developers to create a brand new and more diversified ecosystem. Based on this background, PermaDAO is established by a community of some co builders. All of the participants can find their own roles here to contribute to the Arweave ecosystem. Any proposals and tasks about Arweave can be published here as well as the support and feedback from the whole community. Join PermaDAO and build Web3!
</aside>
Translator: Zhisheng @ Contributor of PermaDAO Reviewer: XiongHa***@ Contributor of PermaDAO***
Arweave, as a public blockchain for storage, enables users to store their data on nodes in a distributed manner and ensures data permanence. Arweave is similar to other public blockchains such as Ethereum, all data stored on the Arweave is publicly accessible and can be seen by anyone. However, with the continuous development of Web3, there is an increasing demand for data privacy, particularly in the storage sector where emphasis is placed on the privacy of personal and sensitive data.
There are various methods to achieve data privacy, such as key encryption and homomorphic encryption. Considering simplicity and efficiency, key-based encryption is undoubtedly the lightest and most convenient solution at the moment. In the following discussion, we will explore a data encryption and a sharing scheme based on key exchange.
It will be easy to understand the Symmetric encryption, which is the process that uses a shared key to encrypt plaintext into ciphertext, and then uses the same key to decrypt the ciphertext back into plaintext. Common algorithms for symmetric encryption include 3DES, etc.
Asymmetric encryption is a widely used and more secure encryption method at present.
In asymmetric encryption, a public key is used to encrypt data, while a private key is used to decrypt data. The public key is publicly accessible and can be obtained by anyone, while the private key is kept confidential and only accessible to the key holder. Common algorithms for asymmetric encryption include RSA (Rivest-Shamir-Adleman) and elliptic curve cryptography algorithms (such as ECDSA and ECDH).
Asymmetric encryption provides the following main functionalities:
In our scenario, we use symmetric encryption to protect data privacy and asymmetric encryption to share private data.
During the process of data encryption, the data uploader needs to generate an encryption key for encrypting and decrypting the data. Afterwards a public-private key pair is generated, the encryption key is encrypted using the public key and decrypted using the private key to obtain the encryption key. The user's private key is kept securely on their own, which can be achieved using wallets such as MetaMask.
Note: The eth_decrypt and eth_getEncryptionPublicKey methods are no longer recommended for use in the latest version of MetaMask. However, the interface is still retained https://medium.com/metamask/metamask-api-method-deprecation-2b0564a84686. For a new encryption proposal, refer to EIP-5630.