aisland-dao / docsig

Document Signing on Blockchain
Apache License 2.0
1 stars 1 forks source link

M1.3: Manage Encryption #11

Closed poseidon-aisland closed 1 year ago

poseidon-aisland commented 1 year ago

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

poseidon-aisland commented 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.

poseidon-aisland commented 1 year ago

an UI part has to be done inside the settings.

poseidon-aisland commented 1 year ago

Settings is done. Storing the encrypted file on chain has been done. It's pending the reading back and decryption.