-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Don't kill 1/2 bytes from private keys please #2033
Labels
Bug
Addressing a bug
Comments
mirek
changed the title
Don't kill two bytes from private keys please
Don't kill 1/2 bytes from private keys please
Nov 2, 2018
This was referenced Mar 31, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using:
a) If your private key is hex0x - all good.
b) If your private key is hex - everyting will work fine, no errors, but your signed transaction will be with private key with one byte zero'ed.
c) If your private key is Buffer - everything will be signed, no errors, but your signed transaction will be with private key with two first bytes zero'ed.
...which is kind of cute that 3 different representations create 3 valid, different signed transactions, all thanks to web3 not validating it's inputs and this internally doing the same https://github.com/MaiaVictor/eth-lib/blob/master/src/account.js#L47
The text was updated successfully, but these errors were encountered: