Bitcoin Forum
November 12, 2024, 12:46:26 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Multiple public adresses for one private key?  (Read 1480 times)
trior (OP)
Member
**
Offline Offline

Activity: 85
Merit: 10


View Profile
April 11, 2014, 09:56:24 AM
 #1



Is it possible to have multiple public addresses for one private key?
If yes how to do it ?

Tanks !!

Chrithu
Full Member
***
Offline Offline

Activity: 224
Merit: 100


View Profile
April 11, 2014, 10:30:38 AM
 #2

I am pretty sure that's impossible.

My understanding is the public key is calculated from the private key in a unique fashion.

cr1776
Legendary
*
Offline Offline

Activity: 4214
Merit: 1313


View Profile
April 11, 2014, 10:39:56 AM
 #3



Is it possible to have multiple public addresses for one private key?
If yes how to do it ?

Tanks !!

The reverse question is a different matter.
Light
Hero Member
*****
Offline Offline

Activity: 742
Merit: 502


Circa 2010


View Profile
April 11, 2014, 10:50:06 AM
 #4

I am pretty sure that's impossible.

My understanding is the public key is calculated from the private key in a unique fashion.

Correct, Bitcoin's current implementation means that it is impossible for you to have more than a single public key from each of your private keys. Mathematically, I believe you might be able to - but this has been addressed by the way Bitcoin has been coded.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3486
Merit: 4832



View Profile
April 11, 2014, 02:34:26 PM
 #5

The private key in Wallet Import Format (WIF) as most of us are used to seeing it actually has 3 important parts.

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

  • (1 byte) A version number.
  • (32 bytes) The ECDSA private key.
  • (4 bytes) A checksum.

By changing the version number, you can generate different bitcoin addresses (one for an uncompressed public key, and the other for a compressed public key) with the same ECDSA private key.  This will result in a different WIF (both the version number and the checksum will be affected) for that private key though, so when viewed in the typical format it will appear to be a different private key.

Abdussamad
Legendary
*
Offline Offline

Activity: 3682
Merit: 1580



View Profile
April 11, 2014, 05:11:20 PM
 #6



Is it possible to have multiple public addresses for one private key?
If yes how to do it ?

Tanks !!

If I were to stretch things a little I could say that a deterministic wallet is an example of unlimited addresses derived from a single private key. That private key is called a seed. Examples of deterministic wallets are electrum and armory. Try them out if you want to see it in action.
cp1
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500


Stop using branwallets


View Profile
April 12, 2014, 02:08:52 AM
 #7

Stealth addresses are similar too.

Guide to armory offline install on USB key:  https://bitcointalk.org/index.php?topic=241730.0
dowsey14
Newbie
*
Offline Offline

Activity: 30
Merit: 0


View Profile
April 14, 2014, 05:54:41 AM
 #8

No, you cannot have multiple public addresses from a single private key.

However, over 28 million private keys can produce the same bitcoin address. Seriously.

However, the chance of every producing a collision is so astronomically rare that you would have to be bitten by a shark, hit by a bus, shot by a gunman, struck by lightning and win the lottery all within a single day.

Trying to get a collision? Forget it, it's virtually impossible!
mintodev
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
April 14, 2014, 07:11:29 AM
 #9

No, it is not possible.

One private key has one public key. So each address has only one private key.
dowsey14
Newbie
*
Offline Offline

Activity: 30
Merit: 0


View Profile
April 14, 2014, 09:55:46 AM
 #10

No, it is not possible.

One private key has one public key. So each address has only one private key.

Ok. I stand corrected. I previously thought that you could have lots of private keys hashing to a single bitcoin address, but that collisions would still be so rare as to render that non-problematic.

The thing that I find interesting is that a private key is enormous compared to the size of a bitcoin address, leading me to believe that it would be possible to hash multiple private keys to the same bitcoin address.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3486
Merit: 4832



View Profile
April 14, 2014, 01:40:05 PM
 #11

No, it is not possible.

One private key has one public key. So each address has only one private key.

Ok. I stand corrected. I previously thought that you could have lots of private keys hashing to a single bitcoin address, but that collisions would still be so rare as to render that non-problematic.

The thing that I find interesting is that a private key is enormous compared to the size of a bitcoin address, leading me to believe that it would be possible to hash multiple private keys to the same bitcoin address.

You are correct.  There are potentially nearly 2256 public keys, and there can't be more than 2160 bitcoin addresses.  Therefore, there are likely to be multiple public keys (and therefore multiple private keys) that all result in the same bitcoin address.  Fortunately, there is no known way to find these additional keys that result in the same address.
cp1
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500


Stop using branwallets


View Profile
April 14, 2014, 01:49:09 PM
 #12

As far as I know:

Private ECDSA key:  256 bits
generate public key from that:  2 32 byte numbers
SHA-256 hash of public key:  256 bits
RIPEMD-160 hash of that:  160 bits
SHA-256 hash that twice and encode in base 58 to get your address.

Throw in some checksums and magic numbers along the way.

Guide to armory offline install on USB key:  https://bitcointalk.org/index.php?topic=241730.0
DannyHamilton
Legendary
*
Offline Offline

Activity: 3486
Merit: 4832



View Profile
April 14, 2014, 02:01:08 PM
 #13

As far as I know:

Private ECDSA key:  256 bits
generate public key from that:  2 32 byte numbers
SHA-256 hash of public key:  256 bits
RIPEMD-160 hash of that:  160 bits
SHA-256 hash that twice and encode in base 58 to get your address.

Throw in some checksums and magic numbers along the way.

The double SHA-256 is for the checksum.  That and the version number are both part of Base58check encoding.

  • Private key:(256 bits)
  • ECDSA public key from that: two 32 bit numbers (512 bits), or one 32 bit number (256 bits) for compressed key
  • SHA-256 hash of public key: 256 bits
  • RIPEMD-160 hash of that: 160 bits
  • Encode in Base58check (Add version byte in front, checksum behind, and encode with special base 58 rules)
kittucrypt
Sr. Member
****
Offline Offline

Activity: 300
Merit: 253

Ok Check!


View Profile
April 14, 2014, 06:12:11 PM
 #14

The private key in Wallet Import Format (WIF) as most of us are used to seeing it actually has 3 important parts.

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

  • (1 byte) A version number.
  • (32 bytes) The ECDSA private key.
  • (4 bytes) A checksum.

By changing the version number, you can generate different bitcoin addresses (one for an uncompressed public key, and the other for a compressed public key) with the same ECDSA private key.  This will result in a different WIF (both the version number and the checksum will be affected) for that private key though, so when viewed in the typical format it will appear to be a different private key.




So does that mean everytime I create a new address on the Bitcoin core, a new Priv+Pub pair is generated? If yes, how are they all tied to my own wallet? How does the application keep them together for me?

DannyHamilton
Legendary
*
Offline Offline

Activity: 3486
Merit: 4832



View Profile
April 14, 2014, 06:26:12 PM
 #15

So does that mean everytime I create a new address on the Bitcoin core, a new Priv+Pub pair is generated?

Yes. (Although with default settings, Bitcoin Core pre-generates 100 addresses)

If yes, how are they all tied to my own wallet? How does the application keep them together for me?

Bitcoin stores all the private keys in a file called wallet.dat.
kittucrypt
Sr. Member
****
Offline Offline

Activity: 300
Merit: 253

Ok Check!


View Profile
April 14, 2014, 06:28:35 PM
 #16

So does that mean everytime I create a new address on the Bitcoin core, a new Priv+Pub pair is generated?

Yes. (Although with default settings, Bitcoin Core pre-generates 100 addresses)

If yes, how are they all tied to my own wallet? How does the application keep them together for me?

Bitcoin stores all the private keys in a file called wallet.dat.

So it generates 100 priv+pub key pairs at the time of installation but does not show them up. Once I click on generating new addresses, it picks one of those and show it to me? If I go beyond 100, it generates new priv+pub key everytime?

Is that how it works?

DannyHamilton
Legendary
*
Offline Offline

Activity: 3486
Merit: 4832



View Profile
April 14, 2014, 06:41:29 PM
 #17

So it generates 100 priv+pub key pairs at the time of installation but does not show them up.

Correct.

Once I click on generating new addresses, it picks one of those and show it to me?

Correct.  It also uses one of those addresses every time you send a transaction (for the change from the transaction).

If I go beyond 100, it generates new priv+pub key everytime?

Is that how it works?

Not quite.

Each time it takes a priv+pub key from the pre-generated pool, it generates a new one to add to the queue.  That way there continues to be a pool of 100 available.

Because of this, you can create a backup at any time, and as long as you haven't used up more than 100 addresses since the backup, you can recover your entire wallet balance from the backup.
kittucrypt
Sr. Member
****
Offline Offline

Activity: 300
Merit: 253

Ok Check!


View Profile
April 14, 2014, 07:53:04 PM
 #18

Ahh Gotcha! Thanks!  Smiley

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!