summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2020-10-29 20:32:02 +0100
committerNiels Möller <nisse@lysator.liu.se>2020-10-29 20:32:02 +0100
commitc17a6a09e82df9640f596ff40ab13e4107c8e889 (patch)
tree000c07955913311cf5fec365c408d2596112a0ff /testsuite
parent4c8b0cdd97ffec3ae3f8d995afdfccbc261b3c79 (diff)
downloadnettle-c17a6a09e82df9640f596ff40ab13e4107c8e889.tar.gz
Simplify ecc_mod, and prepare for separate result argument.
* ecc-mod.c (ecc_mod): More unified handling of final carry folding. Also eliminates a goto statement. * testsuite/ecc-mod-test.c (test_fixed): Add another test case
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/ecc-mod-test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/testsuite/ecc-mod-test.c b/testsuite/ecc-mod-test.c
index 41933b6f..d8c0e068 100644
--- a/testsuite/ecc-mod-test.c
+++ b/testsuite/ecc-mod-test.c
@@ -123,6 +123,10 @@ test_fixed (void)
test_one ("p", &_nettle_secp_384r1.p, r);
test_one ("q", &_nettle_secp_384r1.q, r);
+ /* Triggered a carry bug in development version. */
+ mpz_set_str (r, "fffffffffffffffffffffffe00000fffffffffffffffffffffffffffe00000000000000000000000000000000000fffffffc000000000000000007ffffffffff", 16);
+ test_one ("p", &_nettle_secp_224r1.p, r);
+
mpz_clear (r);
}