Skip to content

Conversation

@strmfos
Copy link
Contributor

@strmfos strmfos commented Jan 21, 2026

Summary

Fix incorrect documentation for s component range validation in verify_eth_signature and is_eth_signature_valid functions.

Type of change

  • Documentation change with concrete technical impact

Why is this change needed?

The documentation stated that both r and s components are validated in range [1, N), but the actual code validates s in the stricter range [1, N/2] (via is_signature_s_valid). This is an important distinction for signature malleability protection (EIP-2).

What was the behavior or documentation before?

Documentation incorrectly stated:

"Also verifies that the r and s components of the signature are in the range [1, N)"

What is the behavior or documentation after?

Documentation now correctly states:

"Also verifies that the r component of the signature is in the range [1, N), and the s component is in the range [1, N/2]"

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

:lgtm:

@orizi reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @strmfos).

@orizi orizi enabled auto-merge January 21, 2026 09:59
@orizi orizi added this pull request to the merge queue Jan 21, 2026
Merged via the queue into starkware-libs:main with commit ddae5f4 Jan 21, 2026
55 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.

3 participants