Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Clarify ECDSA verification in RIP 7212#62

Open
tjade273 wants to merge 1 commit into
ethereum:master from
trail-of-forks:rip-7212-patch-1
Open

Clarify ECDSA verification in RIP 7212 #62
tjade273 wants to merge 1 commit into
ethereum:master from
trail-of-forks:rip-7212-patch-1

Conversation

@tjade273

@tjade273 tjade273 commented Mar 10, 2025

Copy link
Copy Markdown

The x coordinate of R may be greater than n.

The current specification of RIP-7212 compares the x coordinate with the signature r value directly (as integers, presumably), which may return false when the standard result should be true

This happens with negligible probability for honest signatures, but a malicious signature can be constructed which triggers this case. Disagreement could cause differing behavior on various EVM chains.

Similarly, it is not specified what should happen when the recovered R' is the point at infinity. Most implementations will likely fail (correctly) but some may incorrectly treat R'.x as 0.

The `x` coordinate of `R` may be greater than `n`. 
The current specification of RIP-7212 compares the `x` coordinate with the signature `r` value directly (as integers, presumably), which may return `false` when the standard result should be `true`
This happens with negligible probability for honest signatures, but a malicious signature can be constructed which triggers this case. Disagreement could cause differing behavior on various EVM chains.
Similarly, it is not specified what should happen when the recovered `R'` is the point at infinity. Most implementations will likely fail (correctly) but some may incorrectly treat `R'.x` as `0`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /