-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refac: improve pcs interface #225
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
ff48a92
fix(crypto): move default template parameter to back
chokobole b3005b8
fix(zk): add missing header
chokobole 5efe19b
refac: enable `TranscriptRead|Writer` to choose transcript writing
chokobole 5b9fadb
refac: refactor transcript and organize commitment schemes
chokobole File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Commitments | ||
|
||
The commitment scheme's interface has been designed to accommodate various commitment schemes. | ||
While it might seem straightforward, it poses challenges, particularly in accessing the oracle. | ||
|
||
For instance, in the case of a binary merkle tree, it commits leaves to a merkle root, constructing | ||
the tree as a side effect. To facilitate this, we've implemented the `BinaryMerkleTree`, which holds | ||
storage as a member. This design eliminates the need for an extra argument to obtain | ||
the hash of the merkle tree during opening phase. | ||
|
||
On the other hand, with the `KZG` commitment, there are no side effects during the commit phase. | ||
However, during opening phase, it necessitates access to the original polynomials. | ||
We're actively working on resolving this for future iterations. | ||
|
||
This documentation provides an overview of each commitment scheme's interface in LaTeX, | ||
offering a concise understanding of their functionalities. | ||
|
||
## Vector Commitment Scheme | ||
|
||
We've successfully unified `Commit()` to enable commitment production by passing a vector. | ||
However, it's important to note that `Open()` and `Verify()` may have varying implementations | ||
across schemes, leading to ambiguity. Please keep this in mind when working with them! | ||
|
||
### Binary Merkle Tree | ||
|
||
$$Commit(L) \to R$$ | ||
$$Open(i) \to \pi$$ | ||
$$Verify(R, \pi) \to true \space or \space false$$ | ||
$$L\text{: the set of leaf, }i\text{: index of the leaf }R\text{: merkle root}$$ | ||
|
||
## Univariate Polynomial Commitment Scheme | ||
|
||
### FRI | ||
|
||
$$Commit(P) \to C$$ | ||
$$Open(i) \to \pi$$ | ||
$$Verify(i, \pi) \to true \space or \space false$$ | ||
$$P\text{: polynomial, }i\text{: index of the leaf}$$ | ||
|
||
### SHPlonk | ||
|
||
$$Commit(P) \to C$$ | ||
$$Open(O) \to \pi$$ | ||
$$Verify(O, \pi) \to true \space or \space false$$ | ||
$$P\text{: polynomial, }O\text{: polynomial openings }$$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.