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

Some questions about small subgroup attack。 #137

Open
qxzhou1010 opened this issue Apr 27, 2022 · 2 comments
Open

Some questions about small subgroup attack。 #137

qxzhou1010 opened this issue Apr 27, 2022 · 2 comments

Comments

@qxzhou1010
Copy link

Hi, I am reading your article : Hacking private keys from unsafe primes using the Pohlig-Hellman discrete logarithm. I found that the final solution for 6^a = 2 % p does not seem to use the small subgroup. Just like 100000008359680 = 2^8 5 11^2 13 19 31 37 43 53. Instead, solve the DLP problem directly in the large group p = 100000008359681. I am confused about this, please help me understand, thanks

@mvaneerde
Copy link
Owner

mvaneerde commented Apr 27, 2022

That's correct! If p is unsafe, then ALL keys k are vulnerable to quick recovery using Pohlig-Hellman, even if the order of the generator g is large

@qxzhou1010
Copy link
Author

Thank you for your quickly reply. I have a few other questions I want to ask.

  1. I'm trying to implement a small subgroup attack, and I've been stuck in this for a few days. So, can you tell me how to implement a small subgroup attack with the small group defined by small prime factor?
  2. In your article : Hacking private keys from unsafe primes using the Pohlig-Hellman discrete logarithm. I can not understan this step:
> .\find-generator.ps1 -p 100000008359681
2^((100000008359681 - 1)/2) mod 100000008359681 = 1, rejecting 2
3^((100000008359681 - 1)/5) mod 100000008359681 = 1, rejecting 3
4^((100000008359681 - 1)/2) mod 100000008359681 = 1, rejecting 4
5^((100000008359681 - 1)/2) mod 100000008359681 = 1, rejecting 5
6 passes all checks
> $g = [bigint]::Parse("6")
> $g
6

why 3^((100000008359681 - 1)/5) the divisor is 5 and other case the divisor is 2? And there are general method to find the generator?

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

2 participants