Use correct function to determine yP for pubkey compression. Fixes #6.
This commit is contained in:
parent
795abdce1f
commit
d03e489913
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ ECPointFp.prototype.getEncoded = function (compressed) {
|
||||||
var enc = integerToBytes(x, 32);
|
var enc = integerToBytes(x, 32);
|
||||||
|
|
||||||
if (compressed) {
|
if (compressed) {
|
||||||
if (y.testBit(0)) {
|
if (y.isEven()) {
|
||||||
enc.unshift(0x02);
|
enc.unshift(0x02);
|
||||||
} else {
|
} else {
|
||||||
enc.unshift(0x03);
|
enc.unshift(0x03);
|
||||||
|
|
Loading…
Reference in a new issue