Skip to content
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

Optimize unfactor scripts in case of repeating factors #6

Open
Googulator opened this issue Dec 26, 2015 · 0 comments
Open

Optimize unfactor scripts in case of repeating factors #6

Googulator opened this issue Dec 26, 2015 · 0 comments

Comments

@Googulator
Copy link
Owner

For non-squarefree keys (ones with the same factor multiple times), the unfactor scripts waste resources by trying the same key multiple times.

E.g. having "2 2 2" on the command line, there are only 4 possible combinations (1, 2, 4, 8), but unfactor.py will treat each factor as different, and will try (1, 2, 2, 2, 4, 4, 4, 8) as possible keys, and it only gets worse with more repetitions.

Unfactor-ecdsa.py already has some optimization (it will do the EC math only once for each real key candidate), but things can still slow down significantly if the key is e.g. a power of 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant