Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Can't recover signatures when r or s is < 32-bytes #1289

Closed
carver opened this issue Jan 11, 2018 · 0 comments
Closed

Can't recover signatures when r or s is < 32-bytes #1289

carver opened this issue Jan 11, 2018 · 0 comments

Comments

@carver
Copy link
Contributor

carver commented Jan 11, 2018

This appears to be an eth-lib issue, but it bubbles up here, so should be tested and tracked.

This happens when the r or s component of a signature is 31 bytes or fewer. (assuming uniform distribution, around 1% of the time)

The signature encode/decode in eth-lib assumes that it is always 66 bytes long, and slices up the signature incorrectly, so it cannot recover the sender of the transaction.

I created a test to demonstrate this issue, but can't work on fixing it for a while. I'll attach a PR shortly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants