-
Notifications
You must be signed in to change notification settings - Fork 256
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
[zk-sdk] Add sigma_proofs
and transcript
modules
#1065
Conversation
1bfe8ef
to
4e594dd
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1065 +/- ##
=========================================
+ Coverage 82.0% 82.1% +0.1%
=========================================
Files 860 880 +20
Lines 232898 235280 +2382
=========================================
+ Hits 191071 193351 +2280
- Misses 41827 41929 +102 |
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.
I mainly skimmed, since it should just be a copy, but it looks good! Thanks for separating the commits
fn rangeproof_from_key_domain_separator(&mut self, n: u64) { | ||
self.append_message(b"dom-sep", b"rangeproof from opening v1"); | ||
self.append_u64(b"n", n); | ||
} | ||
|
||
fn rangeproof_from_opening_domain_separator(&mut self, n: u64) { | ||
self.append_message(b"dom-sep", b"rangeproof from opening v1"); | ||
self.append_u64(b"n", n); | ||
} |
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.
Are these meant to be the same? It seems like the first one should be a different name
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.
Yeah so the rangeproof_from_key_...
should append the message rangeproof from key v1
. We also seem to have function close_account_proof_domain_separator
, which is not deprecated and not used any more... I will clean up transcript on a follow-up. Sorry I should have caught this when I am migrating things over.
Summary of Changes
This is a follow-up to #1019, which migrates the
transcript
andsigma_proofs
modules fromzk-token-sdk
intozk-sdk
. The only additional change to these modules is that the suffix_proof
is removed from the sigma proof module names.As in
zk-token-sdk
, thesigma_proofs
andtranscript
modules were not included in the sbf target since they rely on the curve25519 dalek crate, which does not build well in sbf.The
dead_code
andunused_imports
were added since the rest of thezk-token-sdk
, which uses these modules, have not been migrated yet.There are some naming changes that are required in the
sigma_proofs
module as specified in #671. These will be done in subsequent PRs.