-
Notifications
You must be signed in to change notification settings - Fork 367
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
sign interprets message as hex even when it's not hex #56
Comments
I think this makes sense. Could you be interested in submitting the fix for this? |
Should note, that this problem not only in elliptic.. hash.js and maybe other libraries. |
Again, one of the scariest parts of the |
Perhaps close in favour of #105, otherwise, related |
Agree. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
toArray
function strips non-hex characters without warning. If a user tries to pass a UTF8 string as the message, they may assume that it is signing the string message and not realize that the message is being interpreted as hex with non-hex characters stripped. It would be more defensive to throw an exception here:https://github.com/indutny/elliptic/blob/master/lib/elliptic/utils.js#L33
https://github.com/indutny/elliptic/blob/master/lib/elliptic/utils.js#L164
The text was updated successfully, but these errors were encountered: