Post
Topic
Board Development & Technical Discussion
Merits 8 from 3 users
Re: Vanitygen search
by
WanderingPhilospher
on 12/09/2021, 22:34:17 UTC
⭐ Merited by LoyceV (5) ,ETFbitcoin (2) ,nc50lc (1)
Just remove the EC_KEY_generate_key function at line 129 and increment the private key, and then use something like BN_set_word to increment the private key int manually and then run EC_POINT_mul to multiply it by G.

Disclaimer: The linear search will probably be faster, I suspect that the key generation method is slow.
The other thing to keep in mind, you can edit code to make it start at same point/key, each and every time, but when using a GPU, normally the code works like this:

take GPU x and y grid size; let's say our is 10x10

then the program takes your range/keyspace, let's say we have a range of 1000000

now the program divides the range by the grid size, in our example:
grid is 10x10 = 100
range size = 1000000
so the program spreads out each GPU thread every 10000 keys/points, and then works incrementally.

Same is true for CPU threads as well. Now you can control this via only using 1 CPU thread and that 1 thread will count incrementally.

But if you plan on using GPU, you will need to edit the code more or just know that while it will start from same point, it will be same point plus grid/range.
Also, if you have nothing to tell the program that x amount of keys have been reached/searched, then your GPU threads will be redoing the keys already ran by other GPU threads. So you have to put in a "nextkey" function that basically says, take grid, take range, take speed, calculate those things, and jump all threads forward by the calculation, once the calculation has been met.