Author

Topic: Bitcoin puzzle transaction ~32 BTC prize to who solves it - page 115. (Read 215611 times)

member
Activity: 462
Merit: 24

Code:
import secp256k1 as ice
import random

print("scaning pub 03...")

target = "13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so"

start= 50000000000000000000
end=   70000000000000000000
while True:
    
    A0 = random.randint(start, end)
    A1 = ice.scalar_multiplication(A0)
    B0 = ice.to_cpub(A1.hex())
    
    if B0.startswith("03"):
        A2 = ice.pubkey_to_address(0,1, A1)
        print(A2)
        if target in A2:
            print("venga rata")
            data = open("Win.txt","a")
            data.write(str(A0)+" = "+A2+"\n")
            data.close()

Same script, but with concurrent.futures.


Code:
import concurrent.futures
import sys
import os
import time
import secp256k1 as ice
import random
import multiprocessing


os.system("clear");t = time.ctime();sys.stdout.write(f"\033[?25l")
sys.stdout.write(f"\033[01;33m[+] {t}\n")

def generate_key():
    start = 36893488147419103231
    end = 73786976294838206463
   
    A0 = random.randint(start, end)
    A1 = ice.scalar_multiplication(A0)
    B0 = ice.to_cpub(A1.hex())
   
    if B0.startswith("03"):
        A2 = ice.pubkey_to_address(0, 1, A1)
        message = "[+] {}".format(A2);messages = [];messages.append(message);output = ''.join(messages) + "\r";sys.stdout.write(output);sys.stdout.flush()
        return A0, A2
    else:
        return None, None

def main():
    target = "13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so"
   
    num_cores = multiprocessing.cpu_count()
   
    with concurrent.futures.ProcessPoolExecutor(max_workers=num_cores) as executor:
        while True:
            futures = [executor.submit(generate_key) for _ in range(num_cores)]
           
            for future in concurrent.futures.as_completed(futures):
                A0, A2 = future.result()
               
                if A2 and target in A2:
                    print("venga rata")
                    with open("Win.txt", "a") as data:
                        data.write(f"{A0} = {A2}\n")
                    break

if __name__ == "__main__":
    main()

You can imagine how this works on a 128 Core machine Grin
member
Activity: 239
Merit: 53
New ideas will be criticized and then admired.

Do you know anything about secp256k1's P % 4 = 3 ? or if we could identify y parity of all keys based on such formula?
I know this is very complicated but you can get p-x % 4 = 3 every 3 keys apart, for example if you have p % 4 = 3 then p-3 % 4 = 3, p-7 % 4 = 3 etc, maybe that could be used to also find a pattern in determining the exact order of parity of y coordinates.

Do you know I genuinely forget most of the things I discover, I mean I had found a way to always get a result with a float ending in 1, like dividing by a certain scalar and then multiplying  by a different scalar to land on something like 433.000001, I have lost my interest for this puzzle, I need some fuel.🤔

By being able to partially predict an outcome, you could find a way to get the private key.
copper member
Activity: 1330
Merit: 899
🖤😏

Do you know anything about secp256k1's P % 4 = 3 ? or if we could identify y parity of all keys based on such formula?
I know this is very complicated but you can get p-x % 4 = 3 every 3 keys apart, for example if you have p % 4 = 3 then p-3 % 4 = 3, p-7 % 4 = 3 etc, maybe that could be used to also find a pattern in determining the exact order of parity of y coordinates.

Do you know I genuinely forget most of the things I discover, I mean I had found a way to always get a result with a float ending in 1, like dividing by a certain scalar and then multiplying  by a different scalar to land on something like 433.000001, I have lost my interest for this puzzle, I need some fuel.🤔
member
Activity: 239
Merit: 53
New ideas will be criticized and then admired.
it is more likely that the pub starts with "03". I would omit the ones that start with "02".
Nice approach, but do you think there is any possibility to determine how often permutations occur and if there is a solution to find out any pattern of y parity, like if we could figure out how many 02, and 03 keys exist in a certain range and if that could give us a pattern being repeated in all ranges.

That way we could use strides to ignore at least %40 of the whole bit range.

I suppose that to verify this you would have to store a large amount of data to look for a repetition pattern.
We change "02" to 1 and "03" to 0 (as binary).

Code:
import secp256k1 as ice


start= 1
end=   10000
for i in  range (start, end+1):
   
   
    A1 = ice.scalar_multiplication(i)
    B0 = ice.to_cpub(A1.hex())
   
    data = open("test03.txt","a")
    data.write(str(B0)[ :2])
    data.close()

with open('test03.txt', 'r') as file:
  filedata = file.read()

# Replace the target string
filedata = filedata.replace('02', '1')

with open('fileP.txt', 'w') as file:
  file.write(filedata)
 
filedata = filedata.replace('03', '0')

with open('binary.txt', 'w') as file:
  file.write(filedata) 

Then you look for some pattern in the binary sequence.

And if there were, you would only sequentially subtract or add "x" amount to your target, compare it with the pattern and you would know at what point in your pattern the target is, which would mean the end of ecc, if said pattern existed.
copper member
Activity: 1330
Merit: 899
🖤😏
it is more likely that the pub starts with "03". I would omit the ones that start with "02".
Nice approach, but do you think there is any possibility to determine how often permutations occur and if there is a solution to find out any pattern of y parity, like if we could figure out how many 02, and 03 keys exist in a certain range and if that could give us a pattern being repeated in all ranges.

That way we could use strides to ignore at least %40 of the whole bit range.
member
Activity: 239
Merit: 53
New ideas will be criticized and then admired.
Has anyone tried this approach? The count of powers of 2 as sum?

If you can see the count of the powers of 2 are increasing.
I wrote a small script to try this but if someone can make multy gpu Windows/Linux program with that approach to try it.
in the script 2^65 is always present and random randint to try combinations of powers of 2 from 28 to 36 (27,35 in the script) counts in random for the puzzle #66.



I think it is basically the same but consuming more resources, if I wanted to try my luck I would do something like this in C, it is more likely that the pub starts with "03". I would omit the ones that start with "02".



Code:
import secp256k1 as ice
import random

print("scaning pub 03...")

target = "13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so"

start= 50000000000000000000
end=   70000000000000000000
while True:
    
    A0 = random.randint(start, end)
    A1 = ice.scalar_multiplication(A0)
    B0 = ice.to_cpub(A1.hex())
    
    if B0.startswith("03"):
        A2 = ice.pubkey_to_address(0,1, A1)
        print(A2)
        if target in A2:
            print("venga rata")
            data = open("Win.txt","a")
            data.write(str(A0)+" = "+A2+"\n")
            data.close()
copper member
Activity: 1330
Merit: 899
🖤😏

Hey there, what you are doing is practically breaking "known" keys in to small chunks, in another words, you are looking at those numbers and calculate how to divide them by powers of 2.

If you could find a way to land on any unknown number using your method, it'd be something, but now is just kind of random mode but in a different way.

Why don't you work on public keys? Start by figuring things out in small ranges and then scale up to higher bit ranges. Solution is there if you are after one.
newbie
Activity: 9
Merit: 0
Has anyone tried this approach? The count of powers of 2 as sum?

Number 1: 2^0
Number 3: 2^0 + 2^1
Number 7: 2^0 + 2^1 + 2^2
Number 8: 2^3
Number 21: 2^0 + 2^2 + 2^4
Number 49: 2^0 + 2^4 + 2^5
Number 76: 2^2 + 2^3 + 2^6
Number 224: 2^5 + 2^6 + 2^7
Number 467: 2^0 + 2^1 + 2^4 + 2^6 + 2^7 + 2^8
Number 514: 2^1 + 2^9
Number 1155: 2^0 + 2^1 + 2^7 + 2^10
Number 2683: 2^0 + 2^1 + 2^3 + 2^4 + 2^5 + 2^6 + 2^9 + 2^11
Number 5216: 2^5 + 2^6 + 2^10 + 2^12
Number 10544: 2^4 + 2^5 + 2^8 + 2^11 + 2^13
Number 26867: 2^0 + 2^1 + 2^4 + 2^5 + 2^6 + 2^7 + 2^11 + 2^13 + 2^14
Number 51510: 2^1 + 2^2 + 2^4 + 2^5 + 2^8 + 2^11 + 2^14 + 2^15
Number 95823: 2^0 + 2^1 + 2^2 + 2^3 + 2^6 + 2^9 + 2^10 + 2^12 + 2^13 + 2^14 + 2^16
Number 198669: 2^0 + 2^2 + 2^3 + 2^11 + 2^16 + 2^17
Number 357535: 2^0 + 2^1 + 2^2 + 2^3 + 2^4 + 2^7 + 2^10 + 2^12 + 2^13 + 2^14 + 2^16 + 2^18
Number 863317: 2^0 + 2^2 + 2^4 + 2^6 + 2^10 + 2^11 + 2^13 + 2^16 + 2^18 + 2^19
Number 1811764: 2^2 + 2^4 + 2^5 + 2^8 + 2^10 + 2^13 + 2^15 + 2^16 + 2^17 + 2^19 + 2^20
Number 3007503: 2^0 + 2^1 + 2^2 + 2^3 + 2^10 + 2^13 + 2^14 + 2^15 + 2^16 + 2^18 + 2^19 + 2^21
Number 5598802: 2^1 + 2^4 + 2^6 + 2^9 + 2^10 + 2^11 + 2^13 + 2^14 + 2^16 + 2^18 + 2^20 + 2^22
Number 14428676: 2^2 + 2^9 + 2^11 + 2^13 + 2^18 + 2^19 + 2^20 + 2^22 + 2^23
Number 33185509: 2^0 + 2^2 + 2^5 + 2^6 + 2^7 + 2^9 + 2^10 + 2^11 + 2^12 + 2^14 + 2^17 + 2^19 + 2^20 + 2^21 + 2^22 + 2^23 + 2^24
Number 54538862: 2^1 + 2^2 + 2^3 + 2^5 + 2^6 + 2^9 + 2^12 + 2^13 + 2^22 + 2^24 + 2^25
Number 111949941: 2^0 + 2^2 + 2^4 + 2^5 + 2^6 + 2^11 + 2^12 + 2^13 + 2^18 + 2^19 + 2^21 + 2^23 + 2^25 + 2^26
Number 227634408: 2^3 + 2^5 + 2^6 + 2^7 + 2^10 + 2^11 + 2^13 + 2^14 + 2^16 + 2^20 + 2^23 + 2^24 + 2^26 + 2^27
Number 400708894: 2^1 + 2^2 + 2^3 + 2^4 + 2^8 + 2^10 + 2^12 + 2^14 + 2^17 + 2^21 + 2^22 + 2^23 + 2^24 + 2^25 + 2^26 + 2^28
Number 1033162084: 2^2 + 2^5 + 2^6 + 2^8 + 2^10 + 2^11 + 2^14 + 2^15 + 2^18 + 2^20 + 2^23 + 2^24 + 2^26 + 2^27 + 2^28 + 2^29
Number 2102388551: 2^0 + 2^1 + 2^2 + 2^6 + 2^8 + 2^9 + 2^10 + 2^13 + 2^14 + 2^15 + 2^16 + 2^17 + 2^18 + 2^19 + 2^22 + 2^24 + 2^26 + 2^27 + 2^28 + 2^29 + 2^30
Number 3093472814: 2^1 + 2^2 + 2^3 + 2^5 + 2^9 + 2^10 + 2^13 + 2^15 + 2^17 + 2^21 + 2^22 + 2^27 + 2^28 + 2^29 + 2^31
Number 7137437912: 2^3 + 2^4 + 2^6 + 2^7 + 2^11 + 2^13 + 2^15 + 2^18 + 2^19 + 2^21 + 2^22 + 2^24 + 2^27 + 2^29 + 2^31 + 2^32
Number 14133072157: 2^0 + 2^2 + 2^3 + 2^4 + 2^8 + 2^12 + 2^15 + 2^16 + 2^18 + 2^21 + 2^22 + 2^25 + 2^27 + 2^30 + 2^32 + 2^33
Number 20112871792: 2^4 + 2^5 + 2^6 + 2^8 + 2^12 + 2^17 + 2^20 + 2^22 + 2^23 + 2^25 + 2^26 + 2^27 + 2^29 + 2^31 + 2^34
Number 42387769980: 2^2 + 2^3 + 2^4 + 2^5 + 2^6 + 2^9 + 2^11 + 2^17 + 2^23 + 2^25 + 2^26 + 2^27 + 2^28 + 2^30 + 2^31 + 2^32 + 2^35
Number 100251560595: 2^0 + 2^1 + 2^4 + 2^7 + 2^9 + 2^11 + 2^13 + 2^14 + 2^16 + 2^18 + 2^20 + 2^21 + 2^22 + 2^24 + 2^25 + 2^26 + 2^28 + 2^30 + 2^32 + 2^33 + 2^34 + 2^36
Number 146971536592: 2^4 + 2^6 + 2^7 + 2^10 + 2^11 + 2^13 + 2^15 + 2^16 + 2^17 + 2^18 + 2^19 + 2^21 + 2^27 + 2^28 + 2^29 + 2^33 + 2^37
Number 323724968937: 2^0 + 2^3 + 2^5 + 2^6 + 2^7 + 2^8 + 2^9 + 2^16 + 2^17 + 2^23 + 2^24 + 2^25 + 2^26 + 2^27 + 2^28 + 2^30 + 2^32 + 2^33 + 2^35 + 2^38
Number 1003651412950: 2^1 + 2^2 + 2^4 + 2^6 + 2^7 + 2^8 + 2^9 + 2^12 + 2^13 + 2^16 + 2^19 + 2^22 + 2^25 + 2^26 + 2^27 + 2^29 + 2^31 + 2^32 + 2^35 + 2^37 + 2^38 + 2^39
Number 1458252205147: 2^0 + 2^1 + 2^3 + 2^4 + 2^6 + 2^10 + 2^11 + 2^14 + 2^15 + 2^17 + 2^19 + 2^20 + 2^23 + 2^25 + 2^26 + 2^31 + 2^32 + 2^33 + 2^36 + 2^38 + 2^40
Number 2895374552463: 2^0 + 2^1 + 2^2 + 2^3 + 2^7 + 2^8 + 2^10 + 2^11 + 2^15 + 2^16 + 2^18 + 2^22 + 2^23 + 2^24 + 2^29 + 2^33 + 2^37 + 2^39 + 2^41
Number 7409811047825: 2^0 + 2^4 + 2^7 + 2^8 + 2^10 + 2^14 + 2^15 + 2^16 + 2^17 + 2^18 + 2^21 + 2^24 + 2^25 + 2^27 + 2^28 + 2^29 + 2^32 + 2^34 + 2^35 + 2^36 + 2^37 + 2^39 + 2^41 + 2^42
Number 15404761757071: 2^0 + 2^1 + 2^2 + 2^3 + 2^7 + 2^8 + 2^10 + 2^12 + 2^13 + 2^17 + 2^19 + 2^20 + 2^22 + 2^24 + 2^25 + 2^28 + 2^29 + 2^31 + 2^33 + 2^41 + 2^42 + 2^43
Number 19996463086597: 2^0 + 2^2 + 2^10 + 2^11 + 2^12 + 2^13 + 2^18 + 2^20 + 2^25 + 2^27 + 2^30 + 2^31 + 2^32 + 2^33 + 2^34 + 2^35 + 2^37 + 2^41 + 2^44
Number 51408670348612: 2^2 + 2^6 + 2^8 + 2^10 + 2^12 + 2^14 + 2^15 + 2^19 + 2^23 + 2^24 + 2^25 + 2^31 + 2^32 + 2^38 + 2^39 + 2^41 + 2^42 + 2^43 + 2^45
Number 119666659114170: 2^1 + 2^3 + 2^4 + 2^5 + 2^7 + 2^10 + 2^11 + 2^12 + 2^13 + 2^16 + 2^18 + 2^20 + 2^21 + 2^23 + 2^28 + 2^33 + 2^34 + 2^36 + 2^38 + 2^39 + 2^42 + 2^43 + 2^45 + 2^46
Number 191206974700443: 2^0 + 2^1 + 2^3 + 2^4 + 2^7 + 2^8 + 2^9 + 2^11 + 2^12 + 2^13 + 2^17 + 2^18 + 2^19 + 2^22 + 2^23 + 2^24 + 2^25 + 2^26 + 2^28 + 2^30 + 2^31 + 2^33 + 2^34 + 2^37 + 2^38 + 2^39 + 2^40 + 2^42 + 2^43 + 2^45 + 2^47
Number 409118905032525: 2^0 + 2^2 + 2^3 + 2^6 + 2^8 + 2^9 + 2^10 + 2^11 + 2^12 + 2^14 + 2^16 + 2^24 + 2^25 + 2^27 + 2^29 + 2^30 + 2^32 + 2^33 + 2^34 + 2^36 + 2^42 + 2^44 + 2^45 + 2^46 + 2^48
Number 611140496167764: 2^2 + 2^4 + 2^6 + 2^8 + 2^9 + 2^12 + 2^15 + 2^17 + 2^18 + 2^19 + 2^21 + 2^26 + 2^27 + 2^28 + 2^29 + 2^34 + 2^36 + 2^38 + 2^39 + 2^40 + 2^41 + 2^43 + 2^45 + 2^49
Number 2058769515153876: 2^2 + 2^4 + 2^6 + 2^7 + 2^8 + 2^11 + 2^21 + 2^23 + 2^24 + 2^29 + 2^31 + 2^36 + 2^37 + 2^38 + 2^44 + 2^46 + 2^48 + 2^49 + 2^50
Number 4216495639600700: 2^2 + 2^3 + 2^4 + 2^5 + 2^9 + 2^10 + 2^11 + 2^12 + 2^15 + 2^16 + 2^17 + 2^19 + 2^22 + 2^23 + 2^26 + 2^29 + 2^30 + 2^32 + 2^37 + 2^38 + 2^39 + 2^41 + 2^43 + 2^44 + 2^45 + 2^46 + 2^47 + 2^49 + 2^50 + 2^51
Number 6763683971478124: 2^2 + 2^3 + 2^5 + 2^6 + 2^9 + 2^12 + 2^13 + 2^17 + 2^18 + 2^19 + 2^20 + 2^21 + 2^22 + 2^26 + 2^29 + 2^30 + 2^31 + 2^35 + 2^39 + 2^40 + 2^41 + 2^42 + 2^51 + 2^52
Number 9974455244496707: 2^0 + 2^1 + 2^6 + 2^8 + 2^9 + 2^10 + 2^11 + 2^12 + 2^16 + 2^18 + 2^19 + 2^21 + 2^23 + 2^24 + 2^26 + 2^28 + 2^30 + 2^31 + 2^33 + 2^34 + 2^36 + 2^37 + 2^39 + 2^40 + 2^41 + 2^42 + 2^43 + 2^45 + 2^46 + 2^48 + 2^49 + 2^53
Number 30045390491869460: 2^2 + 2^4 + 2^8 + 2^13 + 2^14 + 2^15 + 2^16 + 2^17 + 2^18 + 2^21 + 2^22 + 2^24 + 2^25 + 2^27 + 2^28 + 2^31 + 2^32 + 2^33 + 2^34 + 2^35 + 2^36 + 2^41 + 2^42 + 2^43 + 2^44 + 2^45 + 2^47 + 2^49 + 2^51 + 2^53 + 2^54
Number 44218742292676575: 2^0 + 2^1 + 2^2 + 2^3 + 2^4 + 2^6 + 2^7 + 2^8 + 2^9 + 2^10 + 2^11 + 2^12 + 2^13 + 2^14 + 2^15 + 2^18 + 2^22 + 2^23 + 2^25 + 2^27 + 2^28 + 2^29 + 2^33 + 2^34 + 2^36 + 2^37 + 2^39 + 2^43 + 2^44 + 2^48 + 2^50 + 2^51 + 2^52 + 2^55
Number 138245758910846492: 2^2 + 2^3 + 2^4 + 2^9 + 2^10 + 2^12 + 2^14 + 2^15 + 2^16 + 2^18 + 2^20 + 2^23 + 2^24 + 2^25 + 2^26 + 2^32 + 2^35 + 2^38 + 2^39 + 2^40 + 2^42 + 2^45 + 2^48 + 2^49 + 2^51 + 2^53 + 2^54 + 2^55 + 2^56
Number 199976667976342049: 2^0 + 2^5 + 2^9 + 2^11 + 2^12 + 2^15 + 2^19 + 2^20 + 2^25 + 2^28 + 2^30 + 2^35 + 2^36 + 2^37 + 2^39 + 2^40 + 2^42 + 2^44 + 2^45 + 2^46 + 2^49 + 2^50 + 2^54 + 2^55 + 2^57
Number 525070384258266191: 2^0 + 2^1 + 2^2 + 2^3 + 2^6 + 2^10 + 2^12 + 2^13 + 2^15 + 2^17 + 2^19 + 2^22 + 2^23 + 2^24 + 2^25 + 2^26 + 2^31 + 2^32 + 2^33 + 2^35 + 2^36 + 2^37 + 2^39 + 2^42 + 2^43 + 2^45 + 2^46 + 2^48 + 2^51 + 2^54 + 2^56 + 2^57 + 2^58
Number 1135041350219496382: 2^1 + 2^2 + 2^3 + 2^4 + 2^5 + 2^7 + 2^8 + 2^9 + 2^11 + 2^12 + 2^13 + 2^14 + 2^17 + 2^18 + 2^20 + 2^21 + 2^24 + 2^26 + 2^29 + 2^35 + 2^36 + 2^41 + 2^43 + 2^44 + 2^45 + 2^46 + 2^54 + 2^55 + 2^56 + 2^57 + 2^58 + 2^59
Number 1425787542618654982: 2^1 + 2^2 + 2^8 + 2^11 + 2^14 + 2^17 + 2^18 + 2^20 + 2^21 + 2^22 + 2^23 + 2^25 + 2^30 + 2^32 + 2^33 + 2^34 + 2^36 + 2^37 + 2^41 + 2^43 + 2^45 + 2^46 + 2^48 + 2^51 + 2^54 + 2^55 + 2^56 + 2^57 + 2^60
Number 3908372542507822062: 2^1 + 2^2 + 2^3 + 2^5 + 2^6 + 2^7 + 2^8 + 2^9 + 2^11 + 2^13 + 2^15 + 2^16 + 2^20 + 2^25 + 2^26 + 2^28 + 2^29 + 2^31 + 2^33 + 2^34 + 2^35 + 2^36 + 2^42 + 2^44 + 2^46 + 2^48 + 2^50 + 2^51 + 2^52 + 2^53 + 2^57 + 2^58 + 2^60 + 2^61
Number 8993229949524469768: 2^3 + 2^11 + 2^13 + 2^14 + 2^16 + 2^17 + 2^18 + 2^19 + 2^22 + 2^23 + 2^26 + 2^27 + 2^29 + 2^31 + 2^32 + 2^34 + 2^35 + 2^36 + 2^37 + 2^38 + 2^39 + 2^41 + 2^42 + 2^43 + 2^44 + 2^46 + 2^49 + 2^50 + 2^51 + 2^54 + 2^55 + 2^58 + 2^59 + 2^60 + 2^61 + 2^62
Number 17799667357578236628: 2^2 + 2^4 + 2^6 + 2^7 + 2^9 + 2^12 + 2^16 + 2^20 + 2^23 + 2^28 + 2^29 + 2^31 + 2^32 + 2^33 + 2^34 + 2^37 + 2^40 + 2^41 + 2^42 + 2^43 + 2^44 + 2^48 + 2^50 + 2^56 + 2^57 + 2^58 + 2^60 + 2^61 + 2^62 + 2^63
Number 30568377312064202855: 2^0 + 2^1 + 2^2 + 2^5 + 2^6 + 2^11 + 2^13 + 2^14 + 2^17 + 2^20 + 2^21 + 2^23 + 2^24 + 2^26 + 2^32 + 2^34 + 2^36 + 2^37 + 2^40 + 2^44 + 2^45 + 2^47 + 2^51 + 2^52 + 2^53 + 2^59 + 2^61 + 2^63 + 2^64

If you can see the count of the powers of 2 are increasing.
I wrote a small script to try this but if someone can make multy gpu Windows/Linux program with that approach to try it.
in the script 2^65 is always present and random randint to try combinations of powers of 2 from 28 to 36 (27,35 in the script) counts in random for the puzzle #66.

import bitcoin
import ecdsa
import base58
import random
import logging

# Function to convert private key to Wallet Import Format (WIF)
def private_key_to_wif(private_key):
    wif = bitcoin.encode_privkey(bitcoin.decode_privkey(private_key, 'hex'), 'wif')
    return wif

# Function to convert private key to Bitcoin address (P2PKH)
def private_key_to_address(private_key):
    sk = ecdsa.SigningKey.from_string(bytes.fromhex(private_key), curve=ecdsa.SECP256k1)
    vk = sk.get_verifying_key()
    compressed_vk = vk.to_string('compressed').hex()
    address = bitcoin.pubkey_to_address(compressed_vk)
    return address

# Function to calculate Hash 160 of a Bitcoin address
def address_to_hash160(address):
    decoded_address = base58.b58decode_check(address)
    return decoded_address[1:].hex()

# Function to generate a Bitcoin private key and check if the corresponding address matches the target address
def generate_private_key(target_hash160):
    while True:
        try:
            num_objects = random.randint(27,35)
            random_values = random.sample(range(0, 65), num_objects)
            random_values.append(65)
            private_key_num = sum([2 ** power for power in random_values])
            private_key = format(private_key_num, '064x')
            bitcoin_address = private_key_to_address(private_key)
            hash160 = address_to_hash160(bitcoin_address)

            print("Private Key:", private_key)

            if hash160 == target_hash160:
                with open('private_key.txt', 'w') as file:
                    file.write(private_key)
                logging.info("Private key saved to 'private_key.txt' file.")
                break
        except Exception as e:
            logging.error(f"Error: {str(e)}")

