3

I have installed secp256k1, so that i can use ECDH functionality

sudo apt-get install libssl-dev build-essential automake pkg-config libtool libffi-dev libgmp-dev libyaml-cpp-dev
pip install secp256k1

on its documentation its, written that

NOTE: ecdh can only be used if the secp256k1 C library is compiled 
with support for it. If there is no support, an Exception will be 
raised when calling it

Obviously it failed because i didnt have C library installed .

I then installed

https://github.com/bitcoin-core/secp256k1 according to the documentation. I then uninstalled secp256k1 and installed it again.

pip uninstall secp256k1 
LIB_DIR=/usr/local/lib pip install secp256k1 --no-binary 

Still, i am getting the same error while trying to run ECDH. How can i make this error go away.

GraphicalDot
  • 2,644
  • 2
  • 28
  • 43
  • 1
    See https://github.com/andreacorbellini/ecc/blob/master/scripts/ecdhe.py for an excellent implementation of ECDH secp256k1 key generation and key exchange using native python without additional libraries. – mti2935 Aug 09 '21 at 22:08

0 Answers0