Take the 2-minute tour ×
Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It's 100% free, no registration required.

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.

share|improve this question
    
Getting public key from a private key would be better answered in a cryptography SE, as it is not Bitcoin-specific. –  ThePiachu Dec 18 '12 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. –  David Perry Dec 19 '12 at 5:55
    
@DavidPerry I'm breaking that habit... ;) and updated the post –  makerofthings7 Dec 19 '12 at 6:39
add comment

3 Answers

up vote 4 down vote accepted

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

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

share|improve this answer
    
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. –  makerofthings7 Dec 18 '12 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. –  David Schwartz Dec 18 '12 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. –  makerofthings7 Dec 19 '12 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. –  Stephen Gornick Dec 19 '12 at 6:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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