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

Fix for Global.decodeNBits can produce bigint out of 256 bits scope #1045

Merged
merged 3 commits into from
Jan 20, 2025

Conversation

kushti
Copy link
Member

@kushti kushti commented Jan 6, 2025

In this PR, result of Global.decodeNBits is checked to be fit in 256 bits, to avoid spam attacks
close #1044

@kushti kushti added this to the 6.0.0 milestone Jan 6, 2025
@kushti kushti changed the title Fix for Global.decodeNBits method can produce bigint out of 256 bits scope Fix for Global.decodeNBits / Global.powHit can produce bigint out of 256 bits scope Jan 16, 2025
@kushti kushti changed the title Fix for Global.decodeNBits / Global.powHit can produce bigint out of 256 bits scope Fix for Global.decodeNBits can produce bigint out of 256 bits scope Jan 16, 2025
@kushti kushti self-assigned this Jan 16, 2025
@kushti kushti requested a review from aslesarenko January 16, 2025 13:47
Copy link
Member

@aslesarenko aslesarenko left a comment

Choose a reason for hiding this comment

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

LGTM, but please see comment

an[sigma.validation.ValidationException] should be thrownBy someTest()
}
}

Copy link
Member

Choose a reason for hiding this comment

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

Would be good to have test cases for exact boundaries for the max value N:

  1. for value N it passes
  2. for N+1 it fails

Copy link
Member Author

Choose a reason for hiding this comment

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

done something similar

@kushti kushti merged commit 5f3be02 into v6.0.0 Jan 20, 2025
4 checks passed
@kushti kushti deleted the i1044 branch January 20, 2025 16:12
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