ethereum-oasis-op / baseline

The Baseline Protocol is an open source initiative that combines advances in cryptography, messaging, and distributed ledger technology to enable confidential and complex coordination between enterprises while keeping data in systems of record. This repo serves as the main repo for the Baseline Protocol, containing core packages, examples, and reference implementations.
https://docs.baseline-protocol.org
Other
576 stars 237 forks source link

Build baseline-protocol/privacy interface for a generic baseline zk circuit #168

Closed bitwiseguy closed 4 years ago

bitwiseguy commented 4 years ago

Overview

Currently, Radish34 utilizes zkp circuits that are specifically designed to enforce business rules for supply chains (i.e. tiering structure of MSA). To help accelerate the adoption of the baseline-protocol by enabling any document to be "baselined" between multiple parties, we need a generic zkp circuit that is not tied to a specific use-case. The structure of the circuit is supposed on the following "core" components/statements to be proved/verified about the exchange of a generic document object between 2 parties:

a. The commitment of the document object is well formed, i.e., with the choice of the hashing scheme the commitment of the document can be proved to be the same as that computed outside the circuit b. The commitment is co-signed by both the parties and the signature is verifiable c. The root of the merkle tree calculated based on the commitment stored at a leaf index is consistent with the corresponding root on chain

Assumptions

Overall workflow considerations

General baseline document workflow requires the following steps:

  1. document created by sender
  2. document signed by sender
  3. document sent to recipient
  4. recipient inspects contents of document and signs if they agree
  5. recipient sends signed doc back to sender
  6. sender pushes commitment into Shield contract

Tasks

Workflow Integration Tasks

Based on simplify-msa-process branch and integration/simple-test.js, as an example workflow

kthomas commented 4 years ago

Given the title of this we can consider it to be completed as part of the init-core privacy work. Between the core/privacy package and the examples/baseline-app reference implementation, all of these considerations will have been accounted for when init-core review is completed and ships.