Skip to content

fix: subgroup check in r-check branch for TE and SW#193

Open
MozirDmitriy wants to merge 2 commits into
arkworks-rs:masterfrom
MozirDmitriy:fix/subgroup-check-r-check-te-sw
Open

fix: subgroup check in r-check branch for TE and SW#193
MozirDmitriy wants to merge 2 commits into
arkworks-rs:masterfrom
MozirDmitriy:fix/subgroup-check-r-check-te-sw

Conversation

@MozirDmitriy
Copy link
Copy Markdown

Replace the no-op constraint in the r-check witness allocation path with a real subgroup check. For both Twisted Edwards and Short Weierstrass gadgets, enforce that (r-1)ge equals -ge by checking ge.negate() == result. This restores the intended prime-order subgroup enforcement parity with enforce_prime_order and prevents bypassing constraints.

@MozirDmitriy MozirDmitriy requested a review from a team as a code owner October 6, 2025 08:35
@MozirDmitriy MozirDmitriy requested review from mmagician, weikengchen and z-tech and removed request for a team October 6, 2025 08:35
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.

1 participant