Skip to content
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

Fix ecdhUnsafe for bindings #139

Merged
merged 1 commit into from
Dec 29, 2018
Merged

Fix ecdhUnsafe for bindings #139

merged 1 commit into from
Dec 29, 2018

Conversation

fanatid
Copy link
Member

@fanatid fanatid commented Dec 29, 2018

Issue #138

@vpulim can you test this changes?

@vpulim
Copy link

vpulim commented Dec 29, 2018

Awesome! This seems to have fixed the issue. Thanks for the fast turnaround.

@fanatid fanatid merged commit cbf137e into master Dec 29, 2018
@fanatid fanatid deleted the fix-ecdh branch December 29, 2018 16:34
@fanatid
Copy link
Member Author

fanatid commented Dec 29, 2018

Thanks for tests. Published as 3.6.1
3.6.0 marked as depricated

@holgerd77
Copy link

Hi @fanatid, the secp256k1.ecdhUnsafe function seems not to be available on v4.0.1 any more, see following test output:

$ node
Welcome to Node.js v12.15.0.
Type ".help" for more information.
> const secp256k1 = require('secp256k1')
undefined
> secp256k1.ecd
secp256k1.ecdh          secp256k1.ecdsaRecover  secp256k1.ecdsaSign     secp256k1.ecdsaVerify

> secp256k1.ecd
secp256k1.ecdh          secp256k1.ecdsaRecover  secp256k1.ecdsaSign     secp256k1.ecdsaVerify

> secp256k1.ecdhUnsafe
undefined
> secp256k1.ecdh
[Function: ecdh]

Was this an intentional change and can you explain what happened? We are stumbling upon this on the devp2p library trying to update the secp256k1 version here ethereumjs/ethereumjs-devp2p#68

@fanatid
Copy link
Member Author

fanatid commented May 14, 2020

Hi @holgerd77! ecdhUnsafe was removed since secp256k1 upstream now allow custom functions for ECDH.
README have example how receive same data as from ecdhUnsafe in 3.x https://github.com/cryptocoinjs/secp256k1-node/tree/v4.0.1#get-x-point-of-ecdh

@holgerd77
Copy link

@fanatid thanks, great! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants