-
Notifications
You must be signed in to change notification settings - Fork 21
EIP-7951: Precompile for secp256r1 Curve Support #817
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
Open
lorenzogentile404
wants to merge
34
commits into
master
Choose a base branch
from
780-eip-7951-precompile-for-secp256r1-curve-support
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 18 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
b049d33
updated oob columns and renaming shorthands
lorenzogentile404 683c690
Merge branch 'master' into 780-eip-7951-precompile-for-secp256r1-curv…
lorenzogentile404 b0e8be1
updated shorthands
lorenzogentile404 812739b
added specialized computation
lorenzogentile404 fd53f84
added osaka ecdata
lorenzogentile404 ff3faed
updated ec_data columns
lorenzogentile404 c53a2f2
updated ec_data generalities
lorenzogentile404 d3ea5f9
added utils
lorenzogentile404 60235fe
added specialized computation
lorenzogentile404 e2a76f9
added circuit selector
lorenzogentile404 73cf33d
used ISZERO instead of LT for ECRECOVER and P256_VERIFY
lorenzogentile404 46f6500
Merge branch 'master' into 780-eip-7951-precompile-for-secp256r1-curv…
lorenzogentile404 7740e5f
fixed Makefile
lorenzogentile404 da87f2e
fixed callToR1MembershipEXT
lorenzogentile404 63cfb67
fixed address_sum
lorenzogentile404 177afca
used computed columns for circuit selectors
lorenzogentile404 3335fca
partially updated osaka hub with P256_VERIFY
lorenzogentile404 961b7da
fixed precompile success case
lorenzogentile404 84cb1ab
fixed naming
lorenzogentile404 b1ecca9
fixed formatting
lorenzogentile404 cd73010
Merge branch 'master' into 780-eip-7951-precompile-for-secp256r1-curv…
lorenzogentile404 2f23e74
EIP-7823: Set upper bounds for `MODEXP` --- `OOB` side (#813)
OlivierBBB 40959eb
EIP-7823: Set upper bounds for `MODEXP` --- `BLAKE_MODEXP` side (#812)
OlivierBBB c483d9e
EIP-7823: Set upper bounds for `MODEXP` --- `MMU` side (#814)
OlivierBBB 78ad636
Automatic vanishing constraints of `misc/XXX_?` columns when `misc/XX…
OlivierBBB 00e31bc
EIP-7823: Set upper bounds for `MODEXP` --- `HUB` side (#815)
OlivierBBB 2fd0833
Merge branch 'master' into 780-eip-7951-precompile-for-secp256r1-curv…
lorenzogentile404 2a547ac
Replace `R@C` in ROFF constant name with `RAC` (#822)
OlivierBBB 29694c1
Merge branch 'master' into 780-eip-7951-precompile-for-secp256r1-curv…
lorenzogentile404 7a5f259
removed deprecated comments
lorenzogentile404 8923512
added TODOs
lorenzogentile404 4ad1faf
feat: precompile processing justifying success and FKTR update for pv…
amkCha ee70747
feat: update nsr and flag sums + rm TODOs
amkCha 15aa249
Merge branch 'master' into 780-eip-7951-precompile-for-secp256r1-curv…
lorenzogentile404 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 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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,12 +5,21 @@ | |
| P_BN_LO 0x97816a916871ca8d3c208c16d87cfd47 | ||
| SECP256K1N_HI 0xffffffffffffffffffffffffffffffff | ||
| SECP256K1N_LO 0xfffffffffffffffffffffffefffffc2f | ||
| P_R1_HI 0xffffffff000000010000000000000000 | ||
| P_R1_LO 0x00000000ffffffffffffffffffffffff | ||
| SECP256R1N_HI 0xffffffff00000000ffffffffffffffff | ||
| SECP256R1N_LO 0xbce6faada7179e84f3b9cac2fc632551 | ||
| A_COEFF_R1_HI 0xffffffff000000010000000000000000 | ||
| A_COEFF_R1_LO 0x00000000fffffffffffffffffffffffc | ||
| B_COEFF_R1_HI 0x5ac635d8aa3a93e7b3ebbd55769886bc | ||
| B_COEFF_R1_LO 0x651d06b0cc53b0f63bce3c3e27d2604b | ||
| MULMOD 0x09 | ||
| ADDMOD 0x08 | ||
| ECRECOVER 0x01 | ||
| ECADD 0x06 | ||
| ECMUL 0x07 | ||
| ECPAIRING 0x08 | ||
| P256_VERIFY 0x100 | ||
| INDEX_MAX_ECRECOVER_DATA 7 | ||
| INDEX_MAX_ECADD_DATA 7 | ||
| INDEX_MAX_ECMUL_DATA 5 | ||
|
|
@@ -19,6 +28,8 @@ | |
| INDEX_MAX_ECADD_RESULT 3 | ||
| INDEX_MAX_ECMUL_RESULT 3 | ||
| INDEX_MAX_ECPAIRING_RESULT 1 | ||
| INDEX_MAX_P256_VERIFY_DATA 10 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Data Index Error Impacts VerificationThe |
||
| INDEX_MAX_P256_VERIFY_RESULT 1 | ||
| TOTAL_SIZE_ECRECOVER_DATA 128 | ||
| TOTAL_SIZE_ECADD_DATA 128 | ||
| TOTAL_SIZE_ECMUL_DATA 96 | ||
|
|
@@ -27,6 +38,8 @@ | |
| TOTAL_SIZE_ECADD_RESULT 64 | ||
| TOTAL_SIZE_ECMUL_RESULT 64 | ||
| TOTAL_SIZE_ECPAIRING_RESULT 32 | ||
| TOTAL_SIZE_P256_VERIFY_DATA 160 | ||
| TOTAL_SIZE_P256_VERIFY_RESULT 32 | ||
| CT_MAX_SMALL_POINT 3 | ||
| CT_MAX_LARGE_POINT 7) | ||
cursor[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
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.
Bug: Phase IDs collide for precompile operations
Phase constant collision: PHASE_P256_VERIFY_DATA is set to 0x100A, which is identical to the existing PHASE_BLS_MAP_FP_TO_G1_DATA constant (also 0x100A). These phase identifiers must be unique to correctly distinguish between different precompile operations. This collision will cause the system to confuse P256_VERIFY operations with BLS_MAP_FP_TO_G1 operations.