From c4a2dee42d39285a60813446dbb408f34f997114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mamy=20Andr=C3=A9-Ratsimbazafy?= Date: Sun, 7 Feb 2021 14:10:06 +0100 Subject: [PATCH] Fix to test Fp12 towering: Fp4 vs Fp6 --- constantine/tower_field_extensions/tower_instantiation.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/constantine/tower_field_extensions/tower_instantiation.nim b/constantine/tower_field_extensions/tower_instantiation.nim index edcf9c6..cdcbc1a 100644 --- a/constantine/tower_field_extensions/tower_instantiation.nim +++ b/constantine/tower_field_extensions/tower_instantiation.nim @@ -233,7 +233,7 @@ func prod*(r: var Fp6, a: Fp6, _: type NonResidue) {.inline.} = let t = a.c2 r.c1 = a.c0 r.c2 = a.c1 - t.c0.prod(t, NonResidue) + r.c0.prod(t, NonResidue) func `*=`*(a: var Fp6, _: type NonResidue) {.inline.} = ## Multiply an element of 𝔽p4 by the non-residue @@ -255,6 +255,7 @@ func `*=`*(a: var Fp6, _: type NonResidue) {.inline.} = type Fp12*[C: static Curve] = CubicExt[Fp4[C]] + # QuadraticExt[Fp6[C]] # Sparse functions # ----------------------------------------------------------------