bakd247 / ecdsaKeyFinder

A Python based ECDSA secp256k1 private key recovery tool
https://hashadder.com/
28 stars 6 forks source link

Time to find the private key. #8

Closed sssergy closed 11 months ago

sssergy commented 11 months ago

It is known that the number of private keys is incredibly large. How can this code find the only correct public key from this huge array of private keys, without even knowing the approximate range of where the private key is located? Or is it possible to specify an approximate search range?

bakd247 commented 11 months ago

If you change the random generation function to any known private key...then plug in its public key..it will return the private key... This is all explained in the description... also you can try any multiple of that same private key to get a new public key (using any power of two or divisor by 2.... and it will find the key)... I have tested this extensively....and you are welcome to test it yourself....I plan on making a video this afternoon explaining in detail how it works.... and I will let you know when that video is availalbe

bakd247 commented 11 months ago

The whole idea here is to be looking for more than one key that corresponds to a single key..... so if you type in 10,000 then if will look for the private key for the pubic key you entered as well as 20,000 of its multiples as well...

the range that you specify is how many times you want to divide by two.... so if you enter in 10,000 then it will divide by 2 10,000 times and multiply by 2 10,000 times ... keeping a log of all public keys that correspond to the public key you entered... then if the random hash produces the same key as any of the mulitples.....it finds the key....

sssergy commented 11 months ago

This is all understandable, but if the key length is 185 bits, then randomly selecting a 256-bit key will not yield anything. There you definitely need to divide by neither 2 nor 2 billion, but much more.

while iterations < (half): t = time.processtime() privKey = int(random.choice('1') + ''.join(secrets.choice('56789ABCDEF01234') for in range(62)), 16) privKeyHex = format(privKey, '064x') privKeyInt = int(privKeyHex, 16) privateKey1 = (privKeyInt * (half ** AA)) % n

But you can try this.

sssergy commented 10 months ago

In general, I don’t see the possibility of using this method yet. The key space is so large that reducing the range by millions of times, it is almost impossible to find a random given key. The code only works when the private key has only two or three digits, and random keys have the same values from 1 to 3 digits, for example: 000000000000000000000000000000000000000000000000000000000000000483 Values with higher digits either do not work or you need to wait more than one day.

sssergy commented 10 months ago

https://github.com/albertobsd/keysubtracter.git I think this program performs the same operations, plus it is possible to specify a range. What is important is that this program is written in C, and it works clearly faster.