collision test for pz 20
2^20 1048576, 20 1HsMJxNiV7TLxmoF6uJNkydxPFDog4NQum | 863317
(24!/12!/12!)/2^20 2,578884124755859375
1048576 2^20
2704156 step
2 collisions, finds only 1 for some reason
(28!/14!/14!)/2^20 38,25817108154296875
1048576 2^20
40116600 step
38 collisions, look in the script...
import random
from bit import Key
list = ["1HsMJxNiV7TLxmoF6uJNkydxPFDog4NQum"] # pz 20 > dec 863317
def lexico_permute_string(s):
a = sorted(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]
a1="1"*14
a2="0"*14
a3=a1+a2 # seed str
s = a3 # seed str 000000000000000111111111111111
sv = lexico_permute_string(s)
count0 = 0
for line1 in sv:
s = line1#[0:30]
count0 += 1
random.seed(s)
Nn = "0","1"
RRR = [] #func()
for RR in range(20): # "bit" set
DDD = random.choice(Nn)
RRR.append(DDD)
d = ''.join(RRR)
b = int(d,2)
if b >= 1:
key = Key.from_int(b)
addr = key.address
if addr in list:
print ("found...........","seed step from 000000000000111111111111 to 111111111111000000000000","step",count0,"seed",s,"bit",d,"dec",b,addr)
#s1 = str(b)
#s2 = addr
#f=open("a.txt","a")
#f.write(s1)
#f.write(s2)
#f.close()
pass
else:
pass
#print ("step",count0,"seed",s,"bit",d,"dec",b,addr) #print (X,sv,len(sv),dd,len(dd),b,addr)
print("pz end")
input() #"pause"
for 64 ...
(188!/94!/94!)/2^64 1235956206315626091331338051467874028
18446744073709551616 2^64
22799367824217315491046998779230288685596678611381812000
1235956206315626091331338051467874028 collisions
(168!/84!/84!)/2^64 1246690648845973918331482456337
18446744073709551616 2^64
22997383338348585032434609379579328145757058837400 168!/84!/84!
1246690648845973918331482456337 collisions
(148!/74!/74!)/2^64 1266470970702566355349691
18446744073709551616 2^64
23362265873332749085315221863910685052043000 148!/74!/74!
1266470970702566355349691 collisions
(128!/64!/64!)/2^64 1298394228608800905,709 collisions
18446744073709551616 2^64
23951146041928082866135587776380551750 128!/64!/64!
1298394228608800905 collisions
(100!/50!/50!)/2^64 5469330747,064212325444
18446744073709551616 2^64
100891344545564193334812497256 100!/50!/50!
5469330747 collisions
(80!/40!/40!)/2^64 5827,977463326783892683
18446744073709551616 2^64
107507208733336176461620 80!/40!/40!
5827 collisions
(70!/35!/35!)/2^64 6,081630306594410506193
18446744073709551616 2^64
112186277816662845432 70!/35!/35!
6 collisions
(68!/34!/34!)/2^64 1,542442469063799766063
18446744073709551616 2^64
28453041475240576740 68!/34!/34!
1 collisions
the best option? (128!/64!/64!)/2^64
because 1 (68!/34!/34!)/2^64 may not exist, how to search 6? (70!/35!/35!)/2^64
112186277816662845432/6 = 18697712969443807572 (~ 2^64)
take the first step randomly and add to it 5 times dec 2^64...
or looking for "mathematical expectation" yeah monkeys are writing a book
it is not clear why because 256 bits can be different
bit to character sampling ratio
1111 11111111 1111111111111111 11111111111111111111111111111111...
import random
def lexico_permute_string(s):
a = sorted(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]
a1="1"*300
a2="0"*300
a3=a1+a2
s = a3#"11100000000" #000000000000000111111111111111
sv = lexico_permute_string(s)
count0 = 0
count1 = 0
count2 = 0
count3 = 0
count4 = 0
for line1 in sv:
s = line1#[0:30]
count0 += 1
random.seed(s)
Nn = "0","1"
RRR = [] #func()
for RR in range(256): # set 000-999 screening out length 305 683 773 120 642 028 55
DDD = random.choice(Nn)
RRR.append(DDD)
d = ''.join(RRR)
v1 = d[0:4]
v2 = d[0:8]
v3 = d[0:16]
v4 = d[0:32]
if v1 == "1111":
count1 += 1
#print(count0,count1,v1,s)
if v2 == "11111111":
count2 += 1
#print(count0,count1,count2,v1,v2,s)
if v3 == "1111111111111111":
count3 += 1
print(count0,count1,count2,count3,v1,v2,v3,s)
#print("")
if v4 == "11111111111111111111111111111111":
count4 += 1
print(count0,count1,count2,count3,count4,v1,v2,v3,v4,s)
#print("")