-
Notifications
You must be signed in to change notification settings - Fork 435
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
feat: add secp256r1 add/double precompiles #400
Conversation
@puma314 For full signature verification, I'll have to add a precompile for secp256r1 point decompression (akin to |
Hey @shuklaayush this is great work! We recently refactored a lot of stuff around our precompiles for EC ops to be more general, so I think you should probably merge in the latest main to this PR? I can take a look afterwards! |
@puma314 Done! Should be good for review |
At some point we should add these precompiles & get them audited, but closing for now since there are a ton of merge conflicts. |
Adds
SECP256R1_ADD
andSECP256R1_DOUBLE
precompiles for secp256r1 (P-256) operations. The implementation is similar to secp256k1 and I reused theWeierstrassAdd
andWeierstrassDouble
chipsRun the tests:
Since the constant$a \neq 0$ for this curve, the constraints in the
WeierstrassDouble
chip were failing on padding rows. I modified it to only check the constraints on rows where theis_real
column is setAddresses #230