filecoin-project / devgrants

👟 Apply for a Filecoin devgrant. Help build the Filecoin ecosystem!
Other
377 stars 308 forks source link

Randamu Conditional Threshold Encryption #1818

Open dhuseby opened 3 weeks ago

dhuseby commented 3 weeks ago

Filecoin Open Grant Proposal

Project Name: Conditional Encryption Threshold
Proposal Category: Research & Protocols
Entity Name: Randamu, Inc.
Proposer: @dhuseby
Project Repo(s):
Filecoin Ecosystem Affiliations: The team developed Drand and stewards the League of Entropy network that is critical to the Filecoin network operations.
Technical Sponsor:

Project Summary

This project seeks to bring time-lock encryption and conditional decryption to the Filecoin network.

Impact

Time-lock encryption enables a wealth of new on-chain use cases that are not available in a decentralized manner on any other chain yet.

Conditional decryption reduces the cost of coming to consensus on data which will enable new security and oracle protocols. Building this on Filecoin using FIL as a gas token drives builder adoption on the FVM.

Sealed Bid Auctions

The flow for executing a sealed-bid auction is:

  1. Users encrypt their bids to a future chain height
  2. Users upload this encrypted bid to the auction contract
  3. The auction contract submits their encrypted bid to a threshold network
  4. Once the future chain height has been reached, the threshold network writes a decryption key to the auction contract
  5. The auction contract decrypts the bids using the decryption key and announces the winner

Autonomous Games with Hidden State

The flow for setting up a game with hidden state is:

  1. Alice the game developer encrypts some piece of game state with the public key of the threshold network and conditions such as the required character level to unlock it
  2. Alice stores the encrypted game state with a storage provider and stores its CID in the game smart contract on FVM
  3. Bob plays the game until his character reaches a given level
  4. Bob requests decryption of the hidden game state
  5. The threshold network uses Bob’s level as an input to a multiparty re-encryption protocol, re-encrypting the game state to Bob’s public key
  6. The threshold network stores the data with a storage provider using programmatic storage deals
  7. The threshold network writes the re-encrypted data’s CID to the smart contract for Bob
  8. Bob retrieves his data from an SP and decrypts it

Re-encryption for Paid Storage

The flow for doing data re-encryption for paid storage is:

  1. Alice encrypts e.g. a video using the public key of our threshold network
  2. Alice uploads the ciphertext to a storage provider
  3. Alice creates a smart contract where other users can pay to receive access to the video
  4. Bob pays money into the smart contract to cover Alice’s fee and the retrieval costs
  5. Each node in the threshold network retrieves the encrypted content from the SP
  6. The threshold network runs a multiparty re-encryption protocol, re-encrypting the encrypted data to Bob’s public key
  7. The threshold network stores the data with another storage provider using programmatic storage deals
  8. Bob retrieves his data from an SP and decrypts it

On-chain Access Control

The flow for managing on-chain access control is:

  1. Alice gates some service she runs to require a recent signature of a user’s identity from the threshold network
  2. Alice deploys an access control smart contract such that users must pay 1FIL to access her service for one month
  3. Bob pays 1FIL into the smart contract
  4. The threshold network signs Bob’s address and the chain height, and writes it back to the smart contract
  5. Bob accesses Alice’s service, providing the credential from the threshold network
  6. Alice challenges Bob to sign some random data to prove ownership of his address/public key
  7. Bob signs the random data and accesses Alice’s service

Outcomes

The stated outcome of this project is an operational network that extends the FVM to support ...

Downstream Strategy

The strategy for adoption, growth, and maintenance is...

Development Roadmap

Milestone 1 - conditional signing contract on FVM

Description

We must deploy a solidity contract to the FVM that stores ciphertexts and/or CIDs for ciphertexts along with their conditions for decryption

Milestone 2 - integrate threshold network daemon with Filecoin

Description

We must adapt our EVM-compatible threshold network daemon to listen to and execute transactions on the FVM.

Milestone 3 - solidity library for identity-based encryption

Description

To allow signatures to be used as decryption keys, we must implement a variation of our timelock encryption scheme that supports adding conditions as part of the encryption/decryption key.

Milestone 4 - Typescript library for encryption and upload of data

Description

In order to simplify integration for builders, we will develop and release a typescript library for easy management of encryption, decryption in web applications and dApps, with bindings for the popular storage upload tools such as lighthouse and web3 storage.

Budget

Milestone Completion Date Funding
1 TBD $10,000 USD
2 TBD $10,000 USD
3 TBD $15,000 USD
4 TBD $15,000 USD

Team

Name GH Handle LinkedIn
Yolan AnomalRoil
Patrick McClurg CluEleSsUK https://www.linkedin.com/in/patrickmcclurg/
Robin
Nemitari
Laith

Websites

Relevant Experience

The Randamu team is the primary authors and maintainers of the Drand and League of Entropy network that serves Filecoin operations globally. They have successfully maintained and executed the League of Entropy with 100% uptime for four years and served billions of randomness beacons.

Additional Information

Please send any follow-ups or questions to dave@aviation.community or tag any responses with @dhuseby.