Closed poseidon-aisland closed 1 year ago
the functions to encrypt/decrypt have been done. We need to generate/store a key pair dedicated to encrypt/decrypt because it's not possible to access the private key of the wallet and there is no encryption api exposed.
an UI part has to be done inside the settings.
Settings is done. Storing the encrypted file on chain has been done. It's pending the reading back and decryption.
Encryption - For enhanced privacy the documents and other metadata shall be encrypted as follows:
The files will be encrypted using AES256-GCM and Chacha20 as symmetric cyphers in cascade and a random private key of 512 bit. The symmetric private key will be encrypted by the asymmetric public key of the user. The user will be able to decrypt using his/her own asymmetric public key. The documents to be signed from the counter part shall be encrypted with a random private key and the same shall be encrypted with the public key of the recipient. The recipient will be able to decrypt using his/her own asymmetric private key. The Dapp must manage the settings of the initial asymmetric public/private keys. The open source library that we will use is libsodium which offers the necessary primitives: https://doc.libsodium.org/ https://www.npmjs.com/package/libsodium