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: handle invalid high bits in ECRecover v value #1602

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

VolodymyrBg
Copy link

The ECRecover precompile was already returning an empty vector for invalid v values, but the comment wasn't clear about handling high bits. This commit updates the comment to be more explicit about checking for any set high bits in the v value (bytes 32-62 must be 0) and that v (byte 63) can only be 27 or 28.

Fixes TODO comment regarding "InvalidHighV-bits-1" test case.


The ECRecover precompile was already returning an empty vector for invalid v values,
but the comment wasn't clear about handling high bits. This commit updates the
comment to be more explicit about checking for any set high bits in the v value
(bytes 32-62 must be 0) and that v (byte 63) can only be 27 or 28.

Fixes TODO comment regarding "InvalidHighV-bits-1" test case.
@VolodymyrBg VolodymyrBg requested a review from sorpaas as a code owner January 21, 2025 17:03
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