-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
Regarding Equation 5.44, Example 92 and Exercise 82 #84
Comments
Consider the following Sage code: def exercise82(max_k: int = 7):
# curve parameters for TJJ_13
p = 13
a, b = 8, 8
F13 = GF(p) # field
F13t.<t> = F13[] # polynomial ring # type: ignore
r = 2 # prime factor
def pairings(E, E_tor):
# frobenius
def fro_pi(P):
if P != E(0):
(x, y) = P.xy()
return E(x^p, y^p)
else:
return P
G1 = [P for P in E_tor if fro_pi(P) == P]
print("G1:", G1)
# {(4 : 0 : 1), (0 : 1 : 0)}
G2 = [P for P in E_tor if fro_pi(P) == p*P]
print("G2:", G2)
# try for some values of k
for k in range(1, max_k):
# curve
if k == 1:
# over base field
TJJ = EllipticCurve(F13, [a, b])
else:
# over extension field
F13_K = GF(p^k, name='t', modulus=F13t.irreducible_element(k)) # type: ignore
TJJ = EllipticCurve(F13_K, [a, b])
# r-torsion group over base curve
TJJ_tor = TJJ(0).division_points(r)
print("{}-torsion over p^{} ({} elements)\n{}".format(r, k, len(TJJ_tor), TJJ_tor))
pairings(TJJ, TJJ_tor)
print("") Running this for 2-torsion over p^1 (2 elements)
[(0 : 1 : 0), (4 : 0 : 1)]
G1: [(0 : 1 : 0), (4 : 0 : 1)]
G2: [(0 : 1 : 0), (4 : 0 : 1)]
2-torsion over p^2 (4 elements)
[(0 : 1 : 0), (4 : 0 : 1), (2*t + 10 : 0 : 1), (11*t + 12 : 0 : 1)]
G1: [(0 : 1 : 0), (4 : 0 : 1)]
G2: [(0 : 1 : 0), (4 : 0 : 1)]
2-torsion over p^3 (2 elements)
[(0 : 1 : 0), (4 : 0 : 1)]
G1: [(0 : 1 : 0), (4 : 0 : 1)]
G2: [(0 : 1 : 0), (4 : 0 : 1)]
2-torsion over p^4 (4 elements)
[(0 : 1 : 0), (4 : 0 : 1), (2*t^3 + 7*t^2 + 5*t + 7 : 0 : 1), (11*t^3 + 6*t^2 + 8*t + 2 : 0 : 1)]
G1: [(0 : 1 : 0), (4 : 0 : 1)]
G2: [(0 : 1 : 0), (4 : 0 : 1)]
2-torsion over p^5 (2 elements)
[(0 : 1 : 0), (4 : 0 : 1)]
G1: [(0 : 1 : 0), (4 : 0 : 1)]
G2: [(0 : 1 : 0), (4 : 0 : 1)]
2-torsion over p^6 (4 elements)
[(0 : 1 : 0), (4 : 0 : 1), (7*t^5 + 8*t^4 + 12*t^3 + 2*t + 1 : 0 : 1), (6*t^5 + 5*t^4 + t^3 + 11*t + 8 : 0 : 1)]
G1: [(0 : 1 : 0), (4 : 0 : 1)]
G2: [(0 : 1 : 0), (4 : 0 : 1)]
2-torsion over p^7 (2 elements)
[(0 : 1 : 0), (4 : 0 : 1)]
G1: [(0 : 1 : 0), (4 : 0 : 1)]
G2: [(0 : 1 : 0), (4 : 0 : 1)]
2-torsion over p^8 (4 elements)
[(0 : 1 : 0), (4 : 0 : 1), (3*t^7 + 2*t^6 + t^5 + 9*t^4 + t^3 + 9*t^2 + 4*t + 2 : 0 : 1), (10*t^7 + 11*t^6 + 12*t^5 + 4*t^4 + 12*t^3 + 4*t^2 + 9*t + 7 : 0 : 1)]
G1: [(0 : 1 : 0), (4 : 0 : 1)]
G2: [(0 : 1 : 0), (4 : 0 : 1)]
2-torsion over p^9 (2 elements)
[(0 : 1 : 0), (4 : 0 : 1)]
G1: [(0 : 1 : 0), (4 : 0 : 1)]
G2: [(0 : 1 : 0), (4 : 0 : 1)]
2-torsion over p^10 (4 elements)
[(0 : 1 : 0), (4 : 0 : 1), (6*t^8 + t^6 + 11*t^5 + 7*t^4 + 2*t^3 + 5*t^2 + 7*t + 4 : 0 : 1), (7*t^8 + 12*t^6 + 2*t^5 + 6*t^4 + 11*t^3 + 8*t^2 + 6*t + 5 : 0 : 1)]
G1: [(0 : 1 : 0), (4 : 0 : 1)]
G2: [(0 : 1 : 0), (4 : 0 : 1)]
2-torsion over p^11 (2 elements)
[(0 : 1 : 0), (4 : 0 : 1)]
G1: [(0 : 1 : 0), (4 : 0 : 1)]
G2: [(0 : 1 : 0), (4 : 0 : 1)]
2-torsion over p^12 (4 elements)
[(0 : 1 : 0), (4 : 0 : 1), (11*t^10 + t^9 + 2*t^8 + 11*t^7 + t^5 + 4*t^4 + 3*t^3 + 2*t^2 + 6*t + 3 : 0 : 1), (2*t^10 + 12*t^9 + 11*t^8 + 2*t^7 + 12*t^5 + 9*t^4 + 10*t^3 + 11*t^2 + 7*t + 6 : 0 : 1)]
G1: [(0 : 1 : 0), (4 : 0 : 1)]
G2: [(0 : 1 : 0), (4 : 0 : 1)] Although the resulting pairing groups are equal for all cases, the 2-torsion groups are not, as described in the issue. |
Hmm. I have no idea. My initial intuition would be that maybe You said: " can you elaborate on this or send a link to the discussion? I would also like to understand the reason in detail. |
@PlanetMacro Some part of the discussions were done in private and some in the CryptoHack discord. First of all, note that (5.44) and Example 92 remains wrong independent of this discussion (i.e. there aren't any cases which can make it true, independent of r). The case of an embedding degree with respect to 2 is a bit problematic. There are two possible cases:
|
Firstly, I believe that in Example 92, it is illustrative to look at the size of the r-torsion group of the curve E over the extension field when k = 3 compared to the r-torsion group of the curve E over the extension field when k is 4 and this is valid value of k. The value of k does not have to divide k(r), 1 <= k it is only required that r is a divisor of the group of points on E. In the Sage program, I would expect that the size of the subgroups to stay at 4 and, like you are surprised by this. In the creation of the extension field F13_K, are we positive that we are creating a subgroup chain so that the new extension field contains the previous extension field? Thank you for your patient consideration. |
IMHO, I believe that the chain of r-torsion subgroups (since E is cyclic) displayed in 5.44 is correct (if replace strict subset symbol with \subseteq allowing for equality) since the successive sets are subsets of the successive extension fields as k increases from 1. Since we are dealing with a cyclic group E, I believe the r-torsion set is also a subgroup. The construction of one extension field from the previous in the Sage code needs a little tweek so that the new F13_K generated in each iteration contains the previous extension field. As is, I believe we are just looking at representatives of each extension field for a given k. Thank you for your consideration of this comment. |
@KelleClark I don't understand how 5.44 can be true even with the subseteq notation. F_p^(k+i) is not an extension of F_p^k for any i in which k does not divide k+i. I don't think it can be made true unless it's written in F_p^(k*i) form. |
@bufferhe4d |
looking forward to learning your opinion. |
We (together with @bufferhe4d & @skaunov) have reason to believe that eqn 5.44 is wrong (or missing details), and the following logic within example 92 is also fallacious. Furthermore, the problem with 5.44 becomes an issue for exercise 82.
About the Exercise
The discussion began during exercise 82. If you find the full 2-torsion group for TinyJubJub (TJJ), you end up with 2 elements. The book tells us that we should have 2^2 elements instead.
Furthermore, 5.44 tells us that$\forall n > k(r)$ we should have:
In this case, since$k(2) = 1$ we should expect the torsion groups for all extended curves to be equal. However, for this exercise we seem to have a different outcome, where the number of elements in the torsion group alternate between 2 and 4, instead of being equal for all $n$ . I will add a snippet in the comment for this below.
About the Example
The problem with example 92 is that after the torsion group is computed for$k=4$ (the embedding degree), the torsion group for $k=3$ is computed to show evidence that indeed torsion group for $k=4$ is the full-torsion group. However, we think this should only be the case if the checked $k'$ is a factor of $k$ , which would be if $k=2$ for instance. Since 3 is not a factor of 4, the example does not make sense on this part.
How this can be a problem is also shown in the exercise above, where equality does not hold for all extended curves.
About the Equation
With all that said, could there be a certain set of conditions that make 5.44 true, that do not hold for exercise 82? In particular, the scenario when embedding degree is 1 feels like the problem.
Thanks to @bufferhe4d and his discussion with several people, we have learned that when$k(r)=1$ , it is not necessary to have $r^2$ elements in the full $r$ -torsion group.
The text was updated successfully, but these errors were encountered: