-
Notifications
You must be signed in to change notification settings - Fork 40
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
[ECC chip] Fixed- and variable-base scalar multiplication #111
Merged
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
0f60a81
ecc::chip.rs: Add EccScalarFixed, EccScalarFixedShort structs
therealyingtong 64a2b02
ecc::chip.rs: Witness scalar for variable-base scalar mul
therealyingtong cc9dd20
chip::mul.rs: Implement variable-base scalar mul instruction.
therealyingtong a263774
chip::witness_scalar_fixed.rs: Implement witness_scalar_fixed instruc…
therealyingtong ae25310
chip::mul_fixed.rs: Implement fixed-base scalar mul instruction.
therealyingtong a3ca27b
ecc::tests: Add tests for variable- and fixed-base scalar mul.
therealyingtong 5ae9890
mul::overflow.rs: Overflow check in variable-base scalar mul
therealyingtong 747f71c
constants.rs: Add unit tests for T_P, T_Q constants.
therealyingtong 37074c6
mul_fixed::short: Check that last window is either 0 or 1.
therealyingtong 09b4da1
base_field_elem.rs: Support fixed-base mul using base field element.
therealyingtong b15343f
Add `OrchardFixedBasesFull::{generator, u}` methods
str4d e726fee
mul_fixed: Avoid computing fixed constants during proving
str4d 69d6629
chip::mul.rs: Enforce LSB if/else condition
therealyingtong b363492
ecc::chip.rs: Introduce circuit-wide "constants" fixed column
therealyingtong 4d69dec
mul::incomplete.rs: Constrain first and last y_a values.
therealyingtong e75c176
mul::incomplete.rs: Make offsets more intuitive
therealyingtong 6ffd867
mul::complete.rs: Constrain negation of (x_p, y_p) in double-and-add.
therealyingtong 3f961ab
mul::process_lsb(): Clean up assignments and boolean-constrain LSB.
therealyingtong 33b66ab
tests::print_ecc_chip(): Print ECC chip.
therealyingtong 67caed5
mul::incomplete: Constrain final iteration correctly
str4d 2536555
mul_fixed: Constrain interpolated window mul to be on curve.
therealyingtong 9fd4d7d
Cleanups and clippy fixes.
therealyingtong d550e15
mul_fixed_*::tests: Constrain zero outputs in mul_fixed tests.
therealyingtong 2d343af
Update mul_fixed_* APIs to take Layouter instead of Region.
therealyingtong 23f2ed5
gadget::utilities.rs: Add bitrange_subset() helper.
therealyingtong b690940
chip::mul_fixed.rs: Make q_mul_fixed a selector instead of fixed column.
therealyingtong 72e469e
mul_fixed::base_field_elem.rs: Check canonicity of base field element…
therealyingtong ae72501
mul_fixed::base_field_elem: Add constraint alpha_2 = 0 => alpha_1 = 0.
therealyingtong f42d48b
mul_fixed::base_field_elem: Fix two_pow_130 expression.
therealyingtong d0e34cd
mul_fixed::base_field_elem: Eliminate alpha_0 lookup decomposition.
therealyingtong 96863c9
mul_fixed::*: Use a separate region for complete addition assignment.
therealyingtong 22ec16f
Minor refactors, cleanups, clippy fixes, docfixes.
therealyingtong e2ea443
mul_fixed::*::tests: Witness expected point and constrain result to b…
therealyingtong 5c38f53
mul::tests: Witness expected point and constrain result to be equal.
therealyingtong ae4e54d
gadget::utilities: Add test cases for bitrange_subset() helper.
therealyingtong 8a9f821
mul_fixed::base_field_elem: Remove double-enable of base_field_fixed_…
therealyingtong 6c41c72
utilities::range_check: Correct range_check expression
therealyingtong 0ade539
utilities::tests::test_range_check(): Test range_check() helper.
therealyingtong b696163
mul.rs: Explain ordering of mul::incomplete advice columns.
therealyingtong 425ee6e
Docfixes and minor refactors.
therealyingtong 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
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
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.
@daira left a comment inside the
get_lower_32()
impls:We'll need to take care over there to ensure we don't alter this API, now that we are relying on it outside the perfect hash table.