Pages:
Author

Topic: lightweight database, for brute force using publickeys-32Mk =3.81MB(secp256k1) - page 5. (Read 2625 times)

copper member
Activity: 205
Merit: 1

The first version of the script worked, the second does not find matches.
There may be an error in the code.

On my PC, 100 keys found out of 100, ....  Huh

Did you set the same parameters in both scripts?

About an hour and a half ago, I copied both scripts, created a database and launched the search script. I didn't change anything in the parameters.
legendary
Activity: 1932
Merit: 2077

The first version of the script worked, the second does not find matches.
There may be an error in the code.

On my PC, 100 keys found out of 100, ....  Huh

Did you set the same parameters in both scripts?
copper member
Activity: 205
Merit: 1
Quote
4) my script finds the key every time? So far, yes.
Ok, when I ran your original script, it was less than 20% of the time the key was found.

Keep working on the database size. I know you will get it down!

If you can get it down to 1 bit per key like the OPs, then you're onto something. His DB is unmatched so far.

Less than 20%? Did you try with the last version? Maybe the first version was not correct, I fixed some stuff.

I don't understand why:

1 bit for 2^32 key is better than 64bits for 2^32/2^20 = 2^12 keys.

Less size, less search time, 100% keys found.



The first version of the script worked, the second does not find matches.
There may be an error in the code.
legendary
Activity: 1932
Merit: 2077
Quote
4) my script finds the key every time? So far, yes.
Ok, when I ran your original script, it was less than 20% of the time the key was found.

Keep working on the database size. I know you will get it down!

If you can get it down to 1 bit per key like the OPs, then you're onto something. His DB is unmatched so far.

Less than 20%? Did you try with the last version? Maybe the first version was not correct, I fixed some stuff.

I don't understand why:

1 bit for 2^32 keys is better than 64bits for 2^32/2^20 = 2^12 keys.

Less size, less search time, 100% keys found.


To speed up the serch, I need to store more information per byte, more density of information/work per byte stored.

For example, If I generated all 2^44 keys and I stored only the keys with the first 20 bit = 0, I would get a database with the same size of a databse created with 1 key each 1 million.

But the search time would be faster, cause I would need to check only 1 key against the database instead of 1 million.
full member
Activity: 1162
Merit: 237
Shooters Shoot...
Quote
4) my script finds the key every time? So far, yes.
Ok, when I ran your original script, it was less than 20% of the time the key was found.

Keep working on the database size. I know you will get it down!

If you can get it down to 1 bit per key like the OPs, then you're onto something. His DB is unmatched so far.
member
Activity: 873
Merit: 22
$$P2P BTC BRUTE.JOIN NOW ! https://uclck.me/SQPJk
Impressive!

How did you manage to make your database smaller compared to your original script? And why does it go up in size with the same amount of keys? Edit: I read it wrong as if you were storing 1 Mil keys every time lol.

Also, does your search script find the key every time?

1) my original script (create_database) is not changed

2) not with the same amount of keys,  range is not equal to number of keys

number of keys stored = range / 2^20 in one case, and number_of_keys = range / 2^24 in other case

3) my script is basically BSGS:

big steps -> database : 1*G, 1*G+2^20*G, 1*G+2*2^20*G, 1*G+3*2^20*G, ...., range*G

small steps --> search:  P=k*G, k*G-G, k*G-2*G, k*G-3*G, ...., k*G-2^20*G

the only difference is: I'm triyng to reduce the size of database, storing only 64 bits for each key and other improvements.

4) my script finds the key every time? So far, yes.


publick you scrypts pls ?
legendary
Activity: 1932
Merit: 2077
Impressive!

How did you manage to make your database smaller compared to your original script? And why does it go up in size with the same amount of keys? Edit: I read it wrong as if you were storing 1 Mil keys every time lol.

Also, does your search script find the key every time?

1) my original script (create_database) is not changed

2) not with the same amount of keys,  range is not equal to number of keys

number of keys stored = range / 2^20 in one case, and number_of_keys = range / 2^24 in other case

3) my script is basically BSGS:

big steps -> database : 1*G, 1*G+2^20*G, 1*G+2*2^20*G, 1*G+3*2^20*G, ...., range*G

small steps --> search:  P=k*G, k*G-G, k*G-2*G, k*G-3*G, ...., k*G-2^20*G

the only difference is: I'm triyng to reduce the size of database, storing only 64 bits for each key and other improvements.

4) my script finds the key every time? So far, yes.

full member
Activity: 1162
Merit: 237
Shooters Shoot...
From start to finish. But it's not the speed, it's the size of the DB, only 121kb Smiley
Well I mean the speed is good for a single core. DB creation and search for the key and find it in under 9 seconds, 100% of the time.

My results:

-------------------------------------------------------------------------------
2^32 range

1 key each 2^20 (1 million)

time to generate the DB: 0.060 s
size of DB: 32kB

max time to find the private key : less than 2 seconds.
-------------------------------------------------------------------------------
2^36 range

1 key each 2^20 (1 million)

time to generate the DB: 0.5 s
size of DB: 512kB

max time to find the private key : less than 2 seconds.
-------------------------------------------------------------------------------
2^40 range

1 key each 2^20 (1 million)

time to generate the DB: 7.3 s
size of DB: 8 MB

max time to find the private key : less than 2 seconds.
-------------------------------------------------------------------------------
2^44 interval

1 key each 2^20 (1 million)

time to generate the DB: 2 m
size of DB: 129 MB

max time to find the private key : less than 4 seconds.
-------------------------------------------------------------------------------
2^44 range

1 key each 2^24 (16 millions)

time to generate the DB: 7.3 s
size of DB: 8 MB

max time to find the private key : 30 seconds.
-------------------------------------------------------------------------------

The problem with my implementation is that the time search goes up with the size of DB and with the number of the keys I skip in the database creation.

The goal is to have a faster implementation for large intervals, not for small intervals Smiley

I updated my search_key script. Now it is a little faster.


Using a key in the 30 bit range: 3d94cd64

The result,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is the public key: 0d282cf2ff536d2c42f105d0b8588821a915dc3f9a05bd98bb23af67a2e92a5b
I need to find this private key: 0x3d94cd64

Private key found!!!
0x594cd64
a152cbd0f4fdb5caf73c1ef6469896a760461bb0d297075962b40b7f5e93d2fd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0x5  94cd64 the last 6 are correct but the 5 of course is wrong, so produces the wrong public key.
Not sure why

I thought it might be a false positive, but ran through the whole database, but no other string was found.

Are you sure you have changed the parameters in both scripts (same parameters in both): create_database and seach_pk ?
Anyway I updated the search_pk (it is in the same post)
Impressive!

How did you manage to make your database smaller compared to your original script? And why does it go up in size with the same amount of keys? Edit: I read it wrong as if you were storing 1 Mil keys every time lol.

Also, does your search script find the key every time?
legendary
Activity: 1932
Merit: 2077
From start to finish. But it's not the speed, it's the size of the DB, only 121kb Smiley
Well I mean the speed is good for a single core. DB creation and search for the key and find it in under 9 seconds, 100% of the time.

My results:

-------------------------------------------------------------------------------

I managed to get another improvement, using the symmetrie.

Instead of generating a interval [1 -> 2^40], if we shift the interval to [-2^39,2^39] then the 'positive' part has the same x-coordinates of the 'negative' part, so I can store only half keys (and have the same information).

Now these are my results:

-------------------------------------------------------------------------------
2^32 range

1 key each 2^20 (1 million)

time to generate the DB: 0.055 s
size of DB: 16kB

max time to find the private key : less than 2 seconds.
-------------------------------------------------------------------------------
2^36 range

1 key each 2^20 (1 million)

time to generate the DB: 0.26 s
size of DB: 256kB

max time to find the private key : less than 2 seconds.
-------------------------------------------------------------------------------
2^40 range

1 key each 2^20 (1 million)

time to generate the DB: 3.65 s
size of DB: 4 MB

max time to find the private key : 2 seconds.
-------------------------------------------------------------------------------
2^44 range

1 key each 2^20 (1 million)

time to generate the DB: 59 s
size of DB: 65 MB

max time to find the private key :  3 seconds.
-------------------------------------------------------------------------------
2^44 range

1 key each 2^24 (16 millions)

time to generate the DB: 3.65 s
size of DB: 4 MB

max time to find the private key : 31 seconds.
-------------------------------------------------------------------------------



I didn't upload the script yet.

Next step could be find a way to speed up the search, probably storing the keys in a different order.

Could this script be faster than BSGS (Baby Step Giant Step)?

Or Are they similar to each other?

Faster than BSGS ? No.

member
Activity: 194
Merit: 14
Could this script be faster than BSGS (Baby Step Giant Step)?

Or Are they similar to each other?
legendary
Activity: 1932
Merit: 2077
From start to finish. But it's not the speed, it's the size of the DB, only 121kb Smiley
Well I mean the speed is good for a single core. DB creation and search for the key and find it in under 9 seconds, 100% of the time.

My results:

-------------------------------------------------------------------------------
2^32 range

1 key each 2^20 (1 million)

time to generate the DB: 0.060 s
size of DB: 32kB

max time to find the private key : less than 2 seconds.
-------------------------------------------------------------------------------
2^36 range

1 key each 2^20 (1 million)

time to generate the DB: 0.5 s
size of DB: 512kB

max time to find the private key : less than 2 seconds.
-------------------------------------------------------------------------------
2^40 range

1 key each 2^20 (1 million)

time to generate the DB: 7.3 s
size of DB: 8 MB

max time to find the private key : less than 2 seconds.
-------------------------------------------------------------------------------
2^44 interval

1 key each 2^20 (1 million)

time to generate the DB: 2 m
size of DB: 129 MB

max time to find the private key : less than 4 seconds.
-------------------------------------------------------------------------------
2^44 range

1 key each 2^24 (16 millions)

time to generate the DB: 7.3 s
size of DB: 8 MB

max time to find the private key : 30 seconds.
-------------------------------------------------------------------------------

The problem with my implementation is that the time search goes up with the size of DB and with the number of the keys I skip in the database creation.

The goal is to have a faster implementation for large intervals, not for small intervals Smiley

I updated my search_key script. Now it is a little faster.


Using a key in the 30 bit range: 3d94cd64

The result,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is the public key: 0d282cf2ff536d2c42f105d0b8588821a915dc3f9a05bd98bb23af67a2e92a5b
I need to find this private key: 0x3d94cd64

Private key found!!!
0x594cd64
a152cbd0f4fdb5caf73c1ef6469896a760461bb0d297075962b40b7f5e93d2fd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0x5  94cd64 the last 6 are correct but the 5 of course is wrong, so produces the wrong public key.
Not sure why

I thought it might be a false positive, but ran through the whole database, but no other string was found.

Are you sure you have changed the parameters in both scripts (same parameters in both): create_database and seach_pk ?
Anyway I updated the search_pk (it is in the same post)
member
Activity: 873
Merit: 22
$$P2P BTC BRUTE.JOIN NOW ! https://uclck.me/SQPJk
I modified the script to match what arulbero did; create a random priv/pubkey and find it.

Results for a key in the 32 bit range:

Code:
This is the public key: 034a2c855cd562b2865ba5fafa6b8b9cd26d3276269f2ad314077675dca3dcce81
I need to find this private key: 0xfd4f6f66
Making Binary Data-Base


 Building the Binary Database

 Targeting PubKey:      034a2c855cd562b2865ba5fafa6b8b9cd26d3276269f2ad314077675dca3dcce81
 Number of PubKeys:     1,000,000
 Writing to file every: 1,000,000 keys
 Subtract Value:        1

 Scanning Incrementally

 Current Incr Location:  0xfd429840   Jumps Made:  4,249
 PK Found: 4249841510
 PK Found: 0xfd4f6f66

Total Time:  0:00:08.831704


and

Code:
This is the public key: 02bbbe90761d7c7ec3dabb3d64448ecdb5fa6f704ff06bcf7643176a74ffa69a4b
I need to find this private key: 0xff821c74
Making Binary Data-Base


 Building the Binary Database

 Targeting PubKey:      02bbbe90761d7c7ec3dabb3d64448ecdb5fa6f704ff06bcf7643176a74ffa69a4b
 Number of PubKeys:     1,000,000
 Writing to file every: 1,000,000 keys
 Subtract Value:        1

 Scanning Incrementally

 Current Incr Location:  0xff772b80   Jumps Made:  4,286
 PK Found: 4286717044
 PK Found: 0xff821c74

Total Time:  0:00:08.782662

From start to finish. But it's not the speed, it's the size of the DB, only 121kb Smiley
Well I mean the speed is good for a single core. DB creation and search for the key and find it in under 9 seconds, 100% of the time.


