Skip to content

Fix SW witness subgroup check - #211

Draft
okrame wants to merge 1 commit into
arkworks-rs:masterfrom
okrame:agent/fix-sw-witness-subgroup-check
Draft

Fix SW witness subgroup check#211
okrame wants to merge 1 commit into
arkworks-rs:masterfrom
okrame:agent/fix-sw-witness-subgroup-check

Conversation

@okrame

@okrame okrame commented Jul 13, 2026

Copy link
Copy Markdown

Summary

  • enforce the scalar-order relation in the fallback subgroup check instead of a tautological self-equality
  • add a BLS12-377 G2 regression test covering both subgroup and non-subgroup witnesses

Why

The fallback path computes (r - 1) * ge, but previously enforced ge == ge. Enforcing -ge == (r - 1) * ge instead proves r * ge == 0, so witness allocation rejects points outside the prime-order subgroup.

Closes #199.

Testing

  • cargo fmt --all -- --check
  • cargo test test_bls12_377_g2_witness_subgroup_check --lib

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.

Prime order/subgroup check missing on BLS12-377(short_weierstrass) ProofVars (allocated as Witness)

1 participant