Skip to content

Conversation

@GarmashAlex
Copy link
Contributor

@GarmashAlex GarmashAlex commented Oct 28, 2025

Enforce documented strict inequality in BytesToNative() and () by introducing assertBytesLt and using it when WithAllowOverflow is not set.
Prevents accepting byte arrays equal to the field modulus, which previously allowed a non-unique representation of zero and could be exploited by malicious hints.Adds a negative test for the “bytes == modulus” case in BytesToNative().
Emulated conversions already enforced strictness; bringing native conversions into alignment with docs and intent.

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