openlab-cli icon indicating copy to clipboard operation
openlab-cli copied to clipboard

RFC: threshold encryption and token-gating of static objects

Open NiklasTR opened this issue 2 years ago • 1 comments

Hi frens,

over the last couple of weeks, I have been looking into various ways to enable scientists to store sensitive information in an encrypted but decentralized fashion. As a community we talked to multiple providers that develop solutions in the problem space of decentralized file access. Some of the providers I have identified are listed below:

  • nevermined
  • chainsafe
  • threshold network (former keeper network and nucypher project)
  • lit protocol

After looking into all the above protocols and talking to folks at most of them, I believe the most promising infrastructure we can build on is lit protocol. They have built out a JS SDK for decentralized threshold encryption of static objects that can be exposed via IPFS. It is the most straightforward-looking tool I have seen so far for static content.

https://litprotocol.com/ https://developer.litprotocol.com/docs/intro/ https://developer.litprotocol.com/docs/SDK/staticContent

NiklasTR avatar Mar 12 '22 11:03 NiklasTR

The process to manage access to static content looks like this:

writing

  1. [[authSig]] - prove ownership of the [[metamask]] key pair
  2. perform [[symmetric encryption]]
  3. define [[access control condition]]
  4. store the [[symmetric encryption]] key with the [[access control condition]] on the [[lit protocol]] - defines an encrypted symmetric key
  5. save the following three files
    1. encrypted static object
    2. encrypted [[symmetric encryption]] key
    3. [[access control condition]]

reading

  1. pull the following files
    1. encrypted static object
    2. encrypted symmetric encryption key
    3. access control condition
  2. [[authSig]] of the user to prove ownership
  3. obtain the decrypted symmetric key from the lit network based on the control condition and the user's authSig
  4. decrypt the encrypted static object with the symmetric key
  5. return object

NiklasTR avatar Mar 12 '22 11:03 NiklasTR