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
Bug in LogFFE for "large" finite fields #3784
Comments
Actually, I get the following:
|
@Stefan-Kohl and the first failing prime is 281, and 281^2 > 2^16, so this affects only "large" prime fields, as described in the title. I already fixed part of the bug locally (a bad recursion), but there's more wrong there. |
@fingolfin I get the first 'fail' for 277. -- Though still 277^2 > 2^16, so that probably doesn't make much difference. |
Yeah, my number was with my partial fix. BTW, there are even failures when both arguments are equal! |
A lot of the code for large FFE support was written by @stevelinton ; perhaps he can take a look at this bug and has an idea how to resolve it? |
I did not see an easy way to fix the library code. |
@frankluebeck you mentioned some time ago that you'd be willing to migrate your new LogFFE implementation to the GAP library. That would be really nice. |
As far as I see, there are several bugs in the GAP library code used by Since an alternative (and even faster) implementation is available in the StandardFF package, I propose to remove the code of I am not sure that @frankluebeck had proposed to move his code to the GAP library. Another interpretation of his statement would be that everything is fine as soon as the StandardFF package is loaded. Thus one solution would be to turn StandardFF into a needed package of GAP and then to remove the three functions from the record If we do not want to introduce another needed package of GAP then I propose to copy the relevant code from the StandardFF package (the functions |
On 29 Aug 2023, at 10:22, Thomas Breuer ***@***.***> wrote:
As far as I see, there are several bugs in the GAP library code used by LogFFE.
I think one of them is that the calls of FFECONWAY.LogFFERhoIterate ignore the possibility that "Pollard's rho algorithm for logarithms" can fail in the sense that bd - b is zero; this does not explain all of the abovementioned wrong results. Like @frankluebeck<https://github.com/frankluebeck>, I see no easy way to fix this code.
Since an alternative (and even faster) implementation is available in the StandardFF package, I propose to remove the code of FFECONWAY.LogFFERhoIterate, FFECONWAY.DoLogFFERho, FFECONWAY.DoLogFFE.
These functions are not documented, and inside the GAP library they are used only in methods for LogFFE.
The question is how to keep the functionality of LogFFE (or rather to get functionality that is better).
I am not sure that @frankluebeck<https://github.com/frankluebeck> had proposed to move his code to the GAP library. Another interpretation of his statement would be that everything is fine as soon as the StandardFF package is loaded. Thus one solution would be to turn StandardFF into a needed package of GAP and then to remove the three functions from the record FFECONWAY.
If we do not want to introduce another needed package of GAP then I propose to copy the relevant code from the StandardFF package (the functions DLogShanks and DLog, and the code for the LogFFE method) to the GAP library; but first I would like to ask what @frankluebeck<https://github.com/frankluebeck> thinks about this solution.
Happy with any of these approaches
Steve
—
Reply to this email directly, view it on GitHub<#3784 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABQQIRR3EDF7N67O4KUHHOLXXWYE7ANCNFSM4J3Y5HBQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
[ { ***@***.***": "http://schema.org", ***@***.***": "EmailMessage", "potentialAction": { ***@***.***": "ViewAction", "target": "#3784 (comment)", "url": "#3784 (comment)", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { ***@***.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
|
The discussion I had with @frankluebeck explicitly was about copying the code to the GAP library, not adding StandardFF as another dependency. Note that there is lots of code out there using I am opposed to adding another package to the list of needed packages (to the contrary the goal always was to reduce this list). Especially not for this feature -- implementing Shank or some other discrete logarithm is not that hard, so I'd rather rewrite it yet again from scratch if Frank doesn't want us to copy his code. |
Thanks for the feedback. I will create a pull request for the situation that the code from StandardFF gets added to the GAP library. |
Sorry, I'm in holidays know. But I will shortly confirm that I proposed and agreed to move the discussed code from StandardFF into the GAP library (instead of trying to repair the buggy code). |
Finally fixed, yay!!! |
The following was reported by Joey Iverson on the GAP Forum:
The expected result is 2, not
fail
.The text was updated successfully, but these errors were encountered: