aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/model/c/src/ModExpTestBench.c4
-rw-r--r--src/model/c/src/simple_tests.c20
2 files changed, 20 insertions, 4 deletions
diff --git a/src/model/c/src/ModExpTestBench.c b/src/model/c/src/ModExpTestBench.c
index 9254992..1c54517 100644
--- a/src/model/c/src/ModExpTestBench.c
+++ b/src/model/c/src/ModExpTestBench.c
@@ -7,8 +7,8 @@
int main(void) {
simple_tests();
- autogenerated_tests();
- montgomery_array_tests(0);
+ // autogenerated_tests();
+ // montgomery_array_tests(0);
print_assert_array_stats();
diff --git a/src/model/c/src/simple_tests.c b/src/model/c/src/simple_tests.c
index 8c1ca44..5b8def9 100644
--- a/src/model/c/src/simple_tests.c
+++ b/src/model/c/src/simple_tests.c
@@ -230,14 +230,30 @@ void rob_enc_1024(void)
}
+void montprod_test1(void)
+{
+ uint32_t a_array[2] = {0xffeeffee, 0x12345678};
+ uint32_t b_array[2] = {0xffeeffee, 0xaabbaabb};
+ uint32_t m_array[2] = {0xffeeffee, 0xdeadbeef};
+ uint32_t s_array[2];
+
+ printf("=== pure montgomery test case to get some data to drive optimization ===\n");
+
+ mont_prod_array(2, a_array, b_array, m_array, s_array);
+
+ printf("s_array: 0x%08x 0x%08x\n", s_array[0], s_array[1]);
+}
+
+
void simple_tests(void) {
// simple_3_7_11();
// simple_251_251_257();
// bigger_test();
// small_e_256_mod();
// small_e_64_mod();
- rob_enc_1024();
- rob_dec_1024();
+ montprod_test1();
+ // rob_enc_1024();
+ // rob_dec_1024();
// small_e_256_mod2();
}