singIebit / pollardsrho

Implementation of the Pollard's Rho algorithm for the secp256k1 curve.
MIT License
4 stars 1 forks source link

Trying to understant the parts #4

Closed 21orangehat closed 5 days ago

21orangehat commented 2 weeks ago

We need to run the command as follow:

./pollardsrho <public key> <key range> <derived points>

Example:

./pollardsrho 03633cbe3ec02b9401c5effa144c5b4d22f87940259634858fc7e59b1c09937852 130 1000000

About public key, ok. We need to have it. About the key range, ok. We need to know in which range the private key was generated.

My dought comes to the derived points.

That value can be any value between a specific range? From 0 to infinit?

Or it needs to be in a minimum and maximum value in accord with the key range?

If it can be any value between 0 and infinit, then what is the impact if I put 10 as value or 99999999999999999999999999999999999

Memory? processment? all it?

singIebit commented 2 weeks ago

The derived_points variable stores the multiples of the generating point (G). These multiples are the derived points created dynamically during calculations. So there is no problem in using a large value for derived_points, since this is the maximum number of times you will multiply the G point. The memory in the array will be occupied as more derived points are created. However, the higher the value of derived points, the more memory needs to be allocated. So it is good to use controlled values ​​such as 100 thousand, 1 million, 2 million. Using values ​​in the billions, trillions as you mentioned would only decrease the performance of steps per second, since more memory would be allocated. So you might ask me, but Pollard's rho doesn't use much memory, right?, and I answer, indeed!, not like bsgs or others, because it doesn't need to create files to pre-compute hashes, as happens in (Baby Steps), Pollard's Rho does all the calculations in real time, dynamically as it goes, but this also has a heap memory cost due to the variables and intense calculations, but rho uses zero pre-computed memory.