import random
from combi import *
import gmpy2
list2 = ["1HsMJxNiV7TLxmoF6uJNkydxPFDog4NQum"] # pz 20 > dec 863317 bit 11010010110001010101
F1="01"
aa1=F1[0]*50
aa2=F1[1]*50
def find_permutation(lst,K,numberbit1,numberbit0):
l = lst
N = numberbit0
M = numberbit1
if N == len(l):
return F1[1] * N
if M == len(l):
return F1[1] * M
result = ''
for i in range (0, len(lst)-1):
K0 = gmpy2.comb(len(l)-1, M)
if (K < K0):
result += F1[0]
l.remove (F1[0])
else:
result += F1[1]
l.remove (F1[1])
M -=1
K = K - K0
result += l[0]
return result
#ccount0 = 0
#a1 = "0"*22
#a2 = "1"*22
#a3 = a1+a2
#perm_space = PermSpace(a3)
#print(perm_space.length)
#print(perm_space.index(a4))
#( 44!/22!/22!)/2^20 2006625,140876770019531 collision
# 2104098963720 (44!/22!/22!)
#1048576×1048576 = 1099511627776
#1099511627776×1099511627776 = 1208925819614629174706176
#100!/50!/50! 100891344545564193334812497256
#44!/22!/22! 2104098963720
#aa = perm_space[2]
#aaa = "".join(aa)
#print(aaa)
pzbit = "11010010110001010101" #"11010010110001010101"
for XXX in range(1000000,1048576,1):
ccount0 = 0
random.seed()
gnoy= XXX #random.randrange(1000000,1048576,1) #1048576
saki = 1099511627776 * gnoy #random.randrange(1,1048576,1) #2^256×2^256
#print(gnoy,"1208925819614629174706176 //",saki,1208925819614629174706176//saki)
#print("")
X2=0 #X=10
while X2 <= 100891344545564193334812497256-1:
if X2 >= 1208925819614629174706176:
break
else:
pass
#count0 = 0
X=X2 #X=10
while X <= X2: #+100
ccount0 += 1
if ccount0 >= 1048576: #1048576 3000
break
#aa = perm_space[X]
#aaa = "".join(aa)
#count0 += 1
a3 = list(aa1+aa2)
K = X #perm_int
numberbit1 = len(aa1)
numberbit0 = len(aa2)
aa = find_permutation(a3,K,numberbit1,numberbit0)
random.seed(aa)
Nn = "0","1"
RRR = [] #func()
for RR in range(20): # "bit" set log2(x)=20 2^20 = 1048576, 1048576/20 = 52428,8
DDD = random.choice(Nn)
RRR.append(DDD)
d = ''.join(RRR)
#print(d,count0,aa,X)
#print(bin(X)[2:],XXX,saki,"loop count","step",d,aa,X2,ccount0)
#break
if pzbit in d:
print(bin(X)[2:],gnoy,"1099511627776 *",saki,"step",d,aa,X,X2,ccount0,XXX)
#print("")
#print("")
break
X=X+1
X2=X2+saki
#print("")
#print(X2)
#print("")
print("pz end")
input() #"pause"
***
import random
from combi import *
import gmpy2
import time
list2 = ["1HsMJxNiV7TLxmoF6uJNkydxPFDog4NQum"] # pz 20 > dec 863317 bit 11010010110001010101
F1="01"
aa1=F1[0]*50
aa2=F1[1]*50
def find_permutation(lst,K,numberbit1,numberbit0):
l = lst
N = numberbit0
M = numberbit1
if N == len(l):
return F1[1] * N
if M == len(l):
return F1[1] * M
result = ''
for i in range (0, len(lst)-1):
K0 = gmpy2.comb(len(l)-1, M)
if (K < K0):
result += F1[0]
l.remove (F1[0])
else:
result += F1[1]
l.remove (F1[1])
M -=1
K = K - K0
result += l[0]
return result
#ccount0 = 0
#a1 = "0"*22
#a2 = "1"*22
#a3 = a1+a2
#perm_space = PermSpace(a3)
#print(perm_space.length)
#print(perm_space.index(a4))
#( 44!/22!/22!)/2^20 2006625,140876770019531 collision
# 2104098963720 (44!/22!/22!)
#1048576×1048576 = 1099511627776
#1099511627776×1099511627776 = 1208925819614629174706176
#100!/50!/50! 100891344545564193334812497256
#44!/22!/22! 2104098963720
#aa = perm_space[2]
#aaa = "".join(aa)
#print(aaa)
ccount20 = 0
pzbit = "11010010110001010101" #"11010010110001010101"
for XXX in range(1,1208925819614629174706176,1):
#print("loop start",ccount20)
#print("")
ccount0 = 0
#random.seed()
#gnoy= XXX #random.randrange(1000000,1048576,1) #1048576
#saki = 1099511627776 * gnoy #random.randrange(1,1048576,1) #2^256×2^256
#print(gnoy,"1208925819614629174706176 //",saki,1208925819614629174706176//saki)
#print("")
#X2=0 #X=10
#while X2 <= 100891344545564193334812497256-1:
#if X2 >= 1208925819614629174706176:
#break
#else:
#pass
#count0 = 0
#X=X2 #X=10
#while X <= X2: #+100
#ccount0 += 1
#if ccount0 >= 1048576:
#break
for S1 in range(20,40,1):
for S2 in range(1):
random.seed()
Nn1 = "1","0","0","0","0","0"
RRR1 = [] #func()
for RR1 in range(S1): # bit len 1000000000000000000000000000000000000000000000000000000000000000000000000000000 00 1048576×1099511627776×1048576 = 1208925819614629174706176
DDD1 = random.choice(Nn1)
RRR1.append(DDD1)
d1 = ''.join(RRR1)
llen = bin(1208925819614629174706176)[2:]
llen2 = len(llen)
d0 = "0"
d2 = "1"+d1 # bit len 1000000000000000000000000000000000000000000000000000000000000000000000000000000 00 1048576×1099511627776×1048576 = 1208925819614629174706176
llen3 = llen2-len(d2)
d3 = d2+d0*llen3
f1=len(d3)
while f1 >= len(d2):
f2 = d3[0:f1]
d4 = int(f2,2)
ccount0 += 1
ccount20 += 1
if d4 <= 1208925819614629174706176:
#ccount0 += 1
#print(d3,d2)
#aa = perm_space[X]
#aaa = "".join(aa)
#count0 += 1
a3 = list(aa1+aa2)
K = d4 #perm_int
numberbit1 = len(aa1)
numberbit0 = len(aa2)
aa = find_permutation(a3,K,numberbit1,numberbit0)
random.seed(aa)
Nn = "0","1"
RRR = [] #func()
for RR in range(20): # "bit" set log2(x)=20 2^20 = 1048576, 1048576/20 = 52428,8
DDD = random.choice(Nn)
RRR.append(DDD)
d = ''.join(RRR)
#print(d,count0,aa,X)
#print(bin(X)[2:],XXX,saki,"loop count","step",d,aa,X2,ccount0)
#break
#print(FD,d2,d3,aa,d,pzbit)
#print(S1,S2,"",ccount0,f2,d4,d,pzbit)
if pzbit in d:
print(S1,S2,"",ccount0,f2,d4,d,aa,d,pzbit,ccount20)
print("")
print("")
pass
#time.sleep(10.0)
#X=X+1
#X2=X2+saki
#print("")
#print(X2)
#print("")
f1=f1-1
print("pz end")
input() #"pause"
*** random search
from os import system
system("title "+__file__)
import random
import time
import gmpy2
import secp256k1 as ice
list2 = ["16jY7qLJnxb7CHZyqBP8qca9d51gAjyXQN","13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so","1BY8GQbnueYofwSuFAT3USAhGjPrkxDdW9",
"1MVDYgVaSN6iKKEsbzRUAYFrYJadLYZvvZ","19vkiEajfhuZ8bs8Zu2jgmC6oqZbWqhxhG","1DJh2eHFYQfACPmrvpyWc8MSTYKh7w9eRF",
"1PWo3JeB9jrGwfHDNpdGK54CRas7fsVzXU","1JTK7s9YVYywfm5XUH7RNhHJH1LshCaRFR","12VVRNPi4SJqUTsp6FmqDqY5sGosDtysn4",
"1FWGcVDK3JGzCC3WtkYetULPszMaK2Jksv","1DJh2eHFYQfACPmrvpyWc8MSTYKh7w9eRF","1Bxk4CQdqL9p22JEtDfdXMsng1XacifUtE",
"15qF6X51huDjqTmF9BJgxXdt1xcj46Jmhb","1ARk8HWJMn8js8tQmGUJeQHjSE7KRkn2t8","15qsCm78whspNQFydGJQk5rexzxTQopnHZ",
"13zYrYhhJxp6Ui1VV7pqa5WDhNWM45ARAC","14MdEb4eFcT3MVG5sPFG4jGLuHJSnt1Dk2","1CMq3SvFcVEcpLMuuH8PUcNiqsK1oicG2D",
"1K3x5L6G57Y494fDqBfrojD28UJv4s5JcK","1PxH3K1Shdjb7gSEoTX7UPDZ6SH4qGPrvq","16AbnZjZZipwHMkYKBSfswGWKDmXHjEpSf",
"19QciEHbGVNY4hrhfKXmcBBCrJSBZ6TaVt","1EzVHtmbN4fs4MiNk3ppEnKKhsmXYJ4s74","1AE8NzzgKE7Yhz7BWtAcAAxiFMbPo82NB5",
"17Q7tuG2JwFFU9rXVj3uZqRtioH3mx2Jad","1K6xGMUbs6ZTXBnhw1pippqwK6wjBWtNpL","15ANYzzCp5BFHcCnVFzXqyibpzgPLWaD8b",
"18ywPwj39nGjqBrQJSzZVq2izR12MDpDr8","1CaBVPrwUxbQYYswu32w7Mj4HR4maNoJSX","1JWnE6p6UN7ZJBN7TtcbNDoRcjFtuDWoNL",
"1CKCVdbDJasYmhswB6HKZHEAnNa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1KWp6xVLD","13A3JrvXmvg5w9XGvyyR4JEJqiLz8ZySY3","16RGFo6hjq9ym6Pj7N5H7L1NR1rVPJyw2v",
"1UDHPdovvR985NrWSkdWQDEQ1xuRiTALq","15nf31J46iLuK1ZkTnqHo7WgN5cARFK3RA","1Ab4vzG6wEQBDNQM1B2bvUz4fqXXdFk2WT",
"1Fz63c775VV9fNyj25d9Xfw3YHE6sKCxbt","1QKBaU6WAeycb3DbKbLBkX7vJiaS8r42Xo","1CD91Vm97mLQvXhrnoMChhJx4TP9MaQkJo",
"15MnK2jXPqTMURX4xC3h4mAZxyCcaWWEDD","13N66gCzWWHEZBxhVxG18P8wyjEWF9Yoi1","1NevxKDYuDcCh1ZMMi6ftmWwGrZKC6j7Ux",
"19GpszRNUej5yYqxXoLnbZWKew3KdVLkXg","1M7ipcdYHey2Y5RZM34MBbpugghmjaV89P","18aNhurEAJsw6BAgtANpexk5ob1aGTwSeL",
"1FwZXt6EpRT7Fkndzv6K4b4DFoT4trbMrV","1CXvTzR6qv8wJ7eprzUKeWxyGcHwDYP1i2","1MUJSJYtGPVGkBCTqGspnxyHahpt5Te8jy",
"13Q84TNNvgcL3HJiqQPvyBb9m4hxjS3jkV","1LuUHyrQr8PKSvbcY1v1PiuGuqFjWpDumN","18192XpzzdDi2K11QVHR7td2HcPS6Qs5vg",
"1NgVmsCCJaKLzGyKLFJfVequnFW9ZvnMLN","1AoeP37TmHdFh8uN72fu9AqgtLrUwcv2wJ","1FTpAbQa4h8trvhQXjXnmNhqdiGBd1oraE",
"14JHoRAdmJg3XR4RjMDh6Wed6ft6hzbQe9","19z6waranEf8CcP8FqNgdwUe1QRxvUNKBG","14u4nA5sugaswb6SZgn5av2vuChdMnD9E5",
"174SNxfqpdMGYy5YQcfLbSTK3MRNZEePoy", "1NBC8uXJy1GiJ6drkiZa1WuKn51ps7EPTv"]
#262!/131!/131! 364950428295639250777230977182937950631063637653015344224357416878384793565048
# 1461501637330902918203684832716283019655932542976 2^160
# 115792089237316195423570985008687907853269984665640564039457584007913129639936 2^256 (340282366920938463463374607431768211456*340282366920938463463374607431768211456 = 2^256)
F1="01"
aa1=F1[0]*131
aa2=F1[1]*131
def find_permutation(lst,K,numberbit1,numberbit0):
l = lst
N = numberbit0
M = numberbit1
if N == len(l):
return F1[1] * N
if M == len(l):
return F1[1] * M
result = ''
for i in range (0, len(lst)-1):
K0 = gmpy2.comb(len(l)-1, M)
if (K < K0):
result += F1[0]
l.remove (F1[0])
else:
result += F1[1]
l.remove (F1[1])
M -=1
K = K - K0
result += l[0]
return result
#ccount0 = 0
for XXX in range(1,1000000000000,1): # loop step
llen = bin(115792089237316195423570985008687907853269984665640564039457584007913129639936)[2:]
llen2 = len(llen)
d0 = "0"
ccount0 = 0
for S1 in range(2,128,1): # half bit len for collision to dec set
for S2 in range(1): # random loop for ^ "half bit len for collision to dec set"
random.seed()
Nn1 = "0","1" # ours dropout "1","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"
RRR1 = []
for RR1 in range(S1):
DDD1 = random.choice(Nn1)
RRR1.append(DDD1)
d1 = ''.join(RRR1)
#llen = bin(115792089237316195423570985008687907853269984665640564039457584007913129639936)[2:]
#llen2 = len(llen)
#d0 = "0"
d2 = "1"+d1 # bit len for collision to dec set , 18446744073709551616 * 18446744073709551616 = 340282366920938463463374607431768211456 , 18446744073709551616 * 340282366920938463463374607431768211456 * 18446744073709551616 = 115792089237316195423570985008687907853269984665640564039457584007913129639936
llen3 = llen2-len(d2) # num zeros +
d3 = d2+d0*llen3
print(S1,S2,"",ccount0,d3)
f1=len(d3)
while f1 >= len(d2):
f2 = d3[0:f1]
d4 = int(f2,2)
if d4 <= 115792089237316195423570985008687907853269984665640564039457584007913129639936:
ccount0 += 1
a3 = list(aa1+aa2)
K = d4 #perm_int
numberbit1 = len(aa1)
numberbit0 = len(aa2)
aa = find_permutation(a3,K,numberbit1,numberbit0)
random.seed(aa) # init collision seed
Nn = "0","1"
RRR = [] #func()
for RR in range(160): # bit collision seeded len
DDD = random.choice(Nn)
RRR.append(DDD)
d = ''.join(RRR)
#print(S1,S2,"",ccount0,f2,d4,d,aa)
ii = 64
while ii <= 160:
dd = (d)[0:ii]
b = int(dd,2)
if b >= 9223372036854775807:
#key = Key.from_int(b)
addr = ice.privatekey_to_address(0, True, b) #key.address
if addr in list2:
print ("found!!!",b,addr)
s1 = str(b)
s2 = addr
f=open("a.txt","a")
f.write(s1)
f.write(s2)
f.close()
pass
else:
#print(S1,S2,"",ccount0,f2,d4,d,aa,addr)
pass
ii=ii+1
f1=f1-1
print("pz end")
input() #"pause"
*** step by step, just insert a string 128 long (128+128 for 64 pz...)
1000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000001
0000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000011
0000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000111
...
from os import system
system("title "+__file__)
import random
import time
import gmpy2
import secp256k1 as ice
list2 = ["16jY7qLJnxb7CHZyqBP8qca9d51gAjyXQN","13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so","1BY8GQbnueYofwSuFAT3USAhGjPrkxDdW9",
"1MVDYgVaSN6iKKEsbzRUAYFrYJadLYZvvZ","19vkiEajfhuZ8bs8Zu2jgmC6oqZbWqhxhG","1DJh2eHFYQfACPmrvpyWc8MSTYKh7w9eRF",
"1PWo3JeB9jrGwfHDNpdGK54CRas7fsVzXU","1JTK7s9YVYywfm5XUH7RNhHJH1LshCaRFR","12VVRNPi4SJqUTsp6FmqDqY5sGosDtysn4",
"1FWGcVDK3JGzCC3WtkYetULPszMaK2Jksv","1DJh2eHFYQfACPmrvpyWc8MSTYKh7w9eRF","1Bxk4CQdqL9p22JEtDfdXMsng1XacifUtE",
"15qF6X51huDjqTmF9BJgxXdt1xcj46Jmhb","1ARk8HWJMn8js8tQmGUJeQHjSE7KRkn2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P","18aNhurEAJsw6BAgtANpexk5ob1aGTwSeL",
"1FwZXt6EpRT7Fkndzv6K4b4DFoT4trbMrV","1CXvTzR6qv8wJ7eprzUKeWxyGcHwDYP1i2","1MUJSJYtGPVGkBCTqGspnxyHahpt5Te8jy",
"13Q84TNNvgcL3HJiqQPvyBb9m4hxjS3jkV","1LuUHyrQr8PKSvbcY1v1PiuGuqFjWpDumN","18192XpzzdDi2K11QVHR7td2HcPS6Qs5vg",
"1NgVmsCCJaKLzGyKLFJfVequnFW9ZvnMLN","1AoeP37TmHdFh8uN72fu9AqgtLrUwcv2wJ","1FTpAbQa4h8trvhQXjXnmNhqdiGBd1oraE",
"14JHoRAdmJg3XR4RjMDh6Wed6ft6hzbQe9","19z6waranEf8CcP8FqNgdwUe1QRxvUNKBG","14u4nA5sugaswb6SZgn5av2vuChdMnD9E5",
"174SNxfqpdMGYy5YQcfLbSTK3MRNZEePoy", "1NBC8uXJy1GiJ6drkiZa1WuKn51ps7EPTv"]
#262!/131!/131! 364950428295639250777230977182937950631063637653015344224357416878384793565048
# 1461501637330902918203684832716283019655932542976 2^160
# 115792089237316195423570985008687907853269984665640564039457584007913129639936 2^256 (340282366920938463463374607431768211456*340282366920938463463374607431768211456 = 2^256)
F1="01"
aa1=F1[0]*131
aa2=F1[1]*131
def find_permutation(lst,K,numberbit1,numberbit0):
l = lst
N = numberbit0
M = numberbit1
if N == len(l):
return F1[1] * N
if M == len(l):
return F1[1] * M
result = ''
for i in range (0, len(lst)-1):
K0 = gmpy2.comb(len(l)-1, M)
if (K < K0):
result += F1[0]
l.remove (F1[0])
else:
result += F1[1]
l.remove (F1[1])
M -=1
K = K - K0
result += l[0]
return result
def lexico_permute_string(s):
a = list(s)
n = len(a) - 1
while True:
yield ''.join(a)
for j in range(n-1, -1, -1):
if a[j] < a[j + 1]:
break
else:
return
v = a[j]
for k in range(n, j, -1):
if v < a[k]:
break
a[j], a[k] = a[k], a[j]
a[j+1:] = a[j+1:][::-1]
s = "0000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000011" #128!/126!/2! 8128
sv = lexico_permute_string(s)
ccount0 = 0
for XXX in sv: # loop step
llen = bin(115792089237316195423570985008687907853269984665640564039457584007913129639936)[2:]
llen2 = len(llen)
d0 = "0"
ccount0 += 1
d1 = XXX #''.join(RRR1)
#llen = bin(115792089237316195423570985008687907853269984665640564039457584007913129639936)[2:]
#llen2 = len(llen)
#d0 = "0"
d2 = "1"+d1 # bit len for collision to dec set , 18446744073709551616 * 18446744073709551616 = 340282366920938463463374607431768211456 , 18446744073709551616 * 340282366920938463463374607431768211456 * 18446744073709551616 = 115792089237316195423570985008687907853269984665640564039457584007913129639936
llen3 = llen2-len(d2) # num zeros +
d3 = d2+d0*llen3
print(XXX,"",ccount0,d3)
f1=len(d3)
while f1 >= len(d2):
f2 = d3[0:f1]
d4 = int(f2,2)
if d4 <= 115792089237316195423570985008687907853269984665640564039457584007913129639936:
#ccount0 += 1
a3 = list(aa1+aa2)
K = d4 #perm_int
numberbit1 = len(aa1)
numberbit0 = len(aa2)
aa = find_permutation(a3,K,numberbit1,numberbit0)
random.seed(aa) # init collision seed
Nn = "0","1"
RRR = [] #func()
for RR in range(160): # bit collision seeded len
DDD = random.choice(Nn)
RRR.append(DDD)
d = ''.join(RRR)
#print(d3,"",ccount0,f2,d4,d,aa)
ii = 64
while ii <= 160:
dd = (d)[0:ii]
b = int(dd,2)
if b >= 9223372036854775807:
#key = Key.from_int(b)
addr = ice.privatekey_to_address(0, True, b) #key.address
if addr in list2:
print ("found!!!",b,addr)
s1 = str(b)
s2 = addr
f=open("a.txt","a")
f.write(s1)
f.write(s2)
f.close()
pass
else:
#print(d3,"",ccount0,f2,d4,d,aa,addr)
pass
ii=ii+1
f1=f1-1
print("pz end")
input() #"pause"