def main():
    target_hash160 = '20d45a6a762535700ce9e0b216e31994335db8a5'
    logging.basicConfig(filename='bitcoin_keygen.log', level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
    logging.info("Generating private keys...")
    generate_private_key(target_hash160)

if __name__ == "__main__":
    main()
member
Activity: 93
Merit: 16
Not sure what you mean? If a tame and wild collide; the key is solved. Why do anything else except sweep the funds.
Still, they collide at different times. Probably everything needs to be saved. Very large volume. I launched dp 2^20 and already got 7Gb. I load the starting keys from a file. I save working files every 10 minutes, checking the tame kangaroos for compliance with the secp key-point. The loading and saving code is in the Backup.cpp file.
full member
Activity: 1162
Merit: 237
Shooters Shoot...
I finally have 2^30.75+ (1,806,000,000) wild kangaroo points stored (offsets of #130s public key). Now it's time to release the tame kangaroos. Hopefully within 2-3 months, I'll have a tame land on a wild trap.
I imagine I am behind the group that found #120 & #125, but maybe luck will be on my side.
Long journey ahead, let's go.
Imagine this situation.
Two kangaroos collided - tame and wild. What will they do next? They will jump with the same jumps and constantly collide. Next, the selected points (DP modulo) are saved several times.
Now the question. What's better? Should you regularly save the path traveled and P points (for each kangaroo in a separate line - in a 243 MB file) or save tens of Gigabytes of selected points?
When you restart the program, startup keys are not created. They load them from the Work_Kangaroos.txt file they saved earlier.
So what would be better, do you need old saved points?
Well, if only one video card is used  Wink
Not sure what you mean? If a tame and wild collide; the key is solved. Why do anything else except sweep the funds.
member
Activity: 93
Merit: 16
Im made new modification 011.
https://github.com/alek76-2/VanitySearch/tree/main/mod/011

Added functions:
- BIP32 Derivation Path m/0
- Normal Child extended private key
- Serialization Extended Private Key

Vector Test is successful.
SECP256K1.cpp - Output data keys string switch to lowercase.
Enable OpenSSL - Generate Random Seed.
Option: -verbose 4 Enable all info.
Option: -verbose 0 Disable all info.
Rekey multiply by 1000.

Run cmd: VanitySearch.exe -stop -verbose 4 -bip39 12 -level 1 -t 1 -bits 28 -r 10000 12jbtzBb54r97TCwW3G1gCFoumpckRAPdY
Code:
[ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ]
[                                                           ]
[===========================================================]
[                Changes by Alek76 modify 0.11              ]
[===========================================================]
[          Tips: 1NULY7DhzuNvSDtPkFzNo6oRTZQWBqXNE9         ]
[===========================================================]
[    Options added argv [-start] [-bits] and disable SSE    ]
[===========================================================]
[    Options added argv [-bip39] [-level] [-brainwallet]    ]
[===========================================================]
[                                                           ]
[ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ]

[i] Uses OpenSSL for random seed
[i] Use BIP-39 nb Word: 12
[i] Use PBKDF2 2048 Rounds of Seed for Expansion to 512 bits
[i] Verbose level info: 4 Option: -verbose 1 (use 0-4)

Search: 12jbtzBb54r97TCwW3G1gCFoumpckRAPdY [Compressed]

[i] First Seed: slot almost promote quantum say like copy focus anchor book indoor tattoo

[i] BIP32 Extended Private Key index: 0 Serialized:
xprv9s21ZrQH143K3AobdVoCZE3994h4WUcPtNkQ7zNZhBDBD5ZH9SYAMAwFhrpPn77pGPWDuGQYUHJFRtA3mfoxsMjRCDx4ZFkzLvHDrwn6b8G Length: 164

[i] BIP32 Extended Private Key index: 0 Serialized:
xprv9ua3Un4XBSp5TxXso3YWzM8FpnEM6C3zNrcF2wfGiHtX47UWHkHsAySs1aM3RzDiic9muwJ3NmrSmSwAoguDDAaEcGQZfwr2Pfh5gkvREqJ Length: 164
Start Sat Nov 18 17:27:57 2023
Base Key: Randomly changed every 10000 Kkeys
Number of CPU thread: 1

[i] First Seed: long speak broccoli panel vital thumb wedding member rebuild dentist image survey

[i] BIP32 Extended Private Key index: 0 Serialized:
xprv9s21ZrQH143K4CEVbkjazggoWBkBu5wiZfoW9Bjt1ychZyuws6f3xBVgnSPBp4vxAx7yEvdh9badAXe2H2CEDJ65gfZxwXGRN1wrbk2Q5eY Length: 164

[i] BIP32 Extended Private Key index: 0 Serialized:
xprv9udHcaDVg7rQeELQdY8AMEyENhkhu2DccsAPminDg9AjrwhsuwaoGYpGX8bpyfXF2eno5jMWqKprDMV6eMnbS3JLP6Diez8PVGW5dsck2aM Length: 164

[i] Seed: b3fff4545ac167fdc34d52f0834b21ecfa14f2c42e3f0476607c637a4afb67b01245d859d3f7b6287f4ab0f12ddd36e954c000b50943515f50b81ddf840f76dd

Bit 28 CPU Base Key thId 0: d661f3b
[0.00 Mkey/s][GPU 0.00 Mkey/s][Total 2^21.44][Found 0]

    Addr : 12jbtzBb54r97TCwW3G1gCFoumpckRAPdY
    Check: 12jbtzBb54r97TCwW3G1gCFoumpckRAPdY

!!! Result.txt Found key: d916ce8
!!! Result.txt Found key: d916ce8
!!! Result.txt Found key: d916ce8
!!! Result.txt Found key: d916ce8
!!! Result.txt Found key: d916ce8


New function drvKey() - Key derivation. Added Extended_flag.
Code:
void VanitySearch::drvKey(std::string &InData, std::string &InKey, std::string &outMaster, std::string &outChain, bool master_key_fl, uint32_t key_ind, uint8_t depth_ind, std::string &extended_key, Int &outIL, Int &outIR, std::string &pubkey) {

string seed = InData;// seed 64 bytes
string salt = InKey;// salt
unsigned char hseed[64];

Int parentMasterKey;
parentMasterKey.SetInt32(0);// clr
parentMasterKey.Set(&outIL);// Set parent of master key IL

Int parentChainKey;
parentChainKey.SetInt32(0);// clr
parentChainKey.Set(&outIR);// Set parent of chain key IR

//printf("\n  Parent Master Key: %s\n", parentMasterKey.GetBase16().c_str());// check
//printf("\n  Parent Chain Key:  %s\n", parentChainKey.GetBase16().c_str());

//printf("\ndrvKey len: %d seed: %s", (int)seed.length(), seed.c_str());
//printf("\ndrvKey len: %d salt: %s\n", (int)salt.length(), salt.c_str());

// Get index
uint32_t index_u32;
string index_str = "";
uint32_t Normal_Child_index_start = 0;// Use an index between 0 and 2147483647.
// Indexes in this range are designated for normal child extended keys.
// Put data and key through HMAC.
// data = public key + index (concatenated)
// key = chain code
// Indexes in this range are designated for hardened child extended keys.
uint32_t Hardened_Child_index_start = 2147483648;// Use an index between 2147483648 and 4294967295.

if (Hardened_Child_flag) {
index_u32 = Hardened_Child_index_start + key_ind;
} else {
index_u32 = Normal_Child_index_start + key_ind;
}
char itmp[16];
sprintf(itmp, "%08x", index_u32);
index_str = "";
index_str.append(itmp);
//printf("\n[i] index_str: %s ", index_str.c_str());// check index_str

string in_data = "";
// Set index
if (Hardened_Child_flag) {
in_data = "00" + outMaster + index_str;// in_data = outMaster + index_str;
} else {
in_data = pubkey + index_str;
}
//printf("\n[i] !! in_data: %s ", in_data.c_str());// check

// end Get index

// Set input data
if (!master_key_fl) {
seed = in_data;
}
InData = in_data;// update

// Bug fix!!! We hash the data, not the string.
// Get hex of input data
int len_in_data = (int)seed.length() / 2;
if ((seed.length() & 1) == 1 ) len_in_data += 1;// if the data length is not even
unsigned char *hex_buff_in_data = new unsigned char[len_in_data];
for (int j = 0; j < len_in_data; j++) {
unsigned char my1ch_data = 0;
sscanf(&seed[2 * j], "%02hhx", &my1ch_data);
hex_buff_in_data[j] = my1ch_data;// 1 byte
}
// Get hex of input key
int len_in_key = (int)salt.length() / 2;
if ((salt.length() & 1) == 1 ) len_in_key += 1;// if the key length is not even
unsigned char *hex_buff_in_key = new unsigned char[len_in_key];
for (int j = 0; j < len_in_key; j++) {
unsigned char my1ch_key = 0;
sscanf(&salt[2 * j], "%02hhx", &my1ch_key);
hex_buff_in_key[j] = my1ch_key;// 1 byte
}
// Hash function
if (master_key_fl) {
// HMAC sha512
hmac_sha512((unsigned char *)salt.c_str(), (int)salt.length(), (unsigned char *)hex_buff_in_data, len_in_data, hseed);
// the salt "Bitcoin seed" no converting in hex
} else {
// HMAC sha512
hmac_sha512((unsigned char *)hex_buff_in_key, len_in_key, (unsigned char *)hex_buff_in_data, len_in_data, hseed);
// the salt converting in hex!
}

// Reverse bytes
unsigned char hseed_r[64];
int b = 0;
for (b = 0; b < 64; b++) hseed_r[63 - b] = hseed[b];

// Split IL and IR
Int IL;
Int IR;
unsigned long long *vTmp_IL = (unsigned long long *)&hseed_r[32];// IL as master secret key
unsigned long long *vTmp_IR = (unsigned long long *)&hseed_r;// IR as master chain code

IL.SetInt32(0);
IL.bits64[0] = vTmp_IL[0];
IL.bits64[1] = vTmp_IL[1];
IL.bits64[2] = vTmp_IL[2];
IL.bits64[3] = vTmp_IL[3];
IL.bits64[4] = 0;
//
IR.SetInt32(0);
IR.bits64[0] = vTmp_IR[0];
IR.bits64[1] = vTmp_IR[1];
IR.bits64[2] = vTmp_IR[2];
IR.bits64[3] = vTmp_IR[3];
IR.bits64[4] = 0;
// end Split

// Childing Master Key
// MasterKey = (parentMasterKey + MasterKey) % Order _O
if (!master_key_fl) {
IL.ModAddK1order(&parentMasterKey);
}

outIL.Set(&IL);
outIR.Set(&IR);

// debug printf
//printf("\n[i] Output Master Key IL: %s ", IL.GetBase16().c_str());
//printf("\n[i] Output Chain Key  IR: %s \n", IR.GetBase16().c_str());

// Use IL as master secret key, and IR as master chain code.
string masterSecretKey = "";
string masterChainKey = "";
string extended_private_key = "";

string masterSecretKey_tmp = IL.GetBase16().c_str();// 32 bytes
string masterChainKey_tmp = IR.GetBase16().c_str();// The chain code is just an extra 32 bytes that we couple with the private key to create what we call an extended key.

// Output and Normalize lengh 64
string ret1 = "";
string s0 = "0";
for (int i = 0; i < 64 - (int)masterSecretKey_tmp.length(); i++) ret1.append(s0);
masterSecretKey.append(ret1);
masterSecretKey.append(masterSecretKey_tmp);
string ret2 = "";
for (int b = 0; b < 64 - (int)masterChainKey_tmp.length(); b++) ret2.append(s0);
masterChainKey.append(ret2);
masterChainKey.append(masterChainKey_tmp);
// Set output
outMaster = masterSecretKey;
outChain = masterChainKey;
// We use these 64 bytes to create our master extended private key.

// Get Parent Public Key for get check sum
Point pp;
Int pk;
pk.SetInt32(0);

if (master_key_fl) {
pk.Set(&IL);
} else {
pk.Set(&parentMasterKey);
}

pp = secp->ComputePublicKey(&pk);

// The publick key to output for create new input msg HMAC-SHA512
pubkey = secp->GetPublicKeyHex(true, pp);// SECP256K1.cpp changes string uppercase to lowercase !!

// Parrent address for check
string parrent_addr = secp->GetAddress(0, 1, pp);
//printf("\n[i] Parrent Pub key:  %s ", pubkey.c_str());
//printf("\n[i] Parrent address: %s \n", parrent_addr.c_str());

if (Extended_flag) {// test extended ?

// Public key
Point child_Point;
Int child_Key;
child_Key.SetInt32(0);// clr
child_Key.Set(&IL);
child_Point = secp->ComputePublicKey(&child_Key);
// Address
string child_pub_key = secp->GetPublicKeyHex(true, child_Point);
string child_addr = secp->GetAddress(0, 1, child_Point);

//printf("\n[i] Child Pub key: %s ", child_pub_key.c_str());
//printf("\n[i] Child address: %s \n", child_addr.c_str());

  pubkey = child_pub_key;// Use as extended

}

// BIP32 Extended Private Key Serialize:
// Places “xprv” 0488ade4 or “xpub” 0488b21e at the start.
string version = "0488ade4";// 0488ade4 Bitcoin Mainnet private key.
string depth = "00";// How many derivations deep this extended key is from the master key.
string parent_fingerprint = "00000000";// The first 4 bytes of the hash160 of the parent’s public key. This helps to identify the parent later.
string child_index = "00000000";// The index number of this child from the parent.
string chain_code = masterChainKey;// The extra 32 byte secret. This prevents others from deriving child keys without it.
string prepend = "00";
string key = "";// 33 bytes - The private key (prepend 0x00) or public key.

key = prepend + masterSecretKey;

if (!master_key_fl){
child_index = index_str;
}

// Set depth
depth = "";
char dep[8];//char dep[1];
sprintf(dep, "%02x", depth_ind);
depth.append(dep);

// Get hash160
unsigned char hash160_buf[20];
unsigned char first4_buf[4];
secp->GetHash160(P2PKH, true, pp, hash160_buf);
memcpy(first4_buf, hash160_buf, 4);
// unsigned char to string
string my4str = "";
char tmp0[8];
for (int s = 0; s < 4; s++ ) {
sprintf(tmp0, "%02x", first4_buf[s]);
my4str.append(tmp0);
}
// Set parent fingerprint
if (!master_key_fl){
parent_fingerprint = my4str;
}

// check
//printf("\n              depth: %s \n", depth.c_str());
//printf("\n parent_fingerprint: %s \n", parent_fingerprint.c_str());
//printf("\n        child_index: %s \n", child_index.c_str());

// Get check check sum
string in_checksum = version + depth + parent_fingerprint + child_index + chain_code + key;
string checksum = "";// First 4 bytes of 32

// Get check sum
unsigned char key_buff[32];
unsigned char key_buff_ret[32];
// Get hex input data 78 bytes to check sum 4 bytes
unsigned char hex_buff_in[78];
for (int j = 0; j < 78; j++) {
unsigned char my1ch_chk = 0;
sscanf(&in_checksum[2 * j], "%02hhx", &my1ch_chk);
hex_buff_in[j] = my1ch_chk;// 1 byte
}
// Double sha256()
sha256(hex_buff_in, 78, (unsigned char *)key_buff);
sha256((unsigned char *)key_buff, 32, (unsigned char *)key_buff_ret);
char tmp[8];
string ret = "";
for (int s = 0; s < 4; s++ ) {
sprintf(tmp, "%02x", key_buff_ret[s]);
ret.append(tmp);
}
checksum.append(ret);
// end check sum

extended_private_key = in_checksum + checksum;

// Extended private key - num bytes
// 4 + 1 + 4 + 4 + 32 + 1 + 32 + 4 = 82
// 78 bytes data and 4 bytes check sum

// Finally converting everything to Base58
string extended_private_key_base58 = "";// Output data Extended Private Key Serialized.

// Get hex all data 82 bytes
unsigned char hex_buff_ex_priv_key[82];
for (int j = 0; j < 82; j++) {
unsigned char my1ch = 0;
sscanf(&extended_private_key[2 * j], "%02hhx", &my1ch);
hex_buff_ex_priv_key[j] = my1ch;// 1 byte
}
//printf("\n[i] extended_private_key: %s ", extended_private_key.c_str());// check

// Encode Base58
extended_private_key_base58 = EncodeBase58((const unsigned char *)hex_buff_ex_priv_key, (const unsigned char *)hex_buff_ex_priv_key + 82);
// Output data
extended_key = extended_private_key_base58;

if (verbose_fl >= 4) {
int len = (int)extended_private_key.length();
printf("\n[i] BIP32 Extended Private Key index: %u Serialized: \n%s Length: %d \n", key_ind, extended_private_key_base58.c_str(), len);
}

// memory leak ?
delete [] hex_buff_in_data;
delete [] hex_buff_in_key;

}


No one was waiting? I'm back for a while  Smiley



I finally have 2^30.75+ (1,806,000,000) wild kangaroo points stored (offsets of #130s public key). Now it's time to release the tame kangaroos. Hopefully within 2-3 months, I'll have a tame land on a wild trap.
I imagine I am behind the group that found #120 & #125, but maybe luck will be on my side.
Long journey ahead, let's go.
Imagine this situation.
Two kangaroos collided - tame and wild. What will they do next? They will jump with the same jumps and constantly collide. Next, the selected points (DP modulo) are saved several times.
Now the question. What's better? Should you regularly save the path traveled and P points (for each kangaroo in a separate line - in a 243 MB file) or save tens of Gigabytes of selected points?
When you restart the program, startup keys are not created. They load them from the Work_Kangaroos.txt file they saved earlier.
So what would be better, do you need old saved points?
Well, if only one video card is used  Wink
copper member
Activity: 1330
Merit: 899
🖤😏
Hello friends, I found more interesting things.
As I said before, many triangles are connected in a chain.
After a change, the shapes behaved strangely.
I did one thing, but it was done automatically for all triangles, but on the contrary, the output I expected is outside the rules of geometry and mathematics! It's as if the numbers went into the void...
One digit was separated from the private key and appeared among other numbers.
I want to say that this reaction has nothing to do with what I did. I know graphics and shapes well.
This reaction is definitely private key guide 66.
One of the dear programmers would like to write a code in Python language:
Get a text file containing numbers
Check the numbers line by line for puzzle 66 and if the key is correct, output it in a text file.
It will definitely be a few hours of brute force...
Hey, the puzzle that was solved, I'm paying attention to the programmer's reward.
So you have been trolling us all this time? I thought you were working on public keys when you talked about shapes and whatnot, now you are talking about #66 which is an unknown number and there are no known possible mathematical relations between addresses, rmd160 hashes which are the only available data we have on the unexposed puzzles.

You can't even post a single example to show us what you are talking about,  this is disappointing, I really thought someone has finally cracked the code.😐
newbie
Activity: 18
Merit: 0
Hello friends, I found more interesting things.
As I said before, many triangles are connected in a chain.
After a change, the shapes behaved strangely.
I did one thing, but it was done automatically for all triangles, but on the contrary, the output I expected is outside the rules of geometry and mathematics! It's as if the numbers went into the void...
One digit was separated from the private key and appeared among other numbers.
I want to say that this reaction has nothing to do with what I did. I know graphics and shapes well.
This reaction is definitely private key guide 66.
One of the dear programmers would like to write a code in Python language:
Get a text file containing numbers
Check the numbers line by line for puzzle 66 and if the key is correct, output it in a text file.
It will definitely be a few hours of brute force...
Hey, the puzzle that was solved, I'm paying attention to the programmer's reward.
copper member
Activity: 1330
Merit: 899
🖤😏
   
o.0 🧐 Can I play a bit as well with your new tool Zahid? 🤤 I don't know whether this emoji has died from drowning with a happy face or is just drooling 🤤, So that means we want both of your new scripts/ tools, the one with colors and this one. 😮

member
Activity: 272
Merit: 20
the right steps towerds the goal
                Puzzle 62                                                           Puzzle 70                                                      

                         

                                                                              
Puzzle 66 : Lets visualize how tough guessing 4 bytes or 30 bits are ?




                 Puzzle 66

hero member
Activity: 862
Merit: 662
is there any tutorial for searching hash160 using keyhunt on vast.ai ? i am new here , thanks

Its not vast.ai best optimized for GPU programs? what keyhunt are you talking about?

I suggest you open a thread with this as an OP

Maybe better ask it in my thread
Keyhunt - development requests - bug reports

jr. member
Activity: 31
Merit: 1
Quote
is there any tutorial for searching hash160 using keyhunt on vast.ai ? i am new here , thanks

This sounds too strange for a newbie in here. You might be a dev out there but what do I know. I suggest you open a thread with this as an OP
full member
Activity: 161
Merit: 230
;DLet me see, friends, is there a program that receives a photo file and then analyzes it, i.e. separates objects, people or animals, letters, numbers and colors and then makes a wallet from this information?
Yes, but you will have to wait a few years for it to be coded, since it's a new idea and also very insecure way, but if you already know what each color should represent, either they should represent 1 digit, decimal or hex, in which order? From which side/angle? Top to bottom-Left to right? What kind of algorithm is similar to convert people, animals to numbers and  what should be the factors, who decides  whether a man or woman should  convert to what exactly?
That requires an artificial intelligence with advanced algos, it's not an easy or even useful one to bother.




I mean, why do you think these keys are special? Why are you fixated on these keys in particular?
Ok, when I think about it, I might have mentioned them 10-12 times in total, so I'm not that much fixated, another thing is that when I find things interesting, I share them to see if others can find more things about them or not.

Just a simple example, when you multiply a point by lambda 2 times, you get 3 identical y coordinates, and if you divide or multiply those 3 points by the same scalar, the results will also have identical y coordinates, not to mention beta a1,a2, b1, b2 etc.
So when I share and talk about them, I hope someone who knows more and better to add to the discussion by providing more interesting facts.

That didn't answer my question. What makes you assume 0x14551231950b75fc4402da1732fc9bebf is more interesting than 0x14551231950b75fc4402da1732fc9bec0 or 0x14551231950b75fc4402da1732fc9bebe?
jr. member
Activity: 32
Merit: 1
is there any tutorial for searching hash160 using keyhunt on vast.ai ? i am new here , thanks
copper member
Activity: 1330
Merit: 899
🖤😏
;DLet me see, friends, is there a program that receives a photo file and then analyzes it, i.e. separates objects, people or animals, letters, numbers and colors and then makes a wallet from this information?
Yes, but you will have to wait a few years for it to be coded, since it's a new idea and also very insecure way, but if you already know what each color should represent, either they should represent 1 digit, decimal or hex, in which order? From which side/angle? Top to bottom-Left to right? What kind of algorithm is similar to convert people, animals to numbers and  what should be the factors, who decides  whether a man or woman should  convert to what exactly?
That requires an artificial intelligence with advanced algos, it's not an easy or even useful one to bother.




I mean, why do you think these keys are special? Why are you fixated on these keys in particular?
Ok, when I think about it, I might have mentioned them 10-12 times in total, so I'm not that much fixated, another thing is that when I find things interesting, I share them to see if others can find more things about them or not.

Just a simple example, when you multiply a point by lambda 2 times, you get 3 identical y coordinates, and if you divide or multiply those 3 points by the same scalar, the results will also have identical y coordinates, not to mention beta a1,a2, b1, b2 etc.
So when I share and talk about them, I hope someone who knows more and better to add to the discussion by providing more interesting facts.
Jump to: