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
Add discrete logarithm for anomalous elliptic curves #34253
Comments
Commit: |
Changed branch from u/sylvainpelissier/padic_elliptic_logarithm to u/gh-sylvainpelissier/padic_elliptic_logarithm |
Reviewer: Lorenz Panny |
comment:2
Thanks for writing this code, it looks very nice! A few comments:
+ if E.order() == E.base().order(): can be very expensive if the order of the curve hasn't been computed yet. (Not a very common scenario, but possible by using n == E.base_field().cardinality() or something like that.
+ For anomalous curves with `#E = p`, the `padic_elliptic_logarithm` you can use the syntax
to turn the
- EXAMPLES::
+ EXAMPLES:
sage: F = GF((3,6),'a') is incorrect; the documentation format requires a double colon before an indented block. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:4
Thank you for your remarks they are helpful. I corrected everything expect the one related to |
comment:5
Looks good. One last thing: Much of the new code is a slightly modified version of https://crypto.stackexchange.com/a/70508, so we must give proper attribution in the docstring (e.g., in the |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:7
Yes you are right. This should be fine now. |
comment:8
Here's an example for which this branch fails to compute sage: R.<x> = ZZ[]
sage: F.<i> = GF(787^2, modulus=x^2+1)
sage: E = EllipticCurve([268*i + 507, 42*i + 772]) You could either add an (By the way, you should set the ticket to "needs review" once it's ready from your perspective. I looked at this anyway because I didn't notice it was still "new", but in general you will only attract reviewers by setting the correct status.) |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:10
I've added the primality test. I have to figure out how to handle the non prime field case. Do you want me to open another ticket for that ? |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:13
I think this is incorrect for non-anomalous curves over prime fields: In that case, the first Given that the prime case is already working and useful on its own, I think the non-prime case should go into a new ticket. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:15
Good catch thank you. It is corrected. |
comment:16
Thanks! |
Changed branch from u/gh-sylvainpelissier/padic_elliptic_logarithm to |
A fast method to solve the discrete logarithm in anomalous elliptic curves uses the p-adic logarithm as described in: https://link.springer.com/article/10.1007/s001459900052. I implemented the algorithm based on https://crypto.stackexchange.com/questions/70454/why-smarts-attack-doesnt-work-on-this-ecdlp/70508#70508 for
EllipticCurvePoint_finite_field
Component: number theory
Keywords: p-adic discrete logarithm
Author: Sylvain Pelissier
Branch/Commit:
86ad465
Reviewer: Lorenz Panny
Issue created by migration from https://trac.sagemath.org/ticket/34253
The text was updated successfully, but these errors were encountered: