Botan
3.7.1
Crypto and TLS for C&
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerations
a
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
c
d
f
i
m
n
r
s
t
Concepts
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
f
h
i
m
n
o
p
r
s
t
u
v
w
Enumerations
b
c
d
e
k
m
n
o
p
s
t
x
Enumerator
_
a
b
c
d
e
f
h
k
l
m
n
p
q
r
s
t
u
w
x
Related Symbols
b
c
d
e
f
k
o
p
s
t
x
Files
File List
File Members
All
_
a
b
c
d
e
f
i
k
m
n
o
p
q
s
t
u
w
x
y
z
Functions
b
c
Variables
Typedefs
b
c
e
p
t
Enumerations
Enumerator
b
c
d
e
k
n
Macros
_
a
b
c
f
m
n
q
s
t
w
src
lib
pubkey
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
size_t
BOTAN_TEST_API
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
size_t
BOTAN_TEST_API
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
size_t
BOTAN_TEST_API
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
size_t
ecp_work_factor
(
size_t
prime_group_size);
47
48
}
// namespace Botan
49
50
#endif
BOTAN_TEST_API
#define BOTAN_TEST_API
Definition
api.h:39
Botan
Definition
alg_id.cpp:13
Botan::ecp_work_factor
size_t ecp_work_factor(size_t bits)
Definition
workfactor.cpp:14
Botan::dl_work_factor
size_t dl_work_factor(size_t bits)
Definition
workfactor.cpp:46
Botan::dl_exponent_size
size_t dl_exponent_size(size_t bits)
Definition
workfactor.cpp:51
Botan::if_work_factor
size_t if_work_factor(size_t bits)
Definition
workfactor.cpp:35
Generated by
1.12.0