Skip to main content

Encryption and KMS

Upload#

Upload

  1. Random key generated : KrK^r
  2. Encrypt KrK^r using owner's public key KAK_A to get KArK^{r}_{A}
  3. Store KArK^{r}_A on smart contract

Share#

Share

  1. Fetch encrypted key KArK^{r}_{A} from contract
  2. Decrypt KArK^{r}_{A} using owner's private key (KAโ€ฒK^{'}_A) to get random key KrK^r
  3. Encrypt KrK^r using receiver's public key KBK_B to get KBrK^r_B
  4. Store KBrK^r_B on smart contract

Download#

Download

  1. Fetch encrypted key KBrK^r_B from smart contract
  2. Decrypt KBrK^r_B using recipient's private key (KBโ€ฒK^{'}_B) to get random key KrK^r
  3. Decrypt downloaded file using KrK^r