Is it possible to generate every address from one seed

Ivan

Member
Just came to know that a wallet is capable to generate a lot more address than 20 or 30.
I would like to know is there a limit to how many bitcoin public keys be generated using one seed phrase. Is it unlimited? If it's not limited then this would mean that wallets with different seeds would cause a clash of their addresses. Am I right?
 

Dilan

New member
I would like to know is there a limit to how many bitcoin public keys be generated using one seed phrase. Is it unlimited?
It is unlimited
If it's not limited then this would mean that wallets with different seeds would cause a clash of their addresses. Am I right?
You really gave a good point however I think there must have an explanation. I will wait for others answer.
 

Greyson

New member
It is unlimited

You really gave a good point however I think there must have an explanation. I will wait for others answer.
It is not unlimited, nothing in bitcoin is.
you are still generating a private key in a finite space (from 1 to n which is a little smaller than 2256) so it is limited by that number.

as for the second part it is talking about collision. or in other words a collision in the truncated HMAC-SHA512 digest which is not going to happen in our lifetime. it is the same argument about "can two person generate the same random private key"
 

Cooper

Member
It is unlimited

You really gave a good point however I think there must have an explanation. I will wait for others answer.
As pooya said it is limited to 2^256 (in practical terms only 255)

However this is a very big number.

Every seed can create billions of addresses in each derivation path. That means billions of addresses in change addresses, in legacy, segwit, native segwit, etc etc

A collision , which is what you are talking about is impossible in practical terms. Billions of addresses randomly generated is hard for our minds to understand.

Quote
https://github.com/bitcoinbook/bitc...iidoc#navigating-the-hd-wallet-tree-structure

The HD wallet tree structure offers tremendous flexibility. Each parent extended key can have 4 billion children: 2 billion normal children and 2 billion hardened children. Each of those children can have another 4 billion children, and so on. The tree can be as deep as you want, with an infinite number of generations.
 

Carson

Member
In order to understand, how many address could be generated from one seed we should go to the process of address generation in HD wallets.
As bitmover said, there are 4 billion children possible:
Quote
https://github.com/bitcoinbook/bitc...iidoc#navigating-the-hd-wallet-tree-structure

The HD wallet tree structure offers tremendous flexibility. Each parent extended key can have 4 billion children: 2 billion normal children and 2 billion hardened children. Each of those children can have another 4 billion children, and so on. The tree can be as deep as you want, with an infinite number of generations.
To be exact, the 4 billions means 2^32 - 1 = 4 294 967 295 (this was a limit designed in HD wallets).

The path format of HD wallets is m / purpose' / coin_type' / account' / change / address_index, where account, change and address_index are dependnecies for address creation based on master private key (SHA of the seed).
Let's say for bitcoin it is m/44' /0 / account' / change / address_index

account and address_index could be in the range from 0 to 2^32-1 (2^32 total combinations), change could be 0 or 1 (change address or not), so 2 total combinations.

Hence, the total number of possible combinatins is 2^32 * 2^32 * 2*1 = 2^(32+32+1) = 2^65 which is 2^191 less than the total possible private keys and 2^95 less than the total possible addresses (cinsidering hash160 function) for every address type (legacy, segwit, bech32)

So, considering the HD wallet limitation (2^32 for child and address index), we need at leat 2^95 different seeds in order to generate all possible addresses (withount collisions).
 

Ephraim

New member
As pooya said it is limited to 2^256 (in practical terms only 255)

However this is a very big number.

Every seed can create billions of addresses in each derivation path. That means billions of addresses in change addresses, in legacy, segwit, native segwit, etc etc

A collision , which is what you are talking about is impossible in practical terms. Billions of addresses randomly generated is hard for our minds to understand.

Quote
https://github.com/bitcoinbook/bitc...iidoc#navigating-the-hd-wallet-tree-structure

The HD wallet tree structure offers tremendous flexibility. Each parent extended key can have 4 billion children: 2 billion normal children and 2 billion hardened children. Each of those children can have another 4 billion children, and so on. The tree can be as deep as you want, with an infinite number of generations.
Is it possible to calculate (theoretically) , how many common addresses could derive from the seeds?

If there are 2048^12 different seed combinations (in 12-word BIP39) and each has 2^256 keys then we have 6.3X10^116 different addresses.
We have altogether in Bitcoin 2^160=1,46x10^48 different addresses, which is a smaller number than the first one.

How many of them are common?
 

Mayson

New member
Is it possible to calculate (theoretically) , how many common addresses could derive from the seeds?

If there are 2048^12 different seed combinations (in 12-word BIP39) and each has 2^256 keys then we have 6.3X10^116 different addresses.
We have altogether in Bitcoin 2^160=1,46x10^48 different addresses, which is a smaller number than the first one.

How many of them are common?
A BIP-39 12-word phrase can represent 2128 seeds (it contains a checksum). As noted above, an HD wallet can normally generate 265 private keys from a seed. Thus, the 12-word phrase can generate 2193 private keys, which is 233 times the 2160 possible addresses.
 
Top