Transfer
Sending the files to anyone on blockchain
This feature is designed to send encrypted (or unencrypted but tied to NFT) files using asymmetric encryption, you encrypt with receiver's public key, they decrypt with their private key, no re-upload needed. To transfer the file, the recipient must either have at least one outgoing transaction or to provide a public key to the sender.
Transfer flow
User A uploads a file with encryption enabled (ECIES / MLKEM) or just an NFT.
User A is given a
Download Keyfor that specific file.User A goes to Transfer page and pastes the
Download Keyhe got. In case if the file was not encrypted and does not have an NFT attached to it, the users gets an error.User A selects the User B's (the receiver) Ethereum address. The system then tries to fetch the receiver's signature from the transaction, then constructs the unsigned transaction RLP payload and recovers the public key using the signature.
Aetrna provides prompts for public key in a scenario where the receiver does not have the outgoing transactions yet for both ECIES and MLKEM routes.
User A needs to decrypt the symmetric key:
In broswer by inserting the private key. No data is sent to the server, for cryptography Noble library is used
Offline by using the portable tool provided. User A needs to copy the symmetric key, then run the cool and decrypt that key in terminal offline. This is safer in regards to memory leaks or clipboard sniffers. User A then inputs the plaintext symmetric key that will be checked against
aes_key_hashfor correctness in case if the User A is malicious or incorrectly pasted the symmetric key.
After re-encryption is done, User A gets a metamask pop-up to send a transaction which updates the
storage_contractstate with a newencryptedKeythat the receiver can now decrypt using his Ethereumprivate keyUser B then opens the Library page on Aetrna website and gets the
download keywhich then is used to download the file from blockchain on Download pge.User B download a file and decrypts it with his private_key either in browser or offline using the portable tool.
The portable tool for offline decryption:
Last updated