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

SEC-19 ECDSA recovery id (V) is casted from uint64 to single byte #456

Closed
Gustav-Simonsson opened this issue Mar 11, 2015 · 1 comment
Closed
Milestone

Comments

@Gustav-Simonsson
Copy link

V can be treated as an integer everywhere it is used in the Go code, which avoids possibility of truncation of high bytes when casting from uint64 to (a single) byte.

See YP Appendix F.

@Gustav-Simonsson Gustav-Simonsson changed the title SEC-19 Always handle ECDSA recovery id (V) as integer to avoid type casting SEC-19 ECDSA recovery id (V) is casted from uint64 to single byte Mar 11, 2015
@obscuren
Copy link
Contributor

An integer in go is not a single byte. It's either int32 or int64 depending on the host. V should always be a single byte. I'll change the implementation to take a byte rather than an uint64.

@obscuren obscuren added this to the Frontier milestone Mar 11, 2015
jpeletier pushed a commit to epiclabs-io/go-ethereum that referenced this issue Apr 27, 2018
maoueh pushed a commit to streamingfast/go-ethereum that referenced this issue Nov 12, 2021
* ci: add unit test

fix: failed on test

* ci: add truffle test

* ci: update os version

* ci: add cache for go build
maoueh pushed a commit to streamingfast/go-ethereum that referenced this issue Jan 6, 2023
tanishqjasoria pushed a commit to tanishqjasoria/go-ethereum that referenced this issue Oct 31, 2023
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