aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-04-11 09:31:47 -0400
committerJack Lloyd <[email protected]>2018-04-11 09:31:47 -0400
commit95f1a86b78bf27df37a94a129cec557b8daf08c5 (patch)
tree0498ceff23ac75a1cdeff9d5666524ee8a1e93cc /src/tests
parent5f2ac554842c97ac15b46c94ee840c3129682c71 (diff)
Add EC_Group::a_is_zero
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/unit_ecc.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tests/unit_ecc.cpp b/src/tests/unit_ecc.cpp
index 6ec9be3e8..c980d4a24 100644
--- a/src/tests/unit_ecc.cpp
+++ b/src/tests/unit_ecc.cpp
@@ -298,6 +298,11 @@ class EC_Group_Tests : public Test
else
result.test_ne("Group " + group_name + " A does not equal -3", group.get_a(), group.get_p() - 3);
+ if(group.a_is_zero())
+ result.test_eq("Group A is zero", group.get_a(), BigInt(0));
+ else
+ result.test_ne("Group " + group_name + " A does not equal zero", group.get_a(), BigInt(0));
+
// get a valid point
Botan::PointGFp p = group.get_base_point() * Test::rng().next_nonzero_byte();