• Forum has been upgraded, all links, images, etc are as they were. Please see Official Announcements for more information

Public key form private key

Marian

New member
Hello

How can I get a public key from a private one? I need to do it in Java, but rpc procedure is ok as well.
 
Hello

How can I get a public key from a private one? I need to do it in Java, but rpc procedure is ok as well.

You can use https://paper.dash.org - Wallet Details.

If you want to get hold of the source --> https://github.com/dashpay/paper.dash.org

upload_2017-3-22_9-44-7.png
 
Hello
How can I get a public key from a private one? I need to do it in Java, but rpc procedure is ok as well.

Hi, As far as I know, algorithm to convert priv to pub in Dash is exactly the same as for Bitcoin and is based on Elliptic Curve multiplication. It is well described in Andreas Antonopolous book: https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch04.asciidoc#public-keys

In turn, the conversion public key to it's Dash address is a bit different, but only in that, that it uses a different version prefix (76 instead of 00).

I think, that for priv->pub conversion you can simply use some existing Java bitcoin library .
 
Hi, As far as I know, algorithm to convert priv to pub in Dash is exactly the same as for Bitcoin and is based on Elliptic Curve multiplication. It is well described in Andreas Antonopolous book: <LINK>

In turn, the conversion public key to it's Dash address is a bit different, but only in that, that it uses a different version prefix (76 instead of 00).

I think, that for priv->pub conversion you can simply use some existing Java bitcoin library .


Thank you, conversion from public key to Dash address was easy to made by changing bitcoinJ library.

I still have a small problem with checking if private key if from Dash world. There is a parameter called "dumpedPrivateKeyHeader" in Bitcoin witch needs to be set to 128 in order to confirm that it is private bitcoin key. When I try to guess that parameter for Dash, number 204 seems to work, can someone confirm that?
 
Thank you, conversion from public key to Dash address was easy to made by changing bitcoinJ library.

I still have a small problem with checking if private key if from Dash world. There is a parameter called "dumpedPrivateKeyHeader" in Bitcoin witch needs to be set to 128 in order to confirm that it is private bitcoin key. When I try to guess that parameter for Dash, number 204 seems to work, can someone confirm that?
Yes, https://github.com/dashpay/dash/blob/master/src/chainparams.cpp#L140
 
Back
Top