Bitcoin Forum

Other => Beginners & Help => Topic started by: xdaxdb on March 13, 2013, 02:06:46 AM



Title: Does dumpprivkey command output include public key?
Post by: xdaxdb on March 13, 2013, 02:06:46 AM
Does dumpprivkey command output include public key?

From what I understand about asymmetrical key encryption aside from the fact that their values are different there is nothing different about them. Either one could be the public or the private key. Does Elliptical Curve not function in this way as well?

I don't understand how when you use the command importprivkey you give it the output of the dumpprivkey command. I would think a private key would be useless without a knowing which public key it works with right? So the only thing I can think of is that dumpprivkey also outputs the public key.

I've been trying to figure out how many bits you can pack into the output of the dumpprivkey command but I don't think I have the math skills to do it. If anyone could enlighten me on that too i would appreciate it.


Title: Re: Does dumpprivkey command output include public key?
Post by: xdaxdb on March 13, 2013, 02:37:39 AM
Let me rephrase this.

How is it possible to import an address with only the private key? I thought it was not possible to derive the other key in the pair just by possessing one of the keys. Public key encryption wouldn't work if you could derive the private key from the public key. I thought it worked both ways.


Title: Re: Does dumpprivkey command output include public key?
Post by: CIYAM on March 13, 2013, 02:47:53 AM
Bitcoin does not use public key *encryption* but instead uses an ECDSA (Eliptical Curve Digital Signature Algorithm) and a Bitcoin address is indeed derived from the private key.


Title: Re: Does dumpprivkey command output include public key?
Post by: xdaxdb on March 13, 2013, 02:58:41 AM
So ECDSA is a Hashing function? Ok the term private key through me off track. So then I assume the Bitcoin Address is a hash (or multiple hashes) of the private key?

-Edit-

Also I have seen "Eliptical Curve" listed numerous times as an asymmetrical encryption method in networking textbooks... I didn't realize ECDSA was something else.


Title: Re: Does dumpprivkey command output include public key?
Post by: Stephen Gornick on March 13, 2013, 11:43:10 AM
Let me rephrase this.

How is it possible to import an address with only the private key? I thought it was not possible to derive the other key in the pair just by possessing one of the keys. Public key encryption wouldn't work if you could derive the private key from the public key. I thought it worked both ways.

Steps to go from private key to Bitcoin address:
 - http://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses


Title: Re: Does dumpprivkey command output include public key?
Post by: xdaxdb on March 14, 2013, 12:58:13 AM
thanks I read that but i'm still confused.

That entire method described taking the public key and hashing it and chopping it up to convert it into a bitcoin address. this still doesn't explain how having the private key you can derive the bitcoin address. because the bitcoin address is basicaly a series of hashes done on the public key. And I was almost certain that one cannot derive the other key in the pair simply by possessing one of the keys in the pair. If you could then people could digure out your private key by having your public key. At least that is how I understand it.


Title: Re: Does dumpprivkey command output include public key?
Post by: Stephen Gornick on March 14, 2013, 03:15:38 AM
I was almost certain that one cannot derive the other key in the pair simply by possessing one of the keys in the pair.

Private key to public key: Yes.

Public key to private key: No.

Quote
This private key is converted to a public key by performing an EC point multiplication with the curve's base point. The result is an (x,y) coordinate pair, which constitutes the public key.
- http://bitcoin.stackexchange.com/a/3610/153


Title: Re: Does dumpprivkey command output include public key?
Post by: xdaxdb on March 14, 2013, 03:20:23 AM
Well I guess i just learned something... do you know if this is unique to elliptic curve or is that true for say Diffie–Hellman as well?