Skip to content

Add NonIdentityPoint::new_from_constant#887

Open
ConstanceBeguier wants to merge 1 commit into
zcash:mainfrom
QED-it:add_non_identity_constant_point
Open

Add NonIdentityPoint::new_from_constant#887
ConstanceBeguier wants to merge 1 commit into
zcash:mainfrom
QED-it:add_non_identity_constant_point

Conversation

@ConstanceBeguier
Copy link
Copy Markdown
Contributor

This PR adds NonIdentityPoint::new_from_constant to enable creating non-identity points that are properly pinned to constants, which is required by the Orchard ZSA circuit (Orchard PR).

More precisely, in the Orchard ZSA circuit, q_init_zec / q_init_zsa must be constrained to fixed constants, as they define the initial point Q of the Sinsemilla hash. If constructed via NonIdentityPoint::new, they remain unconstrained witnesses, allowing a prover to inject an arbitrary on-curve point and break commitment soundness.

This PR adds `NonIdentityPoint::new_from_constant` to enable creating non-identity points that are properly pinned to constants, which is required by the Orchard ZSA circuit ([Orchard PR](QED-it/orchard#246)).

More precisely, in the Orchard ZSA circuit, `q_init_zec` / `q_init_zsa` must be constrained to fixed constants, as they define the initial point `Q` of the Sinsemilla hash. If constructed via `NonIdentityPoint::new`, they remain unconstrained witnesses, allowing a prover to inject an arbitrary on-curve point and break commitment soundness.
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 68.75000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.36%. Comparing base (7e76b1c) to head (d44d277).
⚠️ Report is 14 commits behind head on main.

Files with missing lines Patch % Lines
halo2_gadgets/src/ecc/chip/witness_point.rs 37.50% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #887      +/-   ##
==========================================
+ Coverage   83.31%   83.36%   +0.05%     
==========================================
  Files         105      105              
  Lines       13054    13048       -6     
==========================================
+ Hits        10876    10878       +2     
+ Misses       2178     2170       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants