Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

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
@gakonst gakonst force-pushed the gakonst/signature-verify branch from 2967475 to a906fa0 Compare June 17, 2020 06:35
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 force-pushed the gakonst/signature-verify branch from a906fa0 to afc525b Compare June 17, 2020 06:39
@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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant