0
I have run into a problem when trying to generate public keys from my mnemonics via privatekeys. The mnemonic -> privkey is fairly fast. Although when deriving the m/44./0./0./0/0 public adress it takes about a 1.2s, which is way too slow. I first thought this was typical for the hasing functions, but when generating privatekeys online I see that one can generate 20-30 publickeys per seconds on a simple web-script.
Do anyone have a solution or could point me in the right direction on how to do this? I have a text-document with a couple of million privkeys to go through and would appreciate all help.
Br
Right now I am using the python lib btctools, if it is of interest. I am not sure why it take such a long time generating the addresses. – Auxilium – 2019-01-29T15:24:47.147
you could try using an optimized library such as https://github.com/bitcoin-core/secp256k1
– JBaczuk – 2019-01-29T15:31:34.743Point operations over 256bits are expensive, even with double and add algorithm which is O(logn) complexity. @JBaczuk What algorithm is used in libsecp256k1? – James C. – 2019-01-29T15:35:08.380
1
@JamesC good question, from what I can tell, there are different optimizations depending on the operation https://github.com/bitcoin-core/secp256k1#implementation-details
– JBaczuk – 2019-01-29T16:13:47.930So the 1.2s seems to be slow? So that I am not looking for an answer that is impossible to find. I will look into that, sadly I haven't been coding a lot... – Auxilium – 2019-01-29T16:34:05.133
Author here, it's just a toy library written in pure python with no optimizations at all. I don't think libsecp can generate HD keys. Maybe give pywallet a try. – Mike D – 2019-01-29T17:51:29.587