Commit c36a8dee authored by Niels Möller's avatar Niels Möller
Browse files

Fixed 32-bit ecc_192_modp.

parent a3888205
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* ecc-192.c: Check HAVE_NATIVE_ecc_192_modp, and use native * ecc-192.c: Check HAVE_NATIVE_ecc_192_modp, and use native
version if available. version if available.
(ecc_192_modp): Fixed carry handling bug in 32-bit version.
* x86_64/ecc-192-modp.asm: New file. * x86_64/ecc-192-modp.asm: New file.
......
...@@ -66,7 +66,7 @@ ecc_192_modp (const struct ecc_curve *ecc UNUSED, mp_limb_t *rp) ...@@ -66,7 +66,7 @@ ecc_192_modp (const struct ecc_curve *ecc UNUSED, mp_limb_t *rp)
cy = sec_add_1 (rp + 5, rp + 5, 1, cy); cy = sec_add_1 (rp + 5, rp + 5, 1, cy);
assert (cy <= 1); assert (cy <= 1);
cy = cnd_add_n (cy, rp, ecc_Bmodp, 3); cy = cnd_add_n (cy, rp, ecc_Bmodp, 6);
assert (cy == 0); assert (cy == 0);
} }
#elif GMP_NUMB_BITS == 64 #elif GMP_NUMB_BITS == 64
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment