Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Honey9 on August 22, 2018, 05:20:42 PM



Title: How much Terabyte needed to get 51 characters all possible combination?
Post by: Honey9 on August 22, 2018, 05:20:42 PM
How much Terabyte needed to get 51 characters all possible combination, While starter character will always 5?


Title: Re: How much Terabyte needed to get 51 characters all possible combination?
Post by: markj113 on August 22, 2018, 05:28:57 PM
2 X chinese kids, an abacus and 30 minutes.


Title: Re: How much Terabyte needed to get 51 characters all possible combination?
Post by: aliashraf on August 22, 2018, 05:40:15 PM
Combination is not the term, I guess you mean permutations and it is 50! = 3.04140932*10^64 which you can't store it anywhere not just because of capacity problems but also because of the time required for writing them, it would take billions times the galaxy's age for a multiple penta byte per second write operation, I suppose.


Title: Re: How much Terabyte needed to get 51 characters all possible combination?
Post by: mfyilmaz on August 22, 2018, 06:42:03 PM
Combination is not the term, I guess you mean permutations and it is 50! = 3.04140932*10^64 which you can't store it anywhere not just because of capacity problems but also because of the time required for writing them, it would take billions times the galaxy's age for a multiple penta byte per second write operation, I suppose.

you are wrong... permutations are only for cases where the sequence is not a factor like when you draw 5 cards from a 52 cards deck... it doesnt matter if you draw spade ace first or last... so As-2s-3s-4s-5s is the exact same as 5s-3s-2s-4s-As....

while in this case the sequence is important because AAAA5 and 5AAAA or AA5AA is NOT the same... so here you have to actually do like #character pow 50... like when you use 26 alphabet then its 26^50... if you use captions then its 52^50... if you want to use alphanumeric (26 alphabet + 26 ALPHABET + 10 Numbers) then its 62^50

this is such a huge number thats its not even possible to write all this different combinations down...

https://www.reddit.com/r/Bitcoin/comments/8ss3dp/bitcoin_is_money_secured_by_law_of_universe/

and btw

2^256 = 1,15 * 10^77
62^50 = 4,16 * 10^89

so this number is 3 trillion times bigger as the number of sequences described in that picture... so pretty much impossible to do this. :)


Title: Re: How much Terabyte needed to get 51 characters all possible combination?
Post by: TheArchaeologist on August 22, 2018, 07:16:51 PM
How much Terabyte needed to get 51 characters all possible combination, While starter character will always 5?
You mean the WIF's for all uncompressed private keys? ;)


Title: Re: How much Terabyte needed to get 51 characters all possible combination?
Post by: aliashraf on August 22, 2018, 10:01:44 PM
Combination is not the term, I guess you mean permutations and it is 50! = 3.04140932*10^64 which you can't store it anywhere not just because of capacity problems but also because of the time required for writing them, it would take billions times the galaxy's age for a multiple penta byte per second write operation, I suppose.

you are wrong... permutations are only for cases where the sequence is not a factor like when you draw 5 cards from a 52 cards deck... it doesnt matter if you draw spade ace first or last... so As-2s-3s-4s-5s is the exact same as 5s-3s-2s-4s-As....

No, you are wrong.

Permutation IS about the cases sensitive to order.  We say: "What permutations we could have for 5 cards"?
This is order sensitive and is 5!= 120 i.e. we got 5 cards and we can arrange them in 120 different ways.

Combination is used for a very different scenarios, e.g. how many different hands(each with 5 cards) we can draw from a 52 cards deck? Here the answer is 52!/47!/5! = 52*51*50*49*48/5/4/3/2=2,598,960 different hands.

So, when you ask about combinations usually you have to give 2 numbers like 5 and 52 in my example, i.e.  5 of 52.

Now I understand you are asking about permutation with repetition for 50 placements of 51 characters. Which is obviously 51^50, but you should never use the term combination for expressing it because in math (and I'm not a mathematician by the way) we use this term a bit different with colloquial language.



Title: Re: How much Terabyte needed to get 51 characters all possible combination?
Post by: bob123 on August 23, 2018, 10:00:17 AM
How much Terabyte needed to get 51 characters all possible combination, While starter character will always 5?

I guess you are trying to bruteforce a private key (known first char = 5 and length of 51 chars) ?

Basically you would have to guess the correct key out of 2^256 possible ones (which is practically not possible).

Since you are looking for a private key in WIF format, you'll have to add 1 byte at the front. Then put the first 4 bytes of the double sha256 hash at the end (this is the checksum).
And after converting it into base58, you will have your private key in WIF format (starting with 5.. ).


Fortunately, there is not enough energy on this planet to fuel the machines needed to bruteforce this search space.


Title: Re: How much Terabyte needed to get 51 characters all possible combination?
Post by: NeuroticFish on August 23, 2018, 11:07:27 AM
Fortunately, there is not enough energy on this planet to fuel the machines needed to bruteforce this search space.

You should have also added the very well made image about all this. It makes OP understand the problem better.
Here it is:

https://talkimg.com/images/2023/05/14/blob27f794b5a43a89e0.jpeg


Title: Re: How much Terabyte needed to get 51 characters all possible combination?
Post by: HeRetiK on August 23, 2018, 04:38:37 PM
Combination is not the term, I guess you mean permutations and it is 50! = 3.04140932*10^64 which you can't store it anywhere not just because of capacity problems but also because of the time required for writing them, it would take billions times the galaxy's age for a multiple penta byte per second write operation, I suppose.

That's assuming you only have 50 characters available in total (over a string with the length of 50) of which each character can only be used once.

I'm afraid mfyilmaz is a bit closer to the truth.

Still none of you guys have answered OP's question :(

Using WIF (as requested by OP) would add unnecessary overhead to storing the private keys, so we're gonna save some storage and will just go with barebone private keys.

So taking the numbers as calculated by mfyilmaz and bob123:

Quote
2^256 = 1.15 * 10^77

You get 1.15 * 10^77 possible keys with a size of 2^256 bits (= 32 bytes) each so you get 32 * 1.15 * 10^77 bytes for storing all possible combinations of a 256 bit key.

32 * 1.15 * 10^77 equals 48 * 10^77 bytes which is 48 * 10 ^ 68 65 Terabytes, ie. 48,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 Terabytes or roughly the amount of data you could store using 2 X chinese kids, an abacus and 30 minutes.

(edit: Thirdspace's post reminded me that Tera = 10^12 not 10^9)


Title: Re: How much Terabyte needed to get 51 characters all possible combination?
Post by: Thirdspace on August 23, 2018, 11:38:01 PM
How much Terabyte needed to get 51 characters all possible combination, While starter character will always 5?
You mean the WIF's for all uncompressed private keys? ;)
that's pretty much what he's asking for :D
Base58 WIF uncompressed means 58 possible characters in a 51-character private key
but remember not all 51-char length private keys are valid, because the checksum at the end of it  
more reasonable to calculate based on possible private key hex format (64 chars length) 16^64 = 2^256
= possible private key hex format * private key for uncompressed address
= 16^64 * 51
= 1.15792... * 10^77 * 51
= 59.05392... * 10^77

since 1 TB = 10^12, so:
= ~5.9 * 10^66 Terabytes
imagine having a cluster hard drive, 1066 units of a 6 TB hard drive :o