Skip to content

chore: Protective asserts in proof decompression#22253

Merged
ledwards2225 merged 3 commits intomerge-train/barretenbergfrom
lde/proof-decomp-asserts
Apr 2, 2026
Merged

chore: Protective asserts in proof decompression#22253
ledwards2225 merged 3 commits intomerge-train/barretenbergfrom
lde/proof-decomp-asserts

Conversation

@ledwards2225
Copy link
Copy Markdown
Contributor

@ledwards2225 ledwards2225 commented Apr 1, 2026

Resolves the following defense in depth issues related to Chonk Proof decompression:

  • 2205: ensure deserialized u256s are less than field modulus. (No real risk in not fixing this; there's no attack)
  • EDIT: 2207: is a non-issue because (0, sqrt(3)) is NOT on BN. keeping the original x==0 representaiton for infinity is fine for both BN and Grump

@ledwards2225 ledwards2225 changed the base branch from next to merge-train/barretenberg April 1, 2026 23:41
@ledwards2225 ledwards2225 marked this pull request as ready for review April 1, 2026 23:41
@ledwards2225 ledwards2225 requested a review from iakovenkos April 2, 2026 16:59

static constexpr uint256_t SIGN_BIT_MASK = uint256_t(1) << 255;

// Non-canonical Fq value used as the point-at-infinity marker for BN254 commitments.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please double check that the comment is correct, it might be reversed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or just add a test confirming that (0,sqrt(3)) is one of the fields and it's rejected?

Copy link
Copy Markdown
Contributor

@iakovenkos iakovenkos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lg! would be great to add a negative test though

@ledwards2225 ledwards2225 merged commit efb95f9 into merge-train/barretenberg Apr 2, 2026
14 checks passed
@ledwards2225 ledwards2225 deleted the lde/proof-decomp-asserts branch April 2, 2026 19:31
github-merge-queue Bot pushed a commit that referenced this pull request Apr 3, 2026
BEGIN_COMMIT_OVERRIDE
fix: minor issues in bigfield (#22216)
chore: Protective asserts in proof decompression (#22253)
END_COMMIT_OVERRIDE
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