Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

workfactor.h
Go to the documentation of this file.
1 /*
2 * Public Key Work Factor Functions
3 * (C) 1999-2007 Jack Lloyd
4 *
5 * Botan is released under the Simplified BSD License (see license.txt)
6 */
7
8 #ifndef BOTAN_WORKFACTOR_H__
9 #define BOTAN_WORKFACTOR_H__
10
11 #include <botan/types.h>
12
13 namespace Botan {
14
15 /**
16 * Estimate work factor for discrete logarithm
17 * @param prime_group_size size of the group in bits
18 * @return estimated security level for this group
19 */
20 BOTAN_DLL size_t dl_work_factor(size_t prime_group_size);
21
22 /**
23 * Return the appropriate exponent size to use for a particular prime
24 * group. This is twice the size of the estimated cost of breaking the
25 * key using an index calculus attack; the assumption is that if an
26 * arbitrary discrete log on a group of size bits would take about 2^n
27 * effort, and thus using an exponent of size 2^(2*n) implies that all
28 * available attacks are about as easy (as e.g Pollard's kangaroo
29 * algorithm can compute the DL in sqrt(x) operations) while minimizing
30 * the exponent size for performance reasons.
31 */
32 BOTAN_DLL size_t dl_exponent_size(size_t prime_group_size);
33
34 /**
35 * Estimate work factor for integer factorization
36 * @param n_bits size of modulus in bits
37 * @return estimated security level for this modulus
38 */
39 BOTAN_DLL size_t if_work_factor(size_t n_bits);
40
41 /**
42 * Estimate work factor for EC discrete logarithm
43 * @param prime_group_size size of the group in bits
44 * @return estimated security level for this group
45 */
46 BOTAN_DLL size_t ecp_work_factor(size_t prime_group_size);
47
48 }
49
50 #endif
Botan::dl_exponent_size
size_t dl_exponent_size(size_t bits)
Definition: workfactor.cpp:40
Botan::dl_work_factor
size_t dl_work_factor(size_t bits)
Definition: workfactor.cpp:34
Botan::ecp_work_factor
size_t ecp_work_factor(size_t bits)
Definition: workfactor.cpp:14
Botan::if_work_factor
size_t if_work_factor(size_t bits)
Definition: workfactor.cpp:19
Botan
Definition: alg_id.cpp:13