2 # For a description of the syntax of this configuration file,
3 # see scripts/config/Kconfig-language.txt
7 depends on !CONFIG_SSL_SKELETON_MODE
10 prompt "Reduction Algorithm"
11 default CONFIG_BIGINT_BARRETT
13 config CONFIG_BIGINT_CLASSICAL
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.
20 config CONFIG_BIGINT_MONTGOMERY
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
28 This option will not be normally selected.
30 config CONFIG_BIGINT_BARRETT
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
38 It is about 40% faster than Classical/Montgomery with the expense of
39 about 2kB, and so this option is normally selected.
43 config CONFIG_BIGINT_CRT
44 bool "Chinese Remainder Theorem (CRT)"
47 Allow the Chinese Remainder Theorem (CRT) to be used.
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
54 This option should be selected.
56 config CONFIG_BIGINT_KARATSUBA
57 bool "Karatsuba Multiplication"
60 Allow Karasuba multiplication to be used.
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.
68 It costs about 2kB to enable it.
70 config MUL_KARATSUBA_THRESH
71 int "Karatsuba Multiplication Theshold"
73 depends on CONFIG_BIGINT_KARATSUBA
75 The minimum number of components needed before Karasuba muliplication
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.
82 config SQU_KARATSUBA_THRESH
83 int "Karatsuba Square Threshold"
85 depends on CONFIG_BIGINT_KARATSUBA && CONFIG_BIGINT_SQUARE
87 The minimum number of components needed before Karatsuba squaring
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.
94 config CONFIG_BIGINT_SLIDING_WINDOW
95 bool "Sliding Window Exponentiation"
98 Allow Sliding-Window Exponentiation to be used.
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.
104 It results in a considerable performance improvement with it enabled
105 (it halves the decryption time) and so should be selected.
107 config CONFIG_BIGINT_SQUARE
108 bool "Square Algorithm"
111 Allow squaring to be used instead of a multiplication.
113 Squaring is theoretically 50% faster than a standard multiply
114 (but is actually about 25% faster).
116 It gives a 20% speed improvement and so should be selected.
118 config CONFIG_BIGINT_CHECK_ON
119 bool "BigInt Integrity Checking"
120 default n if !CONFIG_DEBUG
121 default y if CONFIG_DEBUG
123 This is used when developing bigint algorithms. It performs a sanity
124 check on all operations at the expense of speed.
126 This option is only selected when developing and should normally be