Merge pull request #1818 from dibdot/lxc_fix
[project/luci.git] / libs / luci-lib-nixio / axTLS / ssl / BigIntConfig.in
1 #
2 # For a description of the syntax of this configuration file,
3 # see scripts/config/Kconfig-language.txt
4 #
5
6 menu "BigInt Options"
7     depends on !CONFIG_SSL_SKELETON_MODE
8
9 choice
10     prompt "Reduction Algorithm"
11     default CONFIG_BIGINT_BARRETT 
12
13 config CONFIG_BIGINT_CLASSICAL
14     bool "Classical"
15     help
16         Classical uses standard division. It has no limitations and is
17         theoretically the slowest due to the divisions used. For this particular
18         implementation it is surprisingly quite fast.
19
20 config CONFIG_BIGINT_MONTGOMERY
21     bool "Montgomery"
22     help
23         Montgomery uses simple addition and multiplication to achieve its
24         performance. In this implementation it is slower than classical, 
25         and it has the limitation that 0 <= x, y < m, and so is not used 
26         when CRT is active.
27
28         This option will not be normally selected.
29
30 config CONFIG_BIGINT_BARRETT
31     bool "Barrett"
32     help
33         Barrett performs expensive precomputation before reduction and partial
34         multiplies for computational speed. It can't be used with some of the
35         calculations when CRT is used, and so defaults to classical when this
36         occurs.
37
38         It is about 40% faster than Classical/Montgomery with the expense of
39         about 2kB, and so this option is normally selected.
40
41 endchoice
42
43 config CONFIG_BIGINT_CRT
44     bool "Chinese Remainder Theorem (CRT)"
45     default y
46     help 
47         Allow the Chinese Remainder Theorem (CRT) to be used.
48
49         Uses a number of extra coefficients from the private key to improve the
50         performance of a decryption. This feature is one of the most 
51         significant performance improvements (it reduces a decryption time by 
52         over 3 times).
53
54         This option should be selected.
55
56 config CONFIG_BIGINT_KARATSUBA
57     bool "Karatsuba Multiplication"
58     default n
59     help
60         Allow Karasuba multiplication to be used.
61  
62         Uses 3 multiplications (plus a number of additions/subtractions) 
63         instead of 4. Multiplications are O(N^2) but addition/subtraction 
64         is O(N) hence for large numbers is beneficial. For this project, the 
65         effect was only useful for 4096 bit keys. As these aren't likely to 
66         be used, the feature is disabled by default. 
67         
68         It costs about 2kB to enable it.
69
70 config MUL_KARATSUBA_THRESH
71     int "Karatsuba Multiplication Theshold"
72     default 20
73     depends on CONFIG_BIGINT_KARATSUBA
74     help
75         The minimum number of components needed before Karasuba muliplication
76         is used.
77  
78         This is very dependent on the speed/implementation of bi_add()/
79         bi_subtract(). There is a bit of trial and error here and will be
80         at a different point for different architectures.
81
82 config SQU_KARATSUBA_THRESH
83     int "Karatsuba Square Threshold"
84     default 40
85     depends on CONFIG_BIGINT_KARATSUBA && CONFIG_BIGINT_SQUARE
86     help    
87         The minimum number of components needed before Karatsuba squaring
88         is used.
89  
90         This is very dependent on the speed/implementation of bi_add()/
91         bi_subtract(). There is a bit of trial and error here and will be
92         at a different point for different architectures.
93
94 config CONFIG_BIGINT_SLIDING_WINDOW
95     bool "Sliding Window Exponentiation"
96     default y
97     help
98         Allow Sliding-Window Exponentiation to be used.
99  
100         Potentially processes more than 1 bit at a time when doing 
101         exponentiation. The sliding-window technique reduces the number of 
102         precomputations compared to other precomputed techniques.
103
104         It results in a considerable performance improvement with it enabled
105         (it halves the decryption time) and so should be selected.
106
107 config CONFIG_BIGINT_SQUARE
108     bool "Square Algorithm"
109     default y
110     help
111         Allow squaring to be used instead of a multiplication.
112  
113         Squaring is theoretically 50% faster than a standard multiply 
114         (but is actually about 25% faster). 
115
116         It gives a 20% speed improvement and so should be selected.
117
118 config CONFIG_BIGINT_CHECK_ON
119     bool "BigInt Integrity Checking"
120     default n if !CONFIG_DEBUG
121     default y if CONFIG_DEBUG
122     help
123         This is used when developing bigint algorithms. It performs a sanity
124         check on all operations at the expense of speed.
125         
126         This option is only selected when developing and should normally be
127         turned off.
128
129 endmenu
130
131
132