diff --git a/src/curve.js b/src/curve.js index 5c5fe59e..1ac667bb 100644 --- a/src/curve.js +++ b/src/curve.js @@ -63,7 +63,7 @@ exports.generateKeyPair = function() { const keyPair = curveJs.generateKeyPair(nodeCrypto.randomBytes(32)); return { privKey: Buffer.from(keyPair.private), - pubKey: Buffer.from(keyPair.public), + pubKey: Buffer.concat([Buffer.from([5]), Buffer.from(keyPair.public)]), }; } }; @@ -117,4 +117,4 @@ exports.verifySignature = function(pubKey, msg, sig) { throw new Error("Invalid signature"); } return curveJs.verify(pubKey, msg, sig); -}; \ No newline at end of file +};