Skip to content

[pallet-revive] Reject out of range r/s in the ecRecover precompile#12679

Open
Nathy-bajo wants to merge 2 commits into
paritytech:masterfrom
Nathy-bajo:fix-ecrecover-signature-bounds-12642
Open

[pallet-revive] Reject out of range r/s in the ecRecover precompile#12679
Nathy-bajo wants to merge 2 commits into
paritytech:masterfrom
Nathy-bajo:fix-ecrecover-signature-bounds-12642

Conversation

@Nathy-bajo

Copy link
Copy Markdown
Contributor

Closes #12642

The 0x01 ecRecover precompile now rejects r or s equal to zero or greater than or equal to the secp256k1 order N before recovery, matching go-ethereum's ValidateSignatureValues (homestead=false) and closing a consensus divergence and signature malleability caused by some sp_io backends reducing an out of range s modulo N

@Nathy-bajo
Nathy-bajo requested a review from a team as a code owner July 17, 2026 19:45
@Nathy-bajo

Copy link
Copy Markdown
Contributor Author

/cmd label T7-smart_contracts

@paritytech-cmd-bot-polkadot-sdk paritytech-cmd-bot-polkadot-sdk Bot added the T7-smart_contracts This PR/Issue is related to smart contracts. label Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T7-smart_contracts This PR/Issue is related to smart contracts.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[pallet-revive] ecRecover precompile accepts r/s >= N (consensus divergence and malleability)

1 participant