Author

Topic: How many Bitcoin addresses are there in a mnemonic phrase? (Read 120 times)

legendary
Activity: 2268
Merit: 18771
Bard told me that the number of Bitcoin addresses generated by a mnemonic phrase according to the BIP-39 standard is 2^126, while GPT said it is 2^32.
I don't know why people continue to ask these AI models anything technical, especially when it comes to bitcoin. They are consistently wrong and can easily be prompted in to providing any answer.

Some people say that the number of Bitcoin addresses generated by a mnemonic phrase is infinite, but I disagree.
It can't be infinite since there are a maximum possible number of bitcoin addresses.

then one mnemonic phrase would contain 2^256 addresses, which is clearly false.
If we are considering only one type of bitcoin address (such as P2WPKH addresses), then there are "only" 2160 possible addresses, since each address encodes the output of a RIPEMD-160 hash. But it is correct to say that every possible P2WPKH address could be generated from a single seed phrase, if you scanned enough derivation paths. My answer that Zaguru12 has quoted above explains why. Doing this is obviously impossible, though, and is akin to simply brute forcing all possible private keys.
newbie
Activity: 18
Merit: 6
Thank you for your help.
The number of address that a seed phrase can create is not infinity but the number is so large that people think it is unlimited but no it is not. It is reported to be even higher than 4 billion child addresses from a parent extended key.

I will quote two post that explain it better.

Let's say we have a bitcoin wallet generated using the standard derivation path of m/44'/0'/0' and addresses are generated at m/44'/0'/0'/x/y. (x is the change index and y is the address index).

If we only change the address index, we can generate 2^32 addresses. The address index can be in the range of 0 to  2^32 -1 (or 0xFFFFFFFF in hexadecimal system).
If we change the change index as well, we can have 2^33 addresses. The change index can be either 0 or 1.


We can also generate addresses using non-standard derivation paths with changing the account index. We can generate addresses using the derivation path of m/44'/0'/1', m/44'/0'/2' and so on.
Like the address index, the account index can be also in the range of 0 to 2^32 - 1.

With changing the account index, the change index and the address index, we can generate 2^65 addresses.


We can also generate more addresses with using BIP49 and BIP84 standards.
If we consider the three BIP44, BIP49 and BIP84 standards, we can generate 3 * 2^65 addresses.


We can still generate more addresses with using more complicated non-standard derivation paths.


Knight Hider is correct. A single seed phrase of any length can be used to (almost certainly) generate every possible bitcoin address. This is thanks to derivation paths.

When you use a seed phrase to generate an address, then most wallets will start to do so at a derivation path such as m/84'/0'/0'/0/0. Each address you generate from the same seed phrase will have a unique derivation path. So, just how many different derivation paths can you have?

Well, as per BIP32, extended keys have 1 byte for the level they are at. 0x00 for the master key, 0x01 for the first level, 0x02 for the second level, and so on, up to 0xFF. This means you can have a total of 255 levels after the m. It also allows 4 bytes for the index. This means a total of 232 possible indices for each of those 255 levels. So a single seed phrase can generate (232)255 + (232)254 + (232)253 + (232)252 + .... private keys. This number works out at 2.5*102456, which is many orders of magnitude higher than the set of all possible private keys (a little less than 2256). This means that not only can any seed phrase (almost certainly) generate any private key at the right derivation path, but any seed phrase can generate any private key billions and billions of times over at many different derivation paths.

hero member
Activity: 868
Merit: 952
The number of address that a seed phrase can create is not infinity but the number is so large that people think it is unlimited but no it is not. It is reported to be even higher than 4 billion child addresses from a parent extended key.

I will quote two post that explain it better.

Let's say we have a bitcoin wallet generated using the standard derivation path of m/44'/0'/0' and addresses are generated at m/44'/0'/0'/x/y. (x is the change index and y is the address index).

If we only change the address index, we can generate 2^32 addresses. The address index can be in the range of 0 to  2^32 -1 (or 0xFFFFFFFF in hexadecimal system).
If we change the change index as well, we can have 2^33 addresses. The change index can be either 0 or 1.


We can also generate addresses using non-standard derivation paths with changing the account index. We can generate addresses using the derivation path of m/44'/0'/1', m/44'/0'/2' and so on.
Like the address index, the account index can be also in the range of 0 to 2^32 - 1.

With changing the account index, the change index and the address index, we can generate 2^65 addresses.


We can also generate more addresses with using BIP49 and BIP84 standards.
If we consider the three BIP44, BIP49 and BIP84 standards, we can generate 3 * 2^65 addresses.


We can still generate more addresses with using more complicated non-standard derivation paths.


Knight Hider is correct. A single seed phrase of any length can be used to (almost certainly) generate every possible bitcoin address. This is thanks to derivation paths.

When you use a seed phrase to generate an address, then most wallets will start to do so at a derivation path such as m/84'/0'/0'/0/0. Each address you generate from the same seed phrase will have a unique derivation path. So, just how many different derivation paths can you have?

Well, as per BIP32, extended keys have 1 byte for the level they are at. 0x00 for the master key, 0x01 for the first level, 0x02 for the second level, and so on, up to 0xFF. This means you can have a total of 255 levels after the m. It also allows 4 bytes for the index. This means a total of 232 possible indices for each of those 255 levels. So a single seed phrase can generate (232)255 + (232)254 + (232)253 + (232)252 + .... private keys. This number works out at 2.5*102456, which is many orders of magnitude higher than the set of all possible private keys (a little less than 2256). This means that not only can any seed phrase (almost certainly) generate any private key at the right derivation path, but any seed phrase can generate any private key billions and billions of times over at many different derivation paths.

newbie
Activity: 18
Merit: 6
Bard told me that the number of Bitcoin addresses generated by a mnemonic phrase according to the BIP-39 standard is 2^126, while GPT said it is 2^32.


Some people say that the number of Bitcoin addresses generated by a mnemonic phrase is infinite, but I disagree.

It is illogical to say that a mnemonic phrase can generate an infinite number of Bitcoin addresses. If a mnemonic phrase could generate an infinite number of Bitcoin addresses, then one mnemonic phrase would contain 2^256 addresses, which is clearly false.


This question has puzzled me for a long time, and there is no standard answer.

Does anyone know?

Thanks
Jump to: