From 29ac4d8491b326ffaeb8e43d152a2d09049b9af3 Mon Sep 17 00:00:00 2001 From: Justsomebuddy Date: Wed, 14 Jan 2026 11:26:00 +0000 Subject: [PATCH] sage: verify Eisenstein integer connection for GLV constants Add assertions to verify that the GLV decomposition constants arise from the Eisenstein integer factorization of the group order N. The group order factors as N = pi * conj(pi) in Z[w], where pi = A - B*w is an Eisenstein prime. The GLV eigenvalue LAMBDA = B/A mod N, which is the image of w^2 under the isomorphism Z[w]/(pi) -> Z/NZ. --- sage/gen_split_lambda_constants.sage | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sage/gen_split_lambda_constants.sage b/sage/gen_split_lambda_constants.sage index 7d4359e0..7a5761ac 100644 --- a/sage/gen_split_lambda_constants.sage +++ b/sage/gen_split_lambda_constants.sage @@ -81,6 +81,15 @@ assert (A1 + A2)/2 < sqrt(N) assert B1 < sqrt(N) assert B2 < sqrt(N) +# Verify connection to Eisenstein integers Z[w] where w = (-1 + sqrt(-3))/2. +# The group order N factors as N = pi * conj(pi) in Z[w], where pi = A - B*w +# is an Eisenstein prime with norm A^2 + A*B + B^2. The GLV endomorphism +# eigenvalue LAMBDA equals B/A mod N, which is the image of w^2 under the +# isomorphism Z[w]/(pi) -> Z/NZ (since w -> A/B and (A/B)^2 = B/A in Z/NZ). +A_EIS, B_EIS = -B1, A1 +assert A_EIS**2 + A_EIS*B_EIS + B_EIS**2 == N +assert Z(B_EIS / A_EIS) == LAMBDA + G1 = round((2**384)*B2/N) G2 = round((2**384)*(-B1)/N)