Share and encrypt files with the power of IPFS and Lit Protocol and smart contracts to give access to these files
This project consists on encrypting and sharing files with IPFS and Lit protocol. First we encrypt and upload the file , then we decide the on chain parameters that Lit protocol will use in order to decrypt the files, we get a CID that we can share with whoever that we want to access this file. With our smart contract we can give or revoke access to Ethereum accounts, specifying the address and the CID.
This project uses first Lit Protocol to encrypt and zip the files, we create a zip file that contains the encrypted symmetric key and the CID of the encrypted file, this will be the root CID. Then we use Web3.Storage IPFS in order to upload this zip file and we share the root CID for people to access this encrypted file. With Lit Protocol we define the EVM Access Control Conditions that will be used as a custom call to our Smart Contract that reads if a Ethereum account has access to an specific root CID. We then decrypt the symmetric key and using CID of the encrypted file we can finally decrypt and download the file with the application