Post
Topic
Board Development & Technical Discussion
Re: lightweight database, for brute force using publickeys-32Mk =3.81MB(secp256k1)
by
sssergy2705
on 27/11/2023, 15:20:51 UTC
What is that? I don't understand, are they false positives?
If so, you must increase the collision margin from 64 to 128 or higher and problem solved.
It is still random+ scalar so you can increase the margin of precision thanks to scalar multiplication.

Code:
import secp256k1 as ice
print("Making Binary Data-Base")


target_public_key = "02f6a8148a62320e149cb15c544fe8a25ab483a0095d2280d03b8a00a7feada13d"

target = ice.pub2upub(target_public_key)

num = 50000000 # number of times.

sustract= 10 #amount to subtract each time.

sustract_pub= ice.scalar_multiplication(sustract)

res= ice.point_loop_subtraction(num, target, sustract_pub)

for t in range(num+1):

    h = (res[t*65:t*65+65]).hex()

    if h:  # Добавляем проверку здесь

        hc = int(h[2:], 16)

        if str(hc).endswith(('0','2','4','6','8')):

            A = "0"

        elif str(hc).endswith(('1','3','5','7','9')):

            A = "1"

        with open("dat-bin35.txt", "a") as data:

            data.write(A)

    else:

        break  # Прерываем цикл, если h пустой
   


   

Code:
#@mcdouglasx
import secp256k1 as ice
import random
from bitstring import BitArray



print("Scanning Binary Sequence")


#range
start= 1
end=   34359738366
       

while True:

    pk= random.randint(start, end)

    target = ice.scalar_multiplication(pk)

    num = 32768 # number of times.

    sustract= 10 #amount to subtract each time.

    sustract_pub= ice.scalar_multiplication(sustract)

    res= ice.point_loop_subtraction(num, target, sustract_pub)
   
    binary = ''
   
    for t in range (num):
       
        h= (res[t*65:t*65+65]).hex()
        hc= int(h[2:], 16)
       
       
        if str(hc).endswith(('0','2','4','6','8')):
            A="0"
            binary+= ''.join(str(A))
           
        if str(hc).endswith(('1','3','5','7','9')):
            A="1"
            binary+= ''.join(str(A))
   
       
    my_str = binary

    b = bytes(BitArray(bin=my_str))

    file = open("data-base35.bin", "rb")

    dat = bytes(file.read())
   
    if b  in dat:
        with open (r"data-base35.bin", "rb") as file:
            s = b
            f = bytes(file.read())
            inx = f.find(s)
            Pk = (int(pk) + int(inx))+int(inx)*7
       
            data = open("win.txt","a")
            data.write("Pk:"+" "+hex(Pk)+"\n")
            data.close()
            pass