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

Fix Signature Recovery Id & expose verify function #21

Merged
merged 1 commit into from Jun 17, 2020

Conversation

gakonst
Copy link
Owner

@gakonst gakonst commented Jun 17, 2020

Motivation

The recovery_id was stored as a u8. This means that EIP-155 signatures with larger chain_id's would fail (since we'd overflow the variable).

Solution

Storing v as u64 fixes this.

Also exposes a Signature.verify function, as per @tuxxy suggestion.

@gakonst gakonst changed the base branch from master to gakonst/crypto-fixes June 17, 2020 06:34
Base automatically changed from gakonst/crypto-fixes to master June 17, 2020 06:38
u8 would not work if a large chain_id was used
@gakonst gakonst merged commit 2c734f0 into master Jun 17, 2020
@gakonst gakonst deleted the gakonst/signature-verify branch June 17, 2020 06:45
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.

None yet

1 participant