-
Notifications
You must be signed in to change notification settings - Fork 179
Pohlig Hellman Attack Example #995
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #995 +/- ##
=======================================
Coverage 72.05% 72.05%
=======================================
Files 160 160
Lines 35122 35122
=======================================
Hits 25306 25306
Misses 9816 9816 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| let x = chinese_remainder_theorem(&equations)?; | ||
| Ok(x as u128) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| let x = chinese_remainder_theorem(&equations)?; | |
| Ok(x as u128) | |
| chinese_remainder_theorem(&equations).and_then(|x| x as u128) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, we changed it here.
Pohlig Hellman Attack Example
Description
This PR adds an implementation that demonstrates the Pohlig-Hellman algorithm for solving the discrete logarithm problem on subgroups of elliptic curves.
In this example we chose to work with a subgroup of the BLS12-381 Elliptic Curve of order
$$s = 96192362849 = 11 \cdot 10177 \cdot 859267.$$
This attack is significantly more efficient than attempting to solve the discrete logarithm problem using brute-force search. Using the Pohlig-Hellman attack, the logarithm can be recovered in under one second, whereas a brute-force approach could take several days.
This highlights the importance of avoiding groups with small primes order factorization in cryptographic applications.