Annotation of embedaddon/axTLS/ssl/BigIntConfig.in, revision 1.1
1.1 ! misho 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. It has the limitation that 0 <= x, y < m, and so is not
! 25: used when CRT is active.
! 26:
! 27: This option will not be normally selected.
! 28:
! 29: config CONFIG_BIGINT_BARRETT
! 30: bool "Barrett"
! 31: help
! 32: Barrett performs expensive precomputation before reduction and partial
! 33: multiplies for computational speed.
! 34:
! 35: It is about 40% faster than Classical/Montgomery with the expense of
! 36: about 2kB, and so this option is normally selected.
! 37:
! 38: endchoice
! 39:
! 40: config CONFIG_BIGINT_CRT
! 41: bool "Chinese Remainder Theorem (CRT)"
! 42: default y
! 43: help
! 44: Allow the Chinese Remainder Theorem (CRT) to be used.
! 45:
! 46: Uses a number of extra coefficients from the private key to improve the
! 47: performance of a decryption. This feature is one of the most
! 48: significant performance improvements (it reduces a decryption time by
! 49: over 3 times).
! 50:
! 51: This option should be selected.
! 52:
! 53: config CONFIG_BIGINT_KARATSUBA
! 54: bool "Karatsuba Multiplication"
! 55: default n
! 56: help
! 57: Allow Karasuba multiplication to be used.
! 58:
! 59: Uses 3 multiplications (plus a number of additions/subtractions)
! 60: instead of 4. Multiplications are O(N^2) but addition/subtraction
! 61: is O(N) hence for large numbers is beneficial. For this project, the
! 62: effect was only useful for 4096 bit keys (for 32 bit processors). For
! 63: 8 bit processors this option might be a possibility.
! 64:
! 65: It costs about 2kB to enable it.
! 66:
! 67: config MUL_KARATSUBA_THRESH
! 68: int "Karatsuba Multiplication Theshold"
! 69: default 20
! 70: depends on CONFIG_BIGINT_KARATSUBA
! 71: help
! 72: The minimum number of components needed before Karasuba muliplication
! 73: is used.
! 74:
! 75: This is very dependent on the speed/implementation of bi_add()/
! 76: bi_subtract(). There is a bit of trial and error here and will be
! 77: at a different point for different architectures.
! 78:
! 79: config SQU_KARATSUBA_THRESH
! 80: int "Karatsuba Square Threshold"
! 81: default 40
! 82: depends on CONFIG_BIGINT_KARATSUBA && CONFIG_BIGINT_SQUARE
! 83: help
! 84: The minimum number of components needed before Karatsuba squaring
! 85: is used.
! 86:
! 87: This is very dependent on the speed/implementation of bi_add()/
! 88: bi_subtract(). There is a bit of trial and error here and will be
! 89: at a different point for different architectures.
! 90:
! 91: config CONFIG_BIGINT_SLIDING_WINDOW
! 92: bool "Sliding Window Exponentiation"
! 93: default y
! 94: help
! 95: Allow Sliding-Window Exponentiation to be used.
! 96:
! 97: Potentially processes more than 1 bit at a time when doing
! 98: exponentiation. The sliding-window technique reduces the number of
! 99: precomputations compared to other precomputed techniques.
! 100:
! 101: It results in a considerable performance improvement with it enabled
! 102: (it halves the decryption time) and so should be selected.
! 103:
! 104: config CONFIG_BIGINT_SQUARE
! 105: bool "Square Algorithm"
! 106: default y
! 107: help
! 108: Allow squaring to be used instead of a multiplication. It uses
! 109: 1/2 of the standard multiplies to obtain its performance.
! 110: It gives a 20% speed improvement overall and so should be selected.
! 111:
! 112: config CONFIG_BIGINT_CHECK_ON
! 113: bool "BigInt Integrity Checking"
! 114: default n if !CONFIG_DEBUG
! 115: default y if CONFIG_DEBUG
! 116: help
! 117: This is used when developing bigint algorithms. It performs a sanity
! 118: check on all operations at the expense of speed.
! 119:
! 120: This option is only selected when developing and should normally be
! 121: turned off.
! 122:
! 123: choice
! 124: prompt "Integer Size"
! 125: default CONFIG_INTEGER_32BIT
! 126:
! 127: config CONFIG_INTEGER_32BIT
! 128: bool "32"
! 129: help
! 130: The native integer size is 32 bits or higher.
! 131:
! 132:
! 133: config CONFIG_INTEGER_16BIT
! 134: bool "16"
! 135: help
! 136: The native integer size is 16 bits.
! 137:
! 138: config CONFIG_INTEGER_8BIT
! 139: bool "8"
! 140: help
! 141: The native integer size is 8 bits.
! 142:
! 143: endchoice
! 144: endmenu
! 145:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>