From 99e192422d95240adbe806a53caabfa9ddb258c3 Mon Sep 17 00:00:00 2001 From: J08nY Date: Fri, 29 Sep 2017 16:50:13 +0200 Subject: Added custom CM generation skeleton. --- test/src/cm/test_custom.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 test/src/cm/test_custom.c (limited to 'test') diff --git a/test/src/cm/test_custom.c b/test/src/cm/test_custom.c new file mode 100644 index 0000000..3309de7 --- /dev/null +++ b/test/src/cm/test_custom.c @@ -0,0 +1,42 @@ +/* + * ecgen, tool for generating Elliptic curve domain parameters + * Copyright (C) 2017 J08nY + */ + +#include +#include "misc/config.h" +#include "util/random.h" +#include "test/default.h" +#include "test/input.h" +#include "cm/custom.h" + +void custom_setup() { + default_setup(); + input_setup(); + random_init(); +} + +void custom_teardown() { + input_teardown(); +} + +TestSuite(custom, .init = custom_setup, .fini = custom_teardown); + +Test(custom, test_curve_one) { + cr_skip("Doesnt work yet."); + cfg->bits = 128; + cfg->cm_order = "263473633827487324648193013259296339349"; + cfg->random = false; + + fprintf(write_in, "191345683451069598953886857691544477637\n"); + custom_curve(); +} + +Test(custom, test_curve_other) { + cr_skip("Doesnt work yet."); + cfg->bits = 128; + cfg->cm_order = "263473633827487324648193013259296339349"; + cfg->random = true; + + custom_curve(); +} \ No newline at end of file -- cgit v1.2.3-70-g09d2