Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added size check to Bowe-Hopwood gadget evaluate method #120

Merged
merged 5 commits into from
Jan 9, 2024

Conversation

rozbb
Copy link
Contributor

@rozbb rozbb commented Oct 4, 2023

Description

Previously, the Bowe-Hopwood CRH gadget would silently fail to hash inputs whose bitlength exceeded NUM_WINDOWS * WINDOW_SIZE * 3. This makes it easy to miss simple things in development, but it's probably not a security issue, since any gadget eval is almost certainly accompanied by a native eval, which does have the size check. Instead, it should say that the input is too large, as the Pedersen CRH gadget does.

This PR adds the check, and also a regression test.


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (main)
  • Linked to Github issue with discussion and accepted design OR have an explanation in the PR that describes this work.
  • Wrote unit tests
  • Updated relevant documentation in the code
  • Added a relevant changelog entry to the Pending section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

@rozbb rozbb requested a review from a team as a code owner October 4, 2023 05:51
@rozbb rozbb requested review from z-tech, Pratyush and mmagician and removed request for a team October 4, 2023 05:51
@Pratyush Pratyush merged commit 2ee4fd6 into arkworks-rs:main Jan 9, 2024
4 of 5 checks passed
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