refactor: public key compression - #77
Open
RajeshRk18 wants to merge 16 commits into
Open
RajeshRk18 wants to merge 16 commits into
RajeshRk18 wants to merge 16 commits into
Conversation
0xmad
reviewed
Nov 19, 2023
0xmad
left a comment
Collaborator
There was a problem hiding this comment.
Thanks, @RajeshRk18. Just left some comments.
Comment on lines
+281
to
+287
| if (i == 1) { | ||
| binary[33*i + j] = Num2Bits(8); | ||
| binary[33*i + j].in <== pk_compressed[j]; | ||
| } else { | ||
| binary[33*i + j] = Num2Bits(8); | ||
| binary[33*i + j].in <== compressors[i].compressed[j]; | ||
| } |
Collaborator
There was a problem hiding this comment.
Formatting should be fixed here
| for (var i = 0; i < 2; i++) { | ||
| for (var j = 0; j < k; j++) { | ||
| c_sha256.coordinates[i][j] <== g[i][j]; | ||
| c_sha256.coordinates[2+i][j] <== pk[i][j]; |
Collaborator
There was a problem hiding this comment.
Is it expected as removed line?
Contributor
Author
There was a problem hiding this comment.
Yes, pk is passed as input right before in compressed form
| signal input s[k]; | ||
| signal input plume_message[message_length]; | ||
| signal input pk[2][k]; | ||
| signal input pk_compressed[33]; |
Collaborator
There was a problem hiding this comment.
Why is it fixed magic value 33?
Contributor
Author
There was a problem hiding this comment.
compressed point is 33bytes
| signal output out[256]; | ||
|
|
||
| // compress coordinates | ||
| component compressors[6]; |
Collaborator
There was a problem hiding this comment.
Why did you change it and why is it magic variable?
Contributor
Author
There was a problem hiding this comment.
we only need 5 compressors as pk is already compressed
Collaborator
|
@RajeshRk18 please rebase with current main branch so PR has only commits related to this issue. |
RajeshRk18
force-pushed
the
refactor-publickey-compression
branch
from
November 20, 2023 01:30
3a07645 to
59ad77c
Compare
This reverts commit 8274ab7.
RajeshRk18
force-pushed
the
refactor-publickey-compression
branch
from
December 9, 2023 19:33
6bef811 to
aa30849
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #14