Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Morexl on October 23, 2022, 08:22:22 PM



Title: How to find the first 35 digits of bitcoin private key
Post by: Morexl on October 23, 2022, 08:22:22 PM
Is there any way How to find the first 35 digits of bitcoin private key? anyone know the calculation ?


Title: Re: How to find the first 35 digits of bitcoin private key
Post by: hosseinimr93 on October 23, 2022, 08:42:06 PM
You have missed the first 35 characters of your private key and now you want to calculate them? Am I getting you correctly? If so, there is no solution for that.
If you had missed a few characters, you could find them through brute-force method. But there is no way to brute-force a private key with 35 missing characters.


Title: Re: How to find the first 35 digits of bitcoin private key
Post by: mabeyak on October 23, 2022, 09:05:46 PM
This depends on several things,
If you say digits, I'll assume hex format.

One option would be to, as the previous user said, brute force 140 bits, which is a waste of time unless you get extremely lucky.
But if you have the corresponding public key, it should take a lot less than that, about 2 ^ 70 operations on average.
This would be the software you'd use, or a similar one with some modifications:
https://github.com/JeanLucPons/Kangaroo
That should be doable with a pretty big investment in renting GPUs and a small modification of existing programs to add stride.
But if the address is an ancient one with hundreds or thousands of BTC, it would be worth it.

With all that said, in case you bought this from some guy, it's most probably a scam.




Title: Re: How to find the first 35 digits of bitcoin private key
Post by: Morexl on October 23, 2022, 09:35:48 PM
You have missed the first 35 characters of your private key and now you want to calculate them? Am I getting you correctly? If so, there is no solution for that.
If you had missed a few characters, you could find them through brute-force method. But there is no way to brute-force a private key with 35 missing characters.


No - I want to know the calculation of first 35 characters in wif (compress or uncompressed) format remaining 17 will be find with brute force.


Title: Re: How to find the first 35 digits of bitcoin private key
Post by: mabeyak on October 23, 2022, 09:38:57 PM
If you want an useful answer, try to formulate the question better.


Title: Re: How to find the first 35 digits of bitcoin private key
Post by: hosseinimr93 on October 23, 2022, 10:00:59 PM
No - I want to know the calculation of first 35 characters in wif (compress or uncompressed) format remaining 17 will be find with brute force.
I don't really understand what you are trying to achieve.
Why the first 35 characters and why not the first 20 or 40 characters?
What do you have now? What do you want to derive the private key from? Are you trying to convert a private key in hex to WIF format?

Note that if you have a bitcoin address or a public key, there is no way to derive the private key from them.


Title: Re: How to find the first 35 digits of bitcoin private key
Post by: PrimeNumber7 on October 23, 2022, 10:16:07 PM
You have missed the first 35 characters of your private key and now you want to calculate them? Am I getting you correctly? If so, there is no solution for that.
If you had missed a few characters, you could find them through brute-force method. But there is no way to brute-force a private key with 35 missing characters.


No - I want to know the calculation of first 35 characters in wif (compress or uncompressed) format remaining 17 will be find with brute force.
Unless the person who generated the private key did so with flawed RNG, or they otherwise leaked information about their private key, it is not possible to know any portion of a private key, given a public key, or an address.


Title: Re: How to find the first 35 digits of bitcoin private key
Post by: pooya87 on October 24, 2022, 04:10:29 AM
No - I want to know the calculation of first 35 characters in wif (compress or uncompressed) format remaining 17 will be find with brute force.
Calculate it from what exactly?
You either have the WIF already but have lost part of it (like a damaged paper wallet) or you have the private key in a different format like Hexadecimal and that is damaged in which case there is no reason to convert the part you already have to another format like WIF to recover that, you should use what you already have.

Even if it is something crazy like what @PrimeNumber7 with what you think is a flawed RNG and you think you have part of the key, there still is no reason to convert it to a base58 WIF since recovering this format is actually harder than recovering normal bits you may already have.


Title: Re: How to find the first 35 digits of bitcoin private key
Post by: o_e_l_e_o on October 24, 2022, 09:25:34 AM
No - I want to know the calculation of first 35 characters in wif (compress or uncompressed) format remaining 17 will be find with brute force.
A private key is not calculated from anything - it is simply a random number between 1 and (a little less than) 2256. To convert from a raw private key to WIF, you first take your 64 character hexadecimal private key, add the 0x80 network byte at the start, at an 0x01 at the end if it is going to be a compressed key, add the first 4 bytes of the double SHA256 of this string at the end as a checksum, then convert all of this from Base16 to Base58. Reverse the process to go from WIF back to raw hex.

But you are asking a question about a method you are (probably incorrectly) trying rather than asking a question about the underlying problem itself. What part of a private key do you currently have and in what format?


Title: Re: How to find the first 35 digits of bitcoin private key
Post by: Morexl on October 24, 2022, 09:05:06 PM
No - I want to know the calculation of first 35 characters in wif (compress or uncompressed) format remaining 17 will be find with brute force.
A private key is not calculated from anything - it is simply a random number between 1 and (a little less than) 2256. To convert from a raw private key to WIF, you first take your 64 character hexadecimal private key, add the 0x80 network byte at the start, at an 0x01 at the end if it is going to be a compressed key, add the first 4 bytes of the double SHA256 of this string at the end as a checksum, then convert all of this from Base16 to Base58. Reverse the process to go from WIF back to raw hex.

But you are asking a question about a method you are (probably incorrectly) trying rather than asking a question about the underlying problem itself. What part of a private key do you currently have and in what format?

Ok let me explain in another way.

Here is the address: 1PaJvUDUKm3Xr4FJJZS53ooNFFZXVZk3v
Here is the Public key: 02fd9507ccb8ea63c3b7011cc594f8049ebc0063df7cff6ac960d3442f91fd6b81

Now lets suppose this is the private key in Wif format starting with 5: 5KJyGeq5gngHP25WMwpNb2jGwRGGerdrasY7rBzKXFVBZ7ZkWBn

Split into 2 parts
First 35 characters : 5KJyGeq5gngHP25WMwpNb2jGwRGGerdras
Last 17 characters : Y7rBzKXFVBZ7ZkWBn

Now my question is that how can i Calculate the exact first part of this address.
because i know if i get the first part then remining 17 will be find with brute force.




Title: Re: How to find the first 35 digits of bitcoin private key
Post by: mabeyak on October 24, 2022, 10:35:37 PM
So you don't have any info about the private key.
What you're trying to do is impossible.



Title: Re: How to find the first 35 digits of bitcoin private key
Post by: BitMaxz on October 24, 2022, 11:54:19 PM

Now my question is that how can i Calculate the exact first part of this address.
because i know if i get the first part then remining 17 will be find with brute force.


So you mean you are looking for a tool or a code to calculate them?
Why not use a tool which is already been tested to brute-force missing characters like BTCrecover (https://github.com/gurnec/btcrecover)?
The code how they calculate it is already on their open source code.

If you want the easy tool to find those missing characters then try this "The finder Outer BTC recovery tool"
You can find it here https://bitcointalk.org/index.php?topic=5214021.0

Good luck finding those many missing characters it would take many years to brute force them.


Title: Re: How to find the first 35 digits of bitcoin private key
Post by: hosseinimr93 on October 25, 2022, 12:08:58 AM
Now my question is that how can i Calculate the exact first part of this address.
As I said in my previous post, there is no way to derive a private key from a bitcoin address or a public key. The public key is derived from a private key through a one/way function.
If it was possible to derive the private key from a public key or an address, then everyone could steal all the bitcoins.


Title: Re: How to find the first 35 digits of bitcoin private key
Post by: pooya87 on October 25, 2022, 04:50:28 AM
Now my question is that how can i Calculate the exact first part of this address.
because i know if i get the first part then remining 17 will be find with brute force.
You can't because there is no relationship between "part of the private key" and the "address". You will need the full private key to be able to convert that to an integer, then compute the public key of that private key and finally compute its hash to get the address.
When you don't have part of the private key, you simply can't compute the public key and the rest either.


Title: Re: How to find the first 35 digits of bitcoin private key
Post by: nc50lc on October 25, 2022, 05:08:05 AM
Split into 2 parts
First 35 characters : 5KJyGeq5gngHP25WMwpNb2jGwRGGerdras
Last 17 characters : Y7rBzKXFVBZ7ZkWBn

Now my question is that how can i Calculate the exact first part of this address.
because i know if i get the first part then remining 17 will be find with brute force.
Considering the title of this thread and the "first part" which the sample address doesn't have, I think this is a typo.
Looks like he meant "first part of this private key" instead if "address".

Even so, the question is still unclear since he didn't mentioned from which data will it be calculated.


Title: Re: How to find the first 35 digits of bitcoin private key
Post by: PawGo on October 25, 2022, 07:34:18 AM
As I understand, OP has no information about private key. He has nothing. Null, zero. And then he believes in his brute-force possibilities (limited to +- 1/3 of amount of data needed) and he looks for a way to find the rest (2/3). Which is obviously impossible, as we cannot guess even bit range base on public key.
Otherwise there will be no problem with "32BTC puzzle" etc.
So, answering OP: as I may agree that if you have 17 characters (at the end) missing it is possible to find the private key knowing pub key (using Kangaroo or BSGS software for that purpose), simple answer is NO - you cannot guess (or how you called it 'calculate') what is the range/beginning of a private key knowing only address or even public key.


Title: Re: How to find the first 35 digits of bitcoin private key
Post by: PrimeNumber7 on October 25, 2022, 08:28:53 AM
No - I want to know the calculation of first 35 characters in wif (compress or uncompressed) format remaining 17 will be find with brute force.
A private key is not calculated from anything - it is simply a random number between 1 and (a little less than) 2256. To convert from a raw private key to WIF, you first take your 64 character hexadecimal private key, add the 0x80 network byte at the start, at an 0x01 at the end if it is going to be a compressed key, add the first 4 bytes of the double SHA256 of this string at the end as a checksum, then convert all of this from Base16 to Base58. Reverse the process to go from WIF back to raw hex.

But you are asking a question about a method you are (probably incorrectly) trying rather than asking a question about the underlying problem itself. What part of a private key do you currently have and in what format?

Ok let me explain in another way.

Here is the address: 1PaJvUDUKm3Xr4FJJZS53ooNFFZXVZk3v
Here is the Public key: 02fd9507ccb8ea63c3b7011cc594f8049ebc0063df7cff6ac960d3442f91fd6b81

Now lets suppose this is the private key in Wif format starting with 5: 5KJyGeq5gngHP25WMwpNb2jGwRGGerdrasY7rBzKXFVBZ7ZkWBn

Split into 2 parts
First 35 characters : 5KJyGeq5gngHP25WMwpNb2jGwRGGerdras
Last 17 characters : Y7rBzKXFVBZ7ZkWBn

Now my question is that how can i Calculate the exact first part of this address.
because i know if i get the first part then remining 17 will be find with brute force.



I can rephrase your question differently:

Given a random number between 1 and 100,000 how can you calculate the first 4 digits of this random number?

Answer: You can't.


When you generate a private key, you generate a random number (the scope of potential numbers is much larger than in my above example). Once you have the private key, in order to get the address, you have to perform a number of one-way hash functions (along with other calculations) on the private key.

To ask how to calculate the first x characters of the input of a hash function based on the output is effectively asking how to break the hash function.


Title: Re: How to find the first 35 digits of bitcoin private key
Post by: BlackHatCoiner on October 25, 2022, 01:00:19 PM
Now my question is that how can i Calculate the exact first part of this address.
Your best course is to try out every uncompressed private key that ends with "Y7rBzKXFVBZ7ZkWBn". Given that each base58 character less, increases your chances to find the private key by 58, you still have to search to approximately 58^34 numbers (35-1, because all WIF start with "5").

You can't do that. Brute forcing allows you recover WIF with few characters missing, not 2/3 of the private key.


Title: Re: How to find the first 35 digits of bitcoin private key
Post by: casinotester0001 on October 25, 2022, 06:27:18 PM
Now lets suppose this is the private key in Wif format starting with 5: 5KJyGeq5gngHP25WMwpNb2jGwRGGerdrasY7rBzKXFVBZ7ZkWBn

Split into 2 parts
First 35 characters : 5KJyGeq5gngHP25WMwpNb2jGwRGGerdras
Last 17 characters : Y7rBzKXFVBZ7ZkWBn

Now my question is that how can i Calculate the exact first part of this address.
because i know if i get the first part then remining 17 will be find with brute force.

If someone knows how to calculate the first part, they would be able to calculate all 51 characters. So you won't need to brute force the second part.


Title: Re: How to find the first 35 digits of bitcoin private key
Post by: LoyceV on October 25, 2022, 08:10:38 PM
Now my question is that how can i Calculate the exact first part of this address.
because i know if i get the first part then remining 17 will be find with brute force.
Lol :D
I'm not sure if you're trolling or not, but let's assume you're not. You're saying you don't know anyting, but if you find a way to get 70%, you'll also be able to get the remaining 30%. That makes no sense at all, because there's no way to get the first 70% of the private key. If that would be possible, Bitcoin wouldn't exist.
There are far richer addresses out there than the one you showed (holding 500BTC), and some of them have exposed their public key.

Some say what you're looking for is possible with quantum computing, but that's not going to happen any time soon.


Title: Re: How to find the first 35 digits of bitcoin private key
Post by: seoincorporation on October 26, 2022, 03:15:23 PM
This is a tricky question, but i think i have an answer for you...

If you compare the hex key:

Code:
0000000000000000000000000000000000000000000000000000000000000000
vs
Code:
0000000000000000000000000000000000000000000000000000000000000001

You will get the next Uncompressed WIF - Base58 keys:

Quote
5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAbuatmU
Quote
5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf

As you can see the first chars are the same, so, if you want the first 35 chars to brute force the next 17 you could start from:

Code:
5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4

I have to say that not all the keys you get will be valid ones, and this is a terrible method to bruteforce the privatekeys, you should learn about softwares like brainflayer.


Title: Re: How to find the first 35 digits of bitcoin private key
Post by: pooya87 on October 27, 2022, 04:47:24 AM
Code:
0000000000000000000000000000000000000000000000000000000000000000
It's nitpicking but 0 is not a valid private key.

Quote
I have to say that not all the keys you get will be valid ones, and this is a terrible method to bruteforce the privatekeys, you should learn about softwares like brainflayer.
It is actually a good method although you are on the correct path but not quite there yet. What they do is to first find the minimum base58 key by setting the digits to min value and convert it to an integer. Then repeat it for the maximum to have a range. Now you can search inside that range without worrying about the base58 encoding.
This limits the search space while skipping the encoding altogether. The problem here is that 17 characters is too much. If it were around 13, it would be easily recoverable in less than an hour using this method.


Title: Re: How to find the first 35 digits of bitcoin private key
Post by: PrimeNumber7 on October 27, 2022, 05:14:39 AM
This is a tricky question, but i think i have an answer for you...

If you compare the hex key:

Code:
0000000000000000000000000000000000000000000000000000000000000000
vs
Code:
0000000000000000000000000000000000000000000000000000000000000001

You will get the next Uncompressed WIF - Base58 keys:

Quote
5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAbuatmU
Quote
5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf

As you can see the first chars are the same, so, if you want the first 35 chars to brute force the next 17 you could start from:

Code:
5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4

I have to say that not all the keys you get will be valid ones, and this is a terrible method to bruteforce the privatekeys, you should learn about softwares like brainflayer.
The private key is passed through a hash function in order to calculate the address. Given the output of a hash function, it is not possible to calculate the prefix of the input. If this were possible, the hash function would be broken.


Title: Re: How to find the first 35 digits of bitcoin private key
Post by: NotATether on October 28, 2022, 10:28:02 AM
You have missed the first 35 characters of your private key and now you want to calculate them? Am I getting you correctly? If so, there is no solution for that.
If you had missed a few characters, you could find them through brute-force method. But there is no way to brute-force a private key with 35 missing characters.


No - I want to know the calculation of first 35 characters in wif (compress or uncompressed) format remaining 17 will be find with brute force.

The WIF and the private key hex are not entirely congruent which means that with a given set of hex characters, you will get slightly more WIF characters than you expected to influence (think eg. The first N base58 characters and part of the next one, so:

If you have M hex characters, then you should only count on the first

floor(M*58/16)

Base58 characters on being correct.