Suppose I just used vanitygen to create this key:

Pattern: 1a
Address: e1aMGYXuGpUwDGH9gz3ZBs8UH746nRdEk6
Privkey: 5KhCszBi22hEZZixPEQkLAMtUVkxbGaxBFsH7a9iefqrxHmSXgH

All I had to do to import this key was import the Privkey. Nothing with "Address' was needed with ImportPrivKey.

I'd like to know the technical details on how the Address can be extracted when all that is known is the private key.

I've read this and this question, but still haven't found the secret sauce on how an Address is calculated or found in binary format given only a private key. How is the Address extracted from the private key alone?

My intent is to learn this process and implement it in C#. Note that I already know the Base58Check format, and there is no mention of the private key in any wiki I've seen regarding that.

  • Getting public key from a private key would be better answered in a cryptography SE, as it is not Bitcoin-specific.
    – ThePiachu
    Dec 18, 2012 at 8:25
  • It could be made Bitcoin-specific if we exchange the term "address" for the term "public key" - although the base question (and its answer) is still the same. Dec 19, 2012 at 5:55
  • @DavidPerry I'm breaking that habit... ;) and updated the post Dec 19, 2012 at 6:39

3 Answers 3


You ought to ask this question on CryptoSE, as the problem is not Bitcoin-specific. I've even done that for you.

In short:

The public key is QA=dAG where G is the base point on the curve defined in the publicly agreed upon parameters.

And you can find the Bitcoin curve (secp256k1) parameters in the wiki.


Have you looked at references of http://en.wikipedia.org/wiki/Elliptic_Curve_DSA Like: Certicom Research, Standards for efficient cryptography, SEC 1: Elliptic Curve Cryptography, Version 2.0, May 21, 2009.


The Technical background of Bitcoin addresses article in the Bitcoin Wiki describes in detail how a Bitcoin address is obtained from a Private key.

Private key to Bitcoin Address

  • I saw this but I don't see where the private key becomes the public key. That is just ECC public key to Base58. The article you link says When a private key is imported, it always corresponds to exactly one Bitcoin address. Any utility which performs the conversion can display the matching Bitcoin address. The mathematical conversion is somewhat complex and best left to a computer, ... that last part is leaving me hanging, and the details on the other link don't help as far as I can tell. Dec 18, 2012 at 2:27
  • 1
    If you multiply the private key by the order of the curve, you get the public key point. If x is the private key Gx is the public key. So it's a simple EC multiplication to get the public key from the private key. Dec 18, 2012 at 9:39
  • @DavidSchwartz Is there any primer on this for the non-mathematician? Perhaps secep256 is unique, but I just don't understand that variant of ECC yet. Dec 19, 2012 at 6:44
  • It is going to be language specific. Python: bitcointalk.org/index.php?topic=84238.0 Shell (Bash): github.com/grondilu/bitcoin-bash-tools And there may be others. Dec 19, 2012 at 6:58

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.