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 hex encoding of message to create valid hex strings #1179

Merged
merged 6 commits into from Mar 7, 2017

Conversation

danfinlay
Copy link
Contributor

When a non-hex message is submitted for signing, it needs to be encoded into hex in a reliable way.

The previous method did not create valid hex strings, they had an odd length, so this new method pads the hex string to ensure validity.

@danfinlay danfinlay added this to the Publish 3.4.x milestone Mar 7, 2017
@danfinlay
Copy link
Contributor Author

While this does show your message if you don't pre-hex-encode your message, since the message that is ultimately signed is binary, if you don't provide your own binary data to sign, it can be difficult to recover that data.

We should provide some good sample code for recovering from a text message.

Or maybe that's what personal_ecRecover is best for...

@kumavis
Copy link
Member

kumavis commented Mar 7, 2017

couple issues - accidentally included unrelated file

has some custom hex encoding code?

test data is incorrect

@kumavis kumavis merged commit 9e0a4fc into master Mar 7, 2017
@kumavis kumavis deleted the FixHexEncoding branch March 7, 2017 21:10
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

2 participants