qubd / mini_ecdsa

Elliptic curve tools, ECDSA, and ECDSA attacks.
The Unlicense
37 stars 21 forks source link

How to implement the Lambda Pollard algorithm on the "mini_ecdsa" module? #10

Open demining opened 2 years ago

demining commented 2 years ago

Hello Brendan! I want to thank you for creating one of the best math function modules on elliptic curves for Python. I sincerely believe that you will develop this project!

I have previously used SageMath's suite of functions including additive and multiplicative groups. But Python is better and different than SageMath. I want to implement Lambda Pollard's algorithm for computing discrete logarithms on your "mini_ecdsa" module

According to the Sage 9.4 Reference Manual: Groups / Miscellaneous Common Functions:

x = discrete_log_rho(PUB1, PUB2, ord=ORD3, operation='+')

INPUT:

PUB1 – a group element (point on curve, coordinates [x1, y1]) 

PUB2 – a group element (point on curve, coordinates [x2, y2])

ord – the order of base or None, in this case we try to compute it

operation – a string (default: '+') denoting whether we are in an additive group or a multiplicative one

_How to implement this formula on "mini_ecdsa"?_

qubd commented 2 years ago

A quick Google search yields some nice explanations and pseudocode for Pollard's lambda algorithm. Why not fork this repository and give writing the code a shot? It's very similar to the rho algorithm.