Skip to content
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 support #1351

Draft
wants to merge 27 commits into
base: develop
Choose a base branch
from
Draft

feat: add secp256r1 support #1351

wants to merge 27 commits into from

Conversation

DreamWuGit
Copy link
Member

@DreamWuGit DreamWuGit commented Jun 27, 2024

Description

This PR aims to support secp256r1(p256) precompile from circuit side.

  • refactor struct SignData to generic type SignData<Fq, Affine>
  • add p256 event to PrecompileEvents and provide method to get p256 signature data
  • halo2-lib: update secp256r1 field(Fp, Fq) implement ScalarField.
  • assign new p256 signature data into sig table
  • sig circuit: refactor assign_ecdsa to support new secp256r1
  • sig circuit: refactor sign_data_decomposition to support secp256r1
  • sig circuit: refactor assign_sig_verify to support secp256r1
  • halo2-lib: update is_on_curve_or_infinity applicable to secp256r1
  • sig circuit: add p256 unit tests
  • skip keccak lookup ?
  • todo

Issue Link

[link issue here]

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant