diff options
author | Jack Lloyd <[email protected]> | 2018-02-23 12:48:59 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-02-23 12:48:59 -0500 |
commit | 517b0241f878b0603ffc02eb5829f0aa7403f38d (patch) | |
tree | 5d68876245c8257fd11f3b1867facd549bc153f8 /src/tests | |
parent | e679629ef38aa608fffc22b91d3a1d9de308a8c9 (diff) |
Add DL_Group::estimated_strength
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/test_dl_group.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tests/test_dl_group.cpp b/src/tests/test_dl_group.cpp index 36ae02531..c513bcd55 100644 --- a/src/tests/test_dl_group.cpp +++ b/src/tests/test_dl_group.cpp @@ -195,6 +195,11 @@ class DL_Group_Tests final : public Test result.test_ne("DL_Group p is set", group.get_p(), 0); result.test_ne("DL_Group g is set", group.get_g(), 0); + const size_t strength = group.estimated_strength(); + + // 8192 bit ~~ 2**202 strength + result.confirm("Plausible strength", strength >= 80 && strength < 210); + if(name.find("modp/srp/") == std::string::npos) { result.test_ne("DL_Group q is set", group.get_q(), 0); |