Author

Topic: Getting the bitcoin address of a private key (Read 2633 times)

kjj
legendary
Activity: 1302
Merit: 1026
December 16, 2013, 11:39:30 PM
#9
Any collection of 256 bits is a private key.  For best results, use a high quality source of random bits.

Also, those things that start with a 5 are called WIFs.  They are used to encode the binary private key in base58check.

https://en.bitcoin.it/wiki/WIF

Note that if you are doing this for real, you'll need to read up on public key point compression.
full member
Activity: 165
Merit: 100
December 16, 2013, 10:47:38 AM
#8
How to get the bitcoin private key? Just convert the 32 bit private key to 58base?

Thanks.
hero member
Activity: 518
Merit: 500
December 16, 2013, 01:54:11 AM
#7

I think that link skips a big conceptual step (at least for beginners), namely... the creation of the public key.

Starting from the private key, which is just a random 256 bit number, obtaining the public key requires performing a series of operations using elliptic curves (specifically, perform an "elliptic curve point multiplication" of the private key integer and a "generator" point on the specific curve that Bitcoin uses). THEN once you have the public key, you can follow the steps in that link.



So you are saying its possible to create the public key from the private key. But just "how possible"? Is it something done regularly or something that requires huge amounts of processing power?

It's not only possible... it's the standard way every bitcoin address is generated.

Steps:

1. Generate a random number. <-- this IS your private key
2. Perform a hard-to-explain-but-easy-for-a-computer-to-do elliptic curve math operation to get the public key.
3. Apply the RIPEMD160 and SHA256 hash functions on the public key to get what is generally known as the "Bitcoin address"



Gotcha - thanks very  much for the explanation
legendary
Activity: 1008
Merit: 1000
December 16, 2013, 01:43:15 AM
#6

I think that link skips a big conceptual step (at least for beginners), namely... the creation of the public key.

Starting from the private key, which is just a random 256 bit number, obtaining the public key requires performing a series of operations using elliptic curves (specifically, perform an "elliptic curve point multiplication" of the private key integer and a "generator" point on the specific curve that Bitcoin uses). THEN once you have the public key, you can follow the steps in that link.



So you are saying its possible to create the public key from the private key. But just "how possible"? Is it something done regularly or something that requires huge amounts of processing power?

It's not only possible... it's the standard way every bitcoin address is generated.

Steps:

1. Generate a random number. <-- this IS your private key
2. Perform a hard-to-explain-but-easy-for-a-computer-to-do elliptic curve math operation to get the public key.
3. Apply the RIPEMD160 and SHA256 hash functions on the public key to get what is generally known as the "Bitcoin address"

hero member
Activity: 518
Merit: 500
December 15, 2013, 08:34:27 PM
#5

I think that link skips a big conceptual step (at least for beginners), namely... the creation of the public key.

Starting from the private key, which is just a random 256 bit number, obtaining the public key requires performing a series of operations using elliptic curves (specifically, perform an "elliptic curve point multiplication" of the private key integer and a "generator" point on the specific curve that Bitcoin uses). THEN once you have the public key, you can follow the steps in that link.



So you are saying its possible to create the public key from the private key. But just "how possible"? Is it something done regularly or something that requires huge amounts of processing power?
legendary
Activity: 1302
Merit: 1007
December 15, 2013, 06:03:20 PM
#4

I think that link skips a big conceptual step (at least for beginners), namely... the creation of the public key.

Starting from the private key, which is just a random 256 bit number, obtaining the public key requires performing a series of operations using elliptic curves (specifically, perform an "elliptic curve point multiplication" of the private key integer and a "generator" point on the specific curve that Bitcoin uses). THEN once you have the public key, you can follow the steps in that link.


Yeah, I noticed that. I just need to know the starting point from the 5XXX[...] private key. Unfortunately, the wiki doesn't mention that.
legendary
Activity: 1008
Merit: 1000
December 15, 2013, 04:02:02 PM
#3

I think that link skips a big conceptual step (at least for beginners), namely... the creation of the public key.

Starting from the private key, which is just a random 256 bit number, obtaining the public key requires performing a series of operations using elliptic curves (specifically, perform an "elliptic curve point multiplication" of the private key integer and a "generator" point on the specific curve that Bitcoin uses). THEN once you have the public key, you can follow the steps in that link.

legendary
Activity: 1302
Merit: 1007
December 15, 2013, 12:18:04 PM
#1
So, I'm playing around with bitcoin in JavaScript but I haven't found anywhere online how to calculate the bitcoin address of a Base 58 private key (starting with a 5). Can anyone tell me how or provide me a link with documentation? I'm not asking for a script, just conceptually how to do it.
Jump to: