ludbb / secp256k1-py

Python FFI bindings for secp256k1 :dizzy:
MIT License
107 stars 53 forks source link

add and multiply #1

Closed AdamISZ closed 9 years ago

AdamISZ commented 9 years ago

Would you be open to a PR to add functions: PublicKey.multiply(self, scalar) and PrivateKey.add_privkey(self, scalar)? The reason I ask is, I found reason to use the latter at least, in the context of BIP32, in joinmarket. Multiply we might need also, although perhaps not. In any case, thanks for this code, it's working well for me :)

Oh, forgot to add: you can see the additions here: https://github.com/AdamISZ/joinmarket/blob/secp256k1/lib/bitcoin/secp256k1.py

ludbb commented 9 years ago

It's great that it's using the tweak functions, I was about to ask if you were going to use this or if this was some custom code. By all means, you're very welcome to submit a PR.

ludbb commented 9 years ago

Solved by #3 and https://github.com/ludbb/secp256k1-py/commit/74abc4f20e7fe7320c228d256b2fac9c49339793. Version 0.9 includes it and is on pypi already.