RichInSpirit
Registered User
- Messages
- 1,207
Apologies in advance for asking more silly Bitcoin questions. The following might be a bit long winded, apologies in advance also. And my Bitcoin knowledge is probably a bit infantile.
The Blockchain thread has fired up my bitcoin imagination and given me a bone to chew for the last while.
From my understanding of the Blockchain thread, The Public Key contained in the Blockchain is the hash of the Private Key and the Hash function cannot be reversed.
So here am I thinking just get the hash of all possible Private Keys and then you have a database or directory that can be reverse searched to find the Private Key of any Public Key. But Im told that the amount of hashing to be done to find all the different combinations will take hundreds of years. And is completely unfeasible.
But I still cant get it out of my head, so Id like to check how many hashes would I have to do in total. So back to permutations and combinations from my secondary school maths. Im not sure whether this is a permutation or combination.
Base58 can have 58 different options for every character position, so the hash of a single character Private Key would have 58 possible Public Keys. (Its probably not possible to have such short Private and Public Keys, Im going this short just for illustration!)
The hash of a 2 character Private Key would have 3364 possible Public Keys (58 multiplied by 58).
The hash of a 6 character Private Key would have 38,068,692,544 possible Public Keys (58x58x58x58x58x58) or 58 to the power of 6, (58^6).
And so on.
But some of the Public Keys have leading zeros, again take my previous 2 character Private and Public Key example. In the right most character position you can have 58 different characters but in the left most character position you can only have 1 different character Zero 0!
Which brings me to my Mystery, how many possibilities are there for this 2 character Public Key with a leading Zero? Theres only one possible character for this position 0 so I was tempted to think 1x58 possibilities?? Upon mature reflection based on observation and further thinking I decided that there were 2 options for this character position, Zero and no character. Which gives 2x58 possibilities. Which is 116 possibilities. But as far as I can gather you still have to hash the Private key 3364 times (58x58) even with the leading zero.
Again taking the 6 character Private and Public key example from up above and imagine this public key with 3 leading zeros. So the possibilities are (2x2x2x58x58x58) which is 1,560,896 possibilities. But as far as I can gather you still have to hash the Private key 38,068,692,544 times (58x58x58x58x58x58) even with the leading zeros.
So that is my Mystery. To me it looks like the leading zeros dont weaken the cryptography of the thing. But if there was a reverse search Directory/Database somewhere or even a partial reverse search Directory, it would speed up the search for a private key fairly considerably.
So it would prompt me to ask why the leading Zeros ? Is it an attempt at a back door by some one?
The Blockchain thread has fired up my bitcoin imagination and given me a bone to chew for the last while.
From my understanding of the Blockchain thread, The Public Key contained in the Blockchain is the hash of the Private Key and the Hash function cannot be reversed.
So here am I thinking just get the hash of all possible Private Keys and then you have a database or directory that can be reverse searched to find the Private Key of any Public Key. But Im told that the amount of hashing to be done to find all the different combinations will take hundreds of years. And is completely unfeasible.
But I still cant get it out of my head, so Id like to check how many hashes would I have to do in total. So back to permutations and combinations from my secondary school maths. Im not sure whether this is a permutation or combination.
Base58 can have 58 different options for every character position, so the hash of a single character Private Key would have 58 possible Public Keys. (Its probably not possible to have such short Private and Public Keys, Im going this short just for illustration!)
The hash of a 2 character Private Key would have 3364 possible Public Keys (58 multiplied by 58).
The hash of a 6 character Private Key would have 38,068,692,544 possible Public Keys (58x58x58x58x58x58) or 58 to the power of 6, (58^6).
And so on.
But some of the Public Keys have leading zeros, again take my previous 2 character Private and Public Key example. In the right most character position you can have 58 different characters but in the left most character position you can only have 1 different character Zero 0!
Which brings me to my Mystery, how many possibilities are there for this 2 character Public Key with a leading Zero? Theres only one possible character for this position 0 so I was tempted to think 1x58 possibilities?? Upon mature reflection based on observation and further thinking I decided that there were 2 options for this character position, Zero and no character. Which gives 2x58 possibilities. Which is 116 possibilities. But as far as I can gather you still have to hash the Private key 3364 times (58x58) even with the leading zero.
Again taking the 6 character Private and Public key example from up above and imagine this public key with 3 leading zeros. So the possibilities are (2x2x2x58x58x58) which is 1,560,896 possibilities. But as far as I can gather you still have to hash the Private key 38,068,692,544 times (58x58x58x58x58x58) even with the leading zeros.
So that is my Mystery. To me it looks like the leading zeros dont weaken the cryptography of the thing. But if there was a reverse search Directory/Database somewhere or even a partial reverse search Directory, it would speed up the search for a private key fairly considerably.
So it would prompt me to ask why the leading Zeros ? Is it an attempt at a back door by some one?