-
Notifications
You must be signed in to change notification settings - Fork 24
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
ElGamal public key encryption can loop forever for too larges values of 'p' #30
Comments
Hi, thank you for the report and the patch! Would you be so kind to provide a short test to accompany them (say, under |
Yes, certainly! Will do |
I just need to find the offending GPG key that triggered this and create a test case |
we're running into this again in production as we moved to a newer version of Crypt::OpenPGP. Can you please accept the pull request and get the fixed version up to CPAN? I'm asking one of the people with an offending key if they'd like have their pubkey pushed as a test example. |
Here's code that will trigger the bug. |
I have just encountered this problem with version 1.12 from CPAN. I applied the fix locally & it works fine. Can we push the fix to CPAN so that other people don't run into the same problem? |
@gozer Issue can be closed as 1.15 has been released with the fix. I don't have admin here so I cannot close this issue |
if $p is very large (and it's not a Math::BigInt), $p-1 can overflow and return "inf", causing the loop below to just loop forever looking for relative primeness against infinity.
The text was updated successfully, but these errors were encountered: