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

6
  • 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
    Commented Jan 29, 2019 at 15:24
  • you could try using an optimized library such as github.com/bitcoin-core/secp256k1
    – JBaczuk
    Commented Jan 29, 2019 at 15:31
  • Point 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.
    Commented Jan 29, 2019 at 15:35
  • 1
    @JamesC good question, from what I can tell, there are different optimizations depending on the operation github.com/bitcoin-core/secp256k1#implementation-details
    – JBaczuk
    Commented Jan 29, 2019 at 16:13
  • So 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
    Commented Jan 29, 2019 at 16:34

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.