aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/if_algo/if_algo.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2015-11-29 13:03:06 -0500
committerJack Lloyd <[email protected]>2015-11-29 13:03:06 -0500
commite3db054e582c676e6f2752e216fa03fa408b3dff (patch)
tree265d44e7dd142eec065e5c7065bd9faaa8bdaee5 /src/lib/pubkey/if_algo/if_algo.cpp
parentebf2164a972517ee405428d9d0641fe296aba745 (diff)
Add more workfactor estimate helpers.
Specifically a named one for integer factorization (despite using same formula as DL calc) which incorporates the k value from RFC 3766. Also adds dl_exponent_size which returns the exponent size, this one ignores k thus using a ~10 bit larger exponent than strictly necessary. Adding in k downgrades 1024 bit RSA to exactly 80 bits, which is probably about right.
Diffstat (limited to 'src/lib/pubkey/if_algo/if_algo.cpp')
-rw-r--r--src/lib/pubkey/if_algo/if_algo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/pubkey/if_algo/if_algo.cpp b/src/lib/pubkey/if_algo/if_algo.cpp
index d8430b40c..9c49b8dd4 100644
--- a/src/lib/pubkey/if_algo/if_algo.cpp
+++ b/src/lib/pubkey/if_algo/if_algo.cpp
@@ -15,7 +15,7 @@ namespace Botan {
size_t IF_Scheme_PublicKey::estimated_strength() const
{
- return dl_work_factor(n.bits());
+ return if_work_factor(n.bits());
}
AlgorithmIdentifier IF_Scheme_PublicKey::algorithm_identifier() const