2
0

Config.in 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. if PACKAGE_libopenssl
  2. comment "Build Options"
  3. config OPENSSL_OPTIMIZE_SPEED
  4. bool
  5. default y if x86_64 || i386
  6. prompt "Enable optimization for speed instead of size"
  7. select OPENSSL_WITH_ASM
  8. help
  9. Enabling this option increases code size (around 20%) and
  10. performance. The increase in performance and size depends on the
  11. target CPU. EC and AES seem to benefit the most, with EC speed
  12. increased by 20%-50% (mipsel & x86).
  13. AES-GCM is supposed to be 3x faster on x86. YMMV.
  14. config OPENSSL_WITH_ASM
  15. bool
  16. default y if !SMALL_FLASH || !arm
  17. prompt "Compile with optimized assembly code"
  18. depends on !arc
  19. help
  20. Disabling this option will reduce code size and performance.
  21. The increase in performance and size depends on the target
  22. CPU and on the algorithms being optimized. As of 1.1.0i*:
  23. Platform Pkg Inc. Algorithms where assembly is used - ~% Speed Increase
  24. aarch64 174K BN, aes, sha1, sha256, sha512, nist256, poly1305
  25. arm 152K BN, aes, sha1, sha256, sha512, nist256, poly1305
  26. i386 183K BN+147%, aes+300%, rc4+55%, sha1+160%, sha256+114%, sha512+270%, nist256+282%, poly1305+292%
  27. mipsel 1.5K BN+97%, aes+4%, sha1+94%, sha256+60%
  28. mips64 3.7K BN, aes, sha1, sha256, sha512, poly1305
  29. powerpc 20K BN, aes, sha1, sha256, sha512, poly1305
  30. x86_64 228K BN+220%, aes+173%, rc4+38%, sha1+40%, sha256+64%, sha512+31%, nist256+354%, poly1305+228%
  31. * Only most common algorithms shown. Your mileage may vary.
  32. BN (bignum) performance was measured using RSA sign/verify.
  33. config OPENSSL_WITH_SSE2
  34. bool
  35. default y if !TARGET_x86_legacy && !TARGET_x86_geode
  36. prompt "Enable use of x86 SSE2 instructions"
  37. depends on OPENSSL_WITH_ASM && i386
  38. help
  39. Use of SSE2 instructions greatly increase performance (up to
  40. 3x faster) with a minimum (~0.2%, or 23KB) increase in package
  41. size, but it will bring no benefit if your hardware does not
  42. support them, such as Geode GX and LX. In this case you may
  43. save 23KB by saying yes here. AMD Geode NX, and Intel
  44. Pentium 4 and above support SSE2.
  45. config OPENSSL_WITH_DEPRECATED
  46. bool
  47. default y
  48. prompt "Include deprecated APIs (See help for a list of packages that need this)"
  49. help
  50. Since openssl 1.1.x is still new to openwrt, some packages
  51. requiring this option do not list it as a requirement yet:
  52. * freeswitch-stable, freeswitch, python, python3, squid.
  53. config OPENSSL_NO_DEPRECATED
  54. bool
  55. default !OPENSSL_WITH_DEPRECATED
  56. config OPENSSL_WITH_ERROR_MESSAGES
  57. bool
  58. default y if !SMALL_FLASH && !LOW_MEMORY_FOOTPRINT
  59. prompt "Include error messages"
  60. help
  61. This option aids debugging, but increases package size and
  62. memory usage.
  63. comment "Protocol Support"
  64. config OPENSSL_WITH_TLS13
  65. bool
  66. default y
  67. prompt "Enable support for TLS 1.3"
  68. select OPENSSL_WITH_EC
  69. help
  70. TLS 1.3 is the newest version of the TLS specification.
  71. It aims:
  72. * to increase the overall security of the protocol,
  73. removing outdated algorithms, and encrypting more of the
  74. protocol;
  75. * to increase performance by reducing the number of round-trips
  76. when performing a full handshake.
  77. It increases package size by ~4KB.
  78. config OPENSSL_WITH_DTLS
  79. bool
  80. prompt "Enable DTLS support"
  81. help
  82. Datagram Transport Layer Security (DTLS) provides TLS-like security
  83. for datagram-based (UDP, DCCP, CAPWAP, SCTP & SRTP) applications.
  84. config OPENSSL_WITH_NPN
  85. bool
  86. prompt "Enable NPN support"
  87. help
  88. NPN is a TLS extension, obsoleted and replaced with ALPN,
  89. used to negotiate SPDY, and HTTP/2.
  90. config OPENSSL_WITH_SRP
  91. bool
  92. default y
  93. prompt "Enable SRP support"
  94. help
  95. The Secure Remote Password protocol (SRP) is an augmented
  96. password-authenticated key agreement (PAKE) protocol, specifically
  97. designed to work around existing patents.
  98. config OPENSSL_WITH_CMS
  99. bool
  100. default y
  101. prompt "Enable CMS (RFC 5652) support"
  102. help
  103. Cryptographic Message Syntax (CMS) is used to digitally sign,
  104. digest, authenticate, or encrypt arbitrary message content.
  105. comment "Algorithm Selection"
  106. config OPENSSL_WITH_EC
  107. bool
  108. default y
  109. prompt "Enable elliptic curve support"
  110. help
  111. Elliptic-curve cryptography (ECC) is an approach to public-key
  112. cryptography based on the algebraic structure of elliptic curves
  113. over finite fields. ECC requires smaller keys compared to non-ECC
  114. cryptography to provide equivalent security.
  115. config OPENSSL_WITH_EC2M
  116. bool
  117. depends on OPENSSL_WITH_EC
  118. prompt "Enable ec2m support"
  119. help
  120. This option enables the more efficient, yet less common, binary
  121. field elliptic curves.
  122. config OPENSSL_WITH_CHACHA_POLY1305
  123. bool
  124. default y
  125. prompt "Enable ChaCha20-Poly1305 ciphersuite support"
  126. help
  127. ChaCha20-Poly1305 is an AEAD ciphersuite with 256-bit keys,
  128. combining ChaCha stream cipher with Poly1305 MAC.
  129. It is 3x faster than AES, when not using a CPU with AES-specific
  130. instructions, as is the case of most embedded devices.
  131. config OPENSSL_PREFER_CHACHA_OVER_GCM
  132. bool
  133. default y if !x86_64 && !aarch64
  134. prompt "Prefer ChaCha20-Poly1305 over AES-GCM by default"
  135. depends on OPENSSL_WITH_CHACHA_POLY1305
  136. help
  137. The default openssl preference is for AES-GCM before ChaCha, but
  138. that takes into account AES-NI capable chips. It is not the
  139. case with most embedded chips, so it may be better to invert
  140. that preference. This is just for the default case. The
  141. application can always override this.
  142. config OPENSSL_WITH_PSK
  143. bool
  144. default y
  145. prompt "Enable PSK support"
  146. help
  147. Build support for Pre-Shared Key based cipher suites.
  148. comment "Less commonly used build options"
  149. config OPENSSL_WITH_ARIA
  150. bool
  151. prompt "Enable ARIA support"
  152. help
  153. ARIA is a block cipher developed in South Korea, based on AES.
  154. config OPENSSL_WITH_CAMELLIA
  155. bool
  156. prompt "Enable Camellia cipher support"
  157. help
  158. Camellia is a bock cipher with security levels and processing
  159. abilities comparable to AES.
  160. config OPENSSL_WITH_IDEA
  161. bool
  162. prompt "Enable IDEA cipher support"
  163. help
  164. IDEA is a block cipher with 128-bit keys.
  165. config OPENSSL_WITH_SEED
  166. bool
  167. prompt "Enable SEED cipher support"
  168. help
  169. SEED is a block cipher with 128-bit keys broadly used in
  170. South Korea, but seldom found elsewhere.
  171. config OPENSSL_WITH_SM234
  172. bool
  173. prompt "Enable SM2/3/4 algorithms support"
  174. help
  175. These algorithms are a set of "Commercial Cryptography"
  176. algorithms approved for use in China.
  177. * SM2 is an EC algorithm equivalent to ECDSA P-256
  178. * SM3 is a hash function equivalent to SHA-256
  179. * SM4 is a 128-block cipher equivalent to AES-128
  180. config OPENSSL_WITH_BLAKE2
  181. bool
  182. prompt "Enable BLAKE2 digest support"
  183. help
  184. BLAKE2 is a cryptographic hash function based on the ChaCha
  185. stream cipher.
  186. config OPENSSL_WITH_MDC2
  187. bool
  188. prompt "Enable MDC2 digest support"
  189. config OPENSSL_WITH_WHIRLPOOL
  190. bool
  191. prompt "Enable Whirlpool digest support"
  192. config OPENSSL_WITH_COMPRESSION
  193. bool
  194. prompt "Enable compression support"
  195. help
  196. TLS compression is not recommended, as it is deemed insecure.
  197. The CRIME attack exploits this weakness.
  198. Even with this option turned on, it is disabled by default, and the
  199. application must explicitly turn it on.
  200. config OPENSSL_WITH_RFC3779
  201. bool
  202. prompt "Enable RFC3779 support (BGP)"
  203. help
  204. RFC 3779 defines two X.509 v3 certificate extensions. The first
  205. binds a list of IP address blocks, or prefixes, to the subject of a
  206. certificate. The second binds a list of autonomous system
  207. identifiers to the subject of a certificate. These extensions may be
  208. used to convey the authorization of the subject to use the IP
  209. addresses and autonomous system identifiers contained in the
  210. extensions.
  211. comment "Engine/Hardware Support"
  212. config OPENSSL_ENGINE
  213. bool "Enable engine support"
  214. default y
  215. help
  216. This enables alternative cryptography implementations,
  217. most commonly for interfacing with external crypto devices,
  218. or supporting new/alternative ciphers and digests.
  219. If you compile the library with this option disabled, packages built
  220. using an engine-enabled library (i.e. from the official repo) may
  221. fail to run. Compile and install the packages with engine support
  222. disabled, and you should be fine.
  223. Note that you need to enable KERNEL_AIO to be able to build the
  224. afalg engine package.
  225. config OPENSSL_ENGINE_BUILTIN
  226. bool "Build chosen engines into libcrypto"
  227. depends on OPENSSL_ENGINE
  228. help
  229. This builds all chosen engines into libcrypto.so, instead of building
  230. them as dynamic engines in separate packages.
  231. The benefit of building the engines into libcrypto is that they won't
  232. require any configuration to be used by default.
  233. config OPENSSL_ENGINE_BUILTIN_AFALG
  234. bool
  235. prompt "Acceleration support through AF_ALG sockets engine"
  236. depends on OPENSSL_ENGINE_BUILTIN && KERNEL_AIO && !LINUX_3_18
  237. select PACKAGE_libopenssl-conf
  238. help
  239. This enables use of hardware acceleration through the
  240. AF_ALG kernel interface.
  241. config OPENSSL_ENGINE_BUILTIN_DEVCRYPTO
  242. bool
  243. prompt "Acceleration support through /dev/crypto"
  244. depends on OPENSSL_ENGINE_BUILTIN
  245. select PACKAGE_libopenssl-conf
  246. help
  247. This enables use of hardware acceleration through OpenBSD
  248. Cryptodev API (/dev/crypto) interface.
  249. Even though configuration is not strictly needed, it is worth seeing
  250. https://openwrt.org/docs/techref/hardware/cryptographic.hardware.accelerators
  251. for information on how to configure the engine.
  252. config OPENSSL_ENGINE_BUILTIN_PADLOCK
  253. bool
  254. prompt "VIA Padlock Acceleration support engine"
  255. depends on OPENSSL_ENGINE_BUILTIN && TARGET_x86
  256. select PACKAGE_libopenssl-conf
  257. help
  258. This enables use of hardware acceleration through the
  259. VIA Padlock module.
  260. config OPENSSL_WITH_ASYNC
  261. bool
  262. prompt "Enable asynchronous jobs support"
  263. depends on OPENSSL_ENGINE && USE_GLIBC
  264. help
  265. Enables async-aware applications to be able to use OpenSSL to
  266. initiate crypto operations asynchronously. In order to work
  267. this will require the presence of an async capable engine.
  268. config OPENSSL_WITH_GOST
  269. bool
  270. prompt "Prepare library for GOST engine"
  271. depends on OPENSSL_ENGINE
  272. help
  273. This option prepares the library to accept engine support
  274. for Russian GOST crypto algorithms.
  275. The gost engine is not included in standard openwrt feeds.
  276. To build such engine yourself, see:
  277. https://github.com/gost-engine/engine
  278. endif