Encryption Algorithms
Last updated
Last updated
In DataGora, encryption ensures that contributors’ data remains secure and can only be decrypted by the campaign creator. The encryption process follows these steps:
Campaign Creation
The frontend generates an offline asymmetric key pair (public and private key).
The public key is stored on the blockchain along with campaign details.
The private key is saved by the campaign creator and is not stored anywhere.
Contributor Data Encryption & Submission
The contributor’s frontend generates a random symmetric secret key.
The data is symmetrically encrypted using this secret key.
The encrypted data is uploaded to IPFS, and its CID is stored.
The secret key is then asymmetrically encrypted using the campaign’s public key.
The encrypted secret key and IPFS CID are sent to the smart contract as a contribution.
Campaign Creator Data Decryption
The creator retrieves the encrypted secret key from the smart contract.
The private key (stored by the creator) is used to decrypt the secret key.
The decrypted secret key is used to decrypt the data fetched from IPFS.
This mechanism ensures that only the campaign creator, who possesses the private key, can decrypt the contributed data while keeping it fully encrypted and inaccessible to anyone else.