And were is your code ?
full member
Activity: 1162
Merit: 237
Shooters Shoot...
I modified the script to match what arulbero did; create a random priv/pubkey and find it.

Results for a key in the 32 bit range:

Code:
This is the public key: 034a2c855cd562b2865ba5fafa6b8b9cd26d3276269f2ad314077675dca3dcce81
I need to find this private key: 0xfd4f6f66
Making Binary Data-Base


 Building the Binary Database

 Targeting PubKey:      034a2c855cd562b2865ba5fafa6b8b9cd26d3276269f2ad314077675dca3dcce81
 Number of PubKeys:     1,000,000
 Writing to file every: 1,000,000 keys
 Subtract Value:        1

 Scanning Incrementally

 Current Incr Location:  0xfd429840   Jumps Made:  4,249
 PK Found: 4249841510
 PK Found: 0xfd4f6f66

Total Time:  0:00:08.831704


and

Code:
This is the public key: 02bbbe90761d7c7ec3dabb3d64448ecdb5fa6f704ff06bcf7643176a74ffa69a4b
I need to find this private key: 0xff821c74
Making Binary Data-Base


 Building the Binary Database

 Targeting PubKey:      02bbbe90761d7c7ec3dabb3d64448ecdb5fa6f704ff06bcf7643176a74ffa69a4b
 Number of PubKeys:     1,000,000
 Writing to file every: 1,000,000 keys
 Subtract Value:        1

 Scanning Incrementally

 Current Incr Location:  0xff772b80   Jumps Made:  4,286
 PK Found: 4286717044
 PK Found: 0xff821c74

Total Time:  0:00:08.782662

From start to finish. But it's not the speed, it's the size of the DB, only 121kb Smiley
Well I mean the speed is good for a single core. DB creation and search for the key and find it in under 9 seconds, 100% of the time.
member
Activity: 239
Merit: 53
New ideas will be criticized and then admired.
So $120 for fiber, why not adsl? And how much would you say is enough to get a PC,  to work on CUDA? I have no doubts about your ingenuity and perseverance and I'm sure you will have a bright future.@OP.

The signal with copper pairs is deteriorated and obsolete, therefore they have recently changed to fiber that is why the price of installation + moden + ROUTER, the ADSL lines have a lot of noise, it is to be expected that they are more than 40 years old. antiquity.
and as for CUDA cores, it is not worth having a high-end GPU to program, although the high-ends have interesting technologies, which perhaps can be extrapolated to brute force.
copper member
Activity: 1330
Merit: 899
🖤😏
So $120 for fiber, why not adsl? And how much would you say is enough to get a PC,  to work on CUDA? I have no doubts about your ingenuity and perseverance and I'm sure you will have a bright future.@OP.
full member
Activity: 1162
Merit: 237
Shooters Shoot...

Yoooo OP.

This is crazy lol.

Your revised search script you posted above, is over 7 times slower now.
I implemented a different way to search when your original search script didn't find the key using an increment, and when I run it compared to your revised version, mine is 7 times faster.
Now I have to unpeel it all and see what's going on.

I think this is what slows down your search script:

dat= BitArray(file.read())
versus
dat = bytes(file.read())

Yes I know it's slower, I apologize for that.

I did it this way to work with bits, because that's the way I think it should be done. While working with bits you are certain that you will find the key, without these keys being masked within the bytes.
My intention was not to do this to brute force directly with Python, as I said from the beginning, I am demonstrating an idea, C is better for this, unfortunately everything is against me.

- I don't have fiber optics, you can imagine what it would take me with 100kb/s to download what I need.
-my pc is an intel i5 4gb ddr 3 laptop.
- I live in an underdeveloped country where installing fiber costs $120 and is very difficult to find, not to mention a new PC.

I would love to do it in C, as soon as I have how I will do it, while I read about cuda, I learn things, I take notes on how games and software use the GPU in an efficient way.

I have other ideas how to apply this to bsgs, but while I write them in python as a draft.
Understood.

My search script is faster and only uses 0s and 1 like yours, but my binary files are about 4 times larger than yours because I’m not using the bitarray.

With all that said, this is a brilliant way to store large amounts of keys. And yes, I am also thinking on how to implement it with different programs.

Keep up the imagination; best breakthrough I’ve used/tested in awhile!
member
Activity: 239
Merit: 53
New ideas will be criticized and then admired.

Yoooo OP.

This is crazy lol.

Your revised search script you posted above, is over 7 times slower now.
I implemented a different way to search when your original search script didn't find the key using an increment, and when I run it compared to your revised version, mine is 7 times faster.
Now I have to unpeel it all and see what's going on.

I think this is what slows down your search script:

dat= BitArray(file.read())
versus
dat = bytes(file.read())

Yes I know it's slower, I apologize for that.

I did it this way to work with bits, because that's the way I think it should be done. While working with bits you are certain that you will find the key, without these keys being masked within the bytes.
My intention was not to do this to brute force directly with Python, as I said from the beginning, I am demonstrating an idea, C is better for this, unfortunately everything is against me.

- I don't have fiber optics, you can imagine what it would take me with 100kb/s to download what I need.
-my pc is an intel i5 4gb ddr 3 laptop.
- I live in an underdeveloped country where installing fiber costs $120 and is very difficult to find, not to mention a new PC.

I would love to do it in C, as soon as I have how I will do it, while I read about cuda, I learn things, I take notes on how games and software use the GPU in an efficient way.

I have other ideas how to apply this to bsgs, but while I write them in python as a draft.
jr. member
Activity: 36
Merit: 2
Thank you for providing the great program for testing purposes.
 As a student learning Python, I've been experimenting with ChatGPT and making several modifications.
The program here generates a public key by knowing the private key (starting from 1) and incrementing it by 1.
However, what I want to create is a program where I only know the public key without knowing the private key. In essence, I aim to find a situation where:

Public Key + 1 = Public Key
Public Key + 2 = Public Key
...
Public Key + 10000 = Public Key

Public Key(1000) + 1 = Public Key(1001)
Public Key(1000) + 2 = Public Key(1002)
...
Public Key(1000) + 10000 = Public Key(11000)

Thank you

Look at my previous posts, I'm sure you'll find what you need.

Thank you so much. I found the code
full member
Activity: 1162
Merit: 237
Shooters Shoot...
Quote
You are right, no match.
It must be a problem with the reading of bytes.
You definitely found a bug.
Because, it is in the DB but does not get it.
I'll fix it.

Edit:
The curious part is that if we start at 6 we get 3092000006
and match.
Any update? I've been trying tweaks to the search script, but I have not been successful.


Sorry, I've been busy, basically the problem is when we look in bytes, if we stop using bytes we find it.


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



print("Scanning Binary Sequence")



start=0
end= 4000000000

#1:4000000000
for i in range(start, end,4000000):
    
    target = ice.scalar_multiplication(i)

    num = 64 # collision margin.

    sustract= 1 # #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 = BitArray(bin=my_str)
    c = bytes(b)

    file = open("data-base.bin", "rb")
    dat= BitArray(file.read())
    

    if b  in dat:
        
        print("found")
        s = c
        f = dat
        inx = f.find(s)
        inx_1=str(inx).replace(",", "")
        inx_0=str(inx_1).replace("(", "")
        inx_2=str(inx_0).replace(")", "")
        
        Pk = (int(i) + int(inx_2))
            
        data = open("win.txt","a")
        data.write("Pk:"+" "+str(Pk)+"\n")
        data.close()
        break

Yoooo OP.

This is crazy lol.

Your revised search script you posted above, is over 7 times slower now.
I implemented a different way to search when your original search script didn't find the key using an increment, and when I run it compared to your revised version, mine is 7 times faster.
Now I have to unpeel it all and see what's going on.

I think this is what slows down your search script:

dat= BitArray(file.read())
versus
dat = bytes(file.read())
member
Activity: 239
Merit: 53
New ideas will be criticized and then admired.
Thank you for providing the great program for testing purposes.
 As a student learning Python, I've been experimenting with ChatGPT and making several modifications.
The program here generates a public key by knowing the private key (starting from 1) and incrementing it by 1.
However, what I want to create is a program where I only know the public key without knowing the private key. In essence, I aim to find a situation where:

Public Key + 1 = Public Key
Public Key + 2 = Public Key
...
Public Key + 10000 = Public Key

Public Key(1000) + 1 = Public Key(1001)
Public Key(1000) + 2 = Public Key(1002)
...
Public Key(1000) + 10000 = Public Key(11000)

Thank you

Look at my previous posts, I'm sure you'll find what you need.
Pages:
Jump to: