Merged
Conversation
|
|
||
| type_acc = update; | ||
|
|
||
| for _ in (i_step / 3)..(2 * i_step / 3) { |
Contributor
There was a problem hiding this comment.
could there be a case where depth > (i_step/3) but less than (2* i_step / 3) ? in that case it seems like execution of this loop will not be necessary.
for i_step = 12, it will not be the case, as the final loop has depth = 2 (=254 - 12n) so control won't flow to this branch so is not a problem.
Collaborator
Author
There was a problem hiding this comment.
yes you are right. I knew it will not be problem for i_step=12 as you indicated but better include all possible cases properly. done.
…r mul and refactor
Contributor
|
Thank you for looking into the issue! |
Merged
wz14
pushed a commit
to bitlayer-org/BitVM
that referenced
this pull request
Dec 16, 2024
* add unsuccessful tests with small scalars * add affine infinity if checks to native groth16 and change doubling method * add affine infinity if checks to hinted groth16 and change doubling method * add affine infinity if checks to chunked groth16 and change doubling method * move if infinity checks in scalar mul to check_add and check_double functions * fix G1:affine is_zero_keep_element * fix the segment if-checks comparing depth and i_step in chunked scalar mul and refactor --------- Co-authored-by: sevkett12 <[email protected]>
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.
This PR fixes the issue with affine infinity as the inputs of affine_add and affine_double functions. Also, T+(2^w-1)T logic is changed to w times doubling in G1 scalar multiplication. Slightly (around %6) increases the script size. This error occurs mainly for small public inputs so some tests covering this are added. Closes #137