diff options
author | Jack Lloyd <[email protected]> | 2018-04-11 09:31:47 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-04-11 09:31:47 -0400 |
commit | 95f1a86b78bf27df37a94a129cec557b8daf08c5 (patch) | |
tree | 0498ceff23ac75a1cdeff9d5666524ee8a1e93cc /src/tests/unit_ecc.cpp | |
parent | 5f2ac554842c97ac15b46c94ee840c3129682c71 (diff) |
Add EC_Group::a_is_zero
Diffstat (limited to 'src/tests/unit_ecc.cpp')
-rw-r--r-- | src/tests/unit_ecc.cpp | 5 |
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(); |