Post
Topic
Board Development & Technical Discussion
Re: Pure Python ECDSA implementation?
by
itod
on 26/01/2014, 23:27:11 UTC
Is there a pure Python ECDSA Secp256k1 implementation? I don't care how slow it is, because calling libcrypto in a loop gives me Segmentation fault every 3-4 million loops. I'm using Joric/bitcoin-dev implementation and I've tried to find the cause with gdb, but give up on it, have no more nerves for it.

Using some utility through RPC is not an attractive option because of overhead. If anyone has a link to a native Python solution I would be grateful.


https://github.com/warner/python-ecdsa



Sorry, but just a slightly off-kilter question for you... Why not use C++? I assume you may develop Python on a Linux platform, so development and IDE usage would be similar. Hell, even the syntax is similar. With C++, however, you get more control from your code.

I've found that, but README says:
Curves included:  prime192v1, secp224r1, prime256v1, secp384r1, and secp521r1.
Problem is Bitcoin's Secp256k1 is not there, and I'm not sure if I would dare to do that myself.

Regarding your C++ question, I've never done any serious C++ work, just very small things, but this thing made me ask that same question myself. If I don't find a solution by tomorrow I'll give up on Python for this job. Even tried to see how Armory is doing that, and it also depends on non-native library. I've Googled it everywhere before I've posted a question here.