]> git.codecow.com Git - nano25519.git/commitdiff
Update variable name.
authorChris Duncan <chris@codecow.com>
Fri, 30 Oct 2026 19:56:16 +0000 (12:56 -0700)
committerChris Duncan <chris@codecow.com>
Fri, 30 Oct 2026 19:56:16 +0000 (12:56 -0700)
src/assembly/ed25519/ge.ts

index a4b86f88bbd8b5e0205b22b935fd7d59b8f930f3..02edb8e368ef1b63ef0555089ace85af9406c74b 100644 (file)
@@ -148,7 +148,7 @@ export function ge_frombytes_negate_vartime (h: p3, s: StaticArray<u8>,
 
 const ge_frombytes_u: FieldElement = fe()
 const ge_frombytes_v: FieldElement = fe()
-const ge_frombytes_vxx: FieldElement = fe()
+const ge_frombytes_vx2: FieldElement = fe()
 const ge_frombytes_m_root_check: FieldElement = fe()
 const ge_frombytes_p_root_check: FieldElement = fe()
 const ge_frombytes_negx: FieldElement = fe()
@@ -163,7 +163,7 @@ export function ge_frombytes (h: p3, s: StaticArray<u8>,
 ): i32 {
        const u = ge_frombytes_u
        const v = ge_frombytes_v
-       const vxx = ge_frombytes_vxx
+       const vx2 = ge_frombytes_vx2
        const m_root_check = ge_frombytes_m_root_check
        const p_root_check = ge_frombytes_p_root_check
        const negx = ge_frombytes_negx
@@ -187,15 +187,15 @@ export function ge_frombytes (h: p3, s: StaticArray<u8>,
        fe_pow22523(h.X, h.X, t_fe_0, t_fe_1, t_fe_2)
        fe_mul(h.X, u, h.X)
 
-       // vxx = vx²
-       fe_sq(vxx, h.X)
+       // vx2 = vx²
+       fe_sq(vx2, h.X)
 
-       // vxx = vx³, x_sqrtm1 = x√-1
-       fe_mul_pair_sqrtm1(vxx, vxx, v, x_sqrtm1, h.X)
+       // vx2 = vx³, x_sqrtm1 = x√-1
+       fe_mul_pair_sqrtm1(vx2, vx2, v, x_sqrtm1, h.X)
 
        // p = vx²+u
        // m = vx²-u
-       fe_addsub(p_root_check, m_root_check, vxx, u)
+       fe_addsub(p_root_check, m_root_check, vx2, u)
        has_p_root = fe_iszero(p_root_check, t_fe_0, t_u8x32)
        has_m_root = fe_iszero(m_root_check, t_fe_0, t_u8x32)