1

As described here (https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses) I am trying to convert a private ECDSA key to its corresponding public key. (See step1 and step2).

I think I need some code which multiplies some coordinates on the elliptic curve. But I dont know how. Can someone help me, please?

// Unfortunately, this answer doesn't help me enough since I don't understand how to use the code. Can someone clearify that or give alternative solutions? Thanks

2 Answers 2

1

Yeah, you do "need some code which multiplies some coordinates on the elliptic curve" :). If you don't have extensive cryptography experience I would recommend you use library rather than trying to implement details yourself.

Googling I've found Bitcoin-lib-php. Looking at the code it seems it seems this function does exactly what you are looking for.

1
  • Thanks! Unfortunately, I am not able to get this code running. I dont have classes in my php but the code you suggested does need classes and a lot of other stuff (composer ...). Is there a solution which is a bit easier? I am not able to implement this due to lack of programming skills .... :/ Commented Dec 4, 2017 at 18:45
0

I created a small PHP library. You can do that using this class

You can use it like this:

require('secp256k1.php'); $Secp256k1 = new Secp256k1(); $public_key = $Secp256k1 -> private2public($private_key); 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.