elliptic icon indicating copy to clipboard operation
elliptic copied to clipboard

Bug fix: recoverPubKey -> take msg as hex

Open nakov opened this issue 7 years ago • 4 comments

The EC.recoverPubKey(msg, signature, j, enc) should take the input msg as hex number, not decimal.

See https://github.com/indutny/elliptic/issues/150

nakov avatar Apr 04 '18 13:04 nakov

Coverage Status

Coverage remained the same at 89.152% when pulling 11054a1a3f0edf05a865a9f13cd55fbf43544a31 on nakov:master into 776c9b0e99832ab9fa6c5fa6f684c484ca5265b2 on indutny:master.

coveralls avatar Apr 04 '18 13:04 coveralls

If I am not mistaken, also we need to _truncateToN msg, so that line should be var e = this._truncateToN(new BN(msg, 16));

k1rill-fedoseev avatar Apr 06 '18 14:04 k1rill-fedoseev

It would be very cool if somebody could merge this fix.

gianlucafrei avatar Jan 31 '19 18:01 gianlucafrei

hey could someone merge this?

aka-toxa avatar Jun 20 '22 17:06 aka-toxa