Sanka555 uses piece of code which I posted here long time ago. Obtaining the address is correct, four
repeated lines are used to create address on the specific derivation path - of course it is not parametrized (coin, account, address number, hardened or not), but idea is correct. It corresponds to path 84'/0'/0'/0
There is nothing wrong with reusing variable
deterministicKey. Of course if you would like to generate
x addresses, you must keep "one to last" key and then generate child based on it.
Sanka555: what exactly is slow and what does it mean 'slow'? Which speed do you expect?
Now I am guessing, I have no time now to check source code:
If you launch it only once, it is possible that during first launch you must initiate Digests (functions for hash) etc. Some of them probably are reused later.
Try to launch the same code several times, just to see if next iterations have different execution time than the first one.
Other approach would be to see what you may externalize and initialize before you calculate address.
Update:
I was right, method
HDKeyDerivation.createMasterPrivateKey(seed); creates HmacSha512 digest, which may take some time. You may take a look how I calculate address in my program (and what is externalized or calculated outside).
See method check() (line 126):
https://github.com/PawelGorny/lostword/blob/master/src/main/java/com/pawelgorny/lostword/Worker.javaI really have no idea how to help you, as you create many topics about similar issues and it seems you really do not know what you do.