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

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants