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


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.

  • 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 .... :/
    – A.c
    Dec 4, 2017 at 18:45

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

You can use it like this:

$Secp256k1 = new Secp256k1();

$public_key = $Secp256k1 -> private2public($private_key);

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.