Skip to content

chore: cycle group defense in depth#23118

Merged
ledwards2225 merged 2 commits into
merge-train/barretenbergfrom
lde/cycle-update
May 11, 2026
Merged

chore: cycle group defense in depth#23118
ledwards2225 merged 2 commits into
merge-train/barretenbergfrom
lde/cycle-update

Conversation

@ledwards2225
Copy link
Copy Markdown
Contributor

@ledwards2225 ledwards2225 commented May 8, 2026

Adds safety mechanisms to protect against two currently unreachable cycle_group footguns:

  • In-circuit rejection of point-at-infinity operands in cycle_group::_unconditional_add_or_subtract: the ecc_add_gate is degenerate at (0, 0) and admits forged outputs. Replaces builder-only BB_ASSERT(!is_constant_point_at_infinity) with in-circuit is_point_at_infinity().assert_equal(false). No additional gates and no VK change for existing circuits. Unreachable from noir.
  • Clarify offset-generator collision-avoidance contract in MSM helpers: adds a BB_ASSERT(base_point != offset_generator) in straus_lookup_table to catch the (highly improbably) honest-dev mistake of these two coinciding (and makes it clear that they must not).

@ledwards2225 ledwards2225 marked this pull request as ready for review May 8, 2026 21:45
@ledwards2225 ledwards2225 merged commit 1b0b06c into merge-train/barretenberg May 11, 2026
25 checks passed
@ledwards2225 ledwards2225 deleted the lde/cycle-update branch May 11, 2026 13:57
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.

3 participants