-
Notifications
You must be signed in to change notification settings - Fork 62
Conversation
@@ -17,7 +17,7 @@ import { | |||
|
|||
function ecdhX(publicKey: Buffer, privateKey: Buffer) { | |||
// return (publicKey * privateKey).x | |||
return ecdhUnsafe(publicKey, privateKey, true).slice(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that this breaks the tests. The ecdhUnsafe method seems to be removed from v4. Needs investigation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@holgerd77 any idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here was some issue on ecdhUnsafe from Vinay before, not sure if this is related: cryptocoinjs/secp256k1-node#138
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have posted a question on this over on the secp256k1-node
library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See answer over on the repo thread
Thanks for tackling this. There are still 4 tests failing, also make sure to have a look at the linting error, always a favorite to be forgotten by everyone. 😋 (we should also add these Husky pre-push linting check we have added on the other libraries - e.g. here on MPT - turned out to become really a time and nerve saver. |
return pubKey | ||
} | ||
// @ts-ignore | ||
return Buffer.from(ecdh(publicKey, privateKey, { hashfn }, Buffer.alloc(33)).slice(1)) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just totally unable to review here. Where did you get this code from respectively - if you wrote yourself - can you further explain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: ah, just seeing your private messages on this, ok, looks good in this context! 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, great, thank you. Will merge.
No description provided.