-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: ec addition for non-zero points (#5858)
# Description ## Problem\* This PR performs 'safe' ec addition in Noir, assuming the EC ADD opcode is unsafe, i.e it does not handle point at infinity. an ec addition for the embedded curve dedicated to non-zero inputs. ## Summary\* embedded_curve_add in stdlib now handles corner cases for ec addition Add 2 methods: embedded_curve_add_not_nul which assumes the inputs are not null embedded_curve_add_unsafe which assumes inputs are not null and distinct (or identical) Enable the constant inputs for ec_add. ## Additional Context This PR should cause an overhead, because corner cases are not checked in Noir and in BB. However, we want to change BB so that EC ADD is not safe anymore which will improve the performance, so we need to add the safe version in Noir first. I am not sure whether we want to document this or not? ## Documentation\* Check one: - [X] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist\* - [X] I have tested the changes locally. - [X] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings.
- Loading branch information
Showing
3 changed files
with
64 additions
and
12 deletions.
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
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