-
Notifications
You must be signed in to change notification settings - Fork 891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
partial_d: sage solve_mod efficiency #406
Comments
Hi, |
Hello (sorry i forgot that part, i was too focused on the content of my message) I could send a PR but i didn't how i should proceed. Do we just copy paste the code i linked ? |
No, you need to fork the repo git clone it, do a commit with your changes, test that it doesn't break anything, git push, and at last send a PR. |
Hum, yes, sorry maybe my message wasn't clear enough. I know how to do a PR. The code I used is from another repo, and as it isn't a library, I thought best i could do was copy and paste it into the project to use it. Now that i had time to understand what it does, i think i'll be able to refine it. |
Please avoid verbatim copying of someone else's code, try to implement by yourself the Hensel's lifting lemma. |
RsaCtfTool/sage/partial_d.sage
Line 28 in c43d654
The sage
solve_mod
function seem sub-optimal for this use case.I compared it with this python implementation of Hensel Lemma: https://github.com/gmossessian/Hensel/blob/de6ddc91718e28950dd8cff9f4a2a4eab5cda383/Hensel.py with the following code :
I obtained the following results :
I've no idea about the complexity of those two algorithms, however, for numbers with practical sizes, there is a 1000x speed factor.
The text was updated successfully, but these errors were encountered: