Config.in 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151
  1. if PACKAGE_dropbear
  2. ## <GENERIC>
  3. comment "Generic options"
  4. config DROPBEAR_STATIC_BUILD
  5. bool "Build static binaries"
  6. depends on DEVEL
  7. help
  8. Build all programs as statically linked.
  9. Default: disabled.
  10. config DROPBEAR_LEGACY_COMPAT
  11. bool "Enable legacy options and features"
  12. ## TODO: remove "default y" in 2026
  13. default y
  14. help
  15. Enable legacy options to be accessible.
  16. This enables options which are improve backward compatibility
  17. but are also known to have negative security impact.
  18. Default: enabled.
  19. config DROPBEAR_SMALL_CODE
  20. bool "Small code"
  21. default y
  22. help
  23. Reduces binary size by several KB but makes the symmetrical ciphers and hashes slower (perhaps by 50%).
  24. Default: enabled.
  25. config DROPBEAR_DEBUG_TRACE
  26. int "Verbose debug log level"
  27. range 0 5
  28. default 0
  29. help
  30. Define how much debug output is compiled in.
  31. * 0 = No verbose debug (default)
  32. * 1-3 = approx 4 Kb (connection, remote identity, algos, auth type info)
  33. * 4 = approx 17 Kb (detailed before connection)
  34. * 5 = approx 8 Kb (detailed after connection)
  35. Debug is enabled with -v at runtime. Repeat to increase.
  36. Default: 0.
  37. config DROPBEAR_LOG_COMMANDS
  38. bool "Log commands"
  39. help
  40. Log the initial command sent by the clients.
  41. This does not include all shell / scp / sftp commands that a user executes
  42. during a session.
  43. Default: disabled.
  44. config DROPBEAR_INETD_MODE
  45. bool "inetd mode"
  46. help
  47. Allow Dropbear server to be started on-demand by inetd superserver.
  48. OpenWrt starts Dropbear as daemon.
  49. Default: disabled.
  50. ## </GENERIC>
  51. ## <LOGIN OPTIONS>
  52. comment "Login options"
  53. config DROPBEAR_DO_HOST_LOOKUP
  54. bool "Reverse DNS"
  55. help
  56. Whether to do reverse DNS lookups of incoming connection IP addresses
  57. and report the DNS name in the log.
  58. Warning: If the system is under attack from many IP addresses,
  59. this will flood the DNS servers too.
  60. Default: disabled.
  61. config DROPBEAR_SVR_PUBKEY_OPTIONS
  62. bool "Options in authorized_keys file"
  63. default y
  64. help
  65. Whether to take into account the key options in authorized_keys file.
  66. Supported options are:
  67. * no-port-forwarding
  68. * no-agent-forwarding
  69. * no-X11-forwarding
  70. * no-pty
  71. * restrict
  72. * permitopen="host:port"
  73. * command="forced_command"
  74. If DROPBEAR_SK_KEYS is enabled then following options are supported too:
  75. * no-touch-required
  76. * verify-required
  77. These options are documented in Dropbear man page (not installed).
  78. Default: enabled.
  79. config DROPBEAR_LASTLOG
  80. bool "Write lastlog"
  81. help
  82. /var/log/lastlog is a record of the last login of each user.
  83. To view the last login, use "lastlog" command (OpenWrt package shadow-lastlog).
  84. If enabled, Drobear will update it with SSH logins.
  85. If disabled, SSH logins will not be recorded.
  86. Warning: The lastlog record is considered a security and privacy risk by some.
  87. Default: disabled.
  88. config DROPBEAR_LASTLOG_PATH
  89. string "lastlog path:"
  90. default "/var/log/lastlog"
  91. depends on DROPBEAR_LASTLOG
  92. help
  93. Default: /var/log/lastlog
  94. config DROPBEAR_WTMP
  95. bool "Write wtmp"
  96. help
  97. /var/log/wtmp is a record of all previous logins.
  98. The file needs to be manually created - Dropbear will update it only if it already exists.
  99. To view login history, use "last" command, available in Busybox but not included by default.
  100. If enabled, Dropbear will add SSH logins to the record.
  101. If disabled, SSH logins will not be recorded.
  102. Warning: The wtmp record is considered a security and privacy risk by some.
  103. Default: disabled.
  104. config DROPBEAR_WTMP_PATH
  105. string "wtmp path:"
  106. default "/var/log/wtmp"
  107. depends on DROPBEAR_WTMP
  108. help
  109. Default: /var/log/wtmp
  110. # ---- MUSL UTMP ----
  111. # In musl, pututline() and related functions are all stubs, and login(), logout() and ttyslot() don't exist.
  112. # In Dropbear there is an option to write to utmp directly, but it uses ttyslot().
  113. # So, there is currently no way to make utmp work with musl.
  114. # Revisit this if/when Dropbear implements ttyslot() or an independent utmp direct write.
  115. comment "* note: utmp is unavailable with musl libc"
  116. depends on USE_MUSL
  117. config DROPBEAR_UTMP
  118. bool "Write utmp"
  119. depends on !USE_MUSL
  120. help
  121. /var/run/utmp is a record of currently logged-in users.
  122. To view logged-in users, use "w", "who" or "users" commands.
  123. If enabled, Dropbear will keep it updated with users that log in via SSH.
  124. If disabled, SSH logins will not be recorded.
  125. Warning: The utmp record is considered a security and privacy risk by some.
  126. Default: disabled.
  127. config DROPBEAR_UTMP_PATH
  128. string "utmp path:"
  129. default "/var/run/utmp"
  130. depends on DROPBEAR_UTMP
  131. help
  132. Default: /var/run/utmp
  133. # musl pututline() and related functions are all stubs.
  134. config DROPBEAR_PUTUTLINE
  135. bool "Use pututline() to write to utmp"
  136. default y if !DROPBEAR_LOGINFUNC
  137. depends on !USE_MUSL && !DROPBEAR_LOGINFUNC && DROPBEAR_UTMP
  138. help
  139. If enabled, Dropbear will use pututline() to write into the utmp file.
  140. If disabled, Dropbear will write to utmp file directly.
  141. Consider using login() and logout() functions via DROPBEAR_LOGINFUNC option if available.
  142. Default: enabled if DROPBEAR_UTMP is enabled.
  143. # musl doesn't have login() and logout()
  144. config DROPBEAR_LOGINFUNC
  145. bool "Use login() and logout() functions"
  146. depends on !USE_MUSL
  147. select DROPBEAR_UTMP
  148. select DROPBEAR_WTMP
  149. help
  150. If enabled, Dropbear will use login() and logout() functions to record logins in utmp and wtmp files.
  151. If disabled, see DROPBEAR_UTMP and DROPBEAR_WTMP options.
  152. Default: disabled.
  153. ## </LOGIN OPTIONS>
  154. ## <FEATURES>
  155. comment "Features"
  156. config DROPBEAR_REEXEC
  157. bool "ASLR for each connection"
  158. default y if !LOW_MEMORY_FOOTPRINT
  159. help
  160. Dropbear will re-execute itself for each incoming connection
  161. so that memory layout may be re-randomised (ASLR).
  162. Exploiting Dropbear vulnerabilities becomes harder
  163. but uses slightly more memory per connection.
  164. Default: enabled, except devices with very low memory.
  165. config DROPBEAR_ZLIB
  166. bool "Compression"
  167. select PACKAGE_zlib
  168. help
  169. Enable support for compression using shared zlib library.
  170. Compression slows down transfer speed, especially on low-power CPUs
  171. found in routers, but may increase speed over slow network links
  172. if the CPU is fast enough to handle both compression and encryption
  173. at network speed.
  174. Default: disabled.
  175. config DROPBEAR_DELAY_HOSTKEY
  176. bool "Auto-generate host keys (-R)"
  177. default y
  178. help
  179. Add command line argument "-R" to generate hostkeys as-needed
  180. when the first connection using that key type occurs.
  181. This avoids the need to otherwise run "dropbearkey" and avoids
  182. some problems with badly seeded /dev/urandom when systems first boot.
  183. Default: enabled.
  184. config DROPBEAR_SVR_AGENTFWD
  185. bool "Authentication agent forwarding [SECURITY]"
  186. default y
  187. help
  188. Enables support for authentication agent forwarding.
  189. Server only: see DROPBEAR_CLI_AGENTFWD for client.
  190. This allows the use of local client keys to run a second ssh client to connect from the server to another server, without the need to install the keys on the fist server too.
  191. Common example: ssh to a server and use git on that server to push to github using local ssh keys, not the keys installed on the server.
  192. Default: enabled.
  193. SECURITY NOTES:
  194. SSH agent forwarding might cause security issues (locally and on the server).
  195. Hovewer, it's enabled by default for compatibility with previous OpenWrt/Dropbear releases.
  196. config DROPBEAR_SVR_REMOTETCPFWD
  197. bool "Remote port forwarding: server -> client"
  198. default y
  199. help
  200. Support remote port forwarding.
  201. Server listens and forwards connections to client.
  202. Server only; see DROPBEAR_CLI_REMOTETCPFWD for client.
  203. Default: enabled.
  204. config DROPBEAR_SVR_LOCALTCPFWD
  205. bool "Local port forwarding: client -> server"
  206. default y
  207. help
  208. Support local port forwarding.
  209. Client listens and forwards connections to server.
  210. Server only; see DROPBEAR_CLI_LOCALTCPFWD for client.
  211. Default: enabled.
  212. config DROPBEAR_SVR_LOCALSTREAMFWD
  213. bool "Local port forwarding: client TCP socket -> server unix socket"
  214. default y
  215. help
  216. Support local port forwarding to unix sockets.
  217. Client listens and forwards connections to unix socket on server side.
  218. Server only.
  219. Default: enabled.
  220. config DROPBEAR_X11FWD
  221. bool "X11 forwarding"
  222. help
  223. Supports X11 forwarding.
  224. OpenWrt doesn't have any Xorg programs by default.
  225. Server only.
  226. Default: disabled.
  227. config DROPBEAR_SCP
  228. bool "SCP file transfer program"
  229. default y
  230. help
  231. Include the SCP file transfer program.
  232. Default: enabled.
  233. config DROPBEAR_SFTPSERVER
  234. bool "Support external SFTP server"
  235. default y if !SMALL_FLASH
  236. help
  237. Enable running a SFTP server (such as the one included with OpenSSH).
  238. The SFTP server program is not provided by Dropbear itself.
  239. SFTP server must be installed as /usr/libexec/sftp-server
  240. Default: enabled, except devices with very small flash.
  241. ## </FEATURES>
  242. ## <CLIENT>
  243. menuconfig DROPBEAR_DBCLIENT
  244. bool "dbclient (Dropbear SSH client)"
  245. default y
  246. help
  247. Build dbclient, the Dropbear SSH client.
  248. Default: enabled.
  249. if DROPBEAR_DBCLIENT
  250. config DROPBEAR_USER_ALGO_LIST
  251. bool "Let user choose ciphers and MACs"
  252. default y
  253. help
  254. Adds dbclient "-c" and "-m" command line options.
  255. Allows using "-c <cipher list>" and/or "-m <MAC list>"
  256. to choose preferred ciphers and MACs.
  257. Run "dbclient -c help" to list supported ciphers
  258. and "dbclient -m help" to list supported MACs.
  259. Default: enabled.
  260. config DROPBEAR_USE_SSH_CONFIG
  261. bool "Use ssh_config"
  262. help
  263. Whether to use some options from ~/.ssh/dropbear_config.
  264. Supported top-most option is "Host" (no "Match" support is present).
  265. Supported options for "Host" are:
  266. * Hostname
  267. * Port
  268. * User
  269. * IdentityFile
  270. These options are well-documented in ssh_config(5) man page.
  271. Default: disabled.
  272. config DROPBEAR_CLI_IMMEDIATE_AUTH
  273. bool "Send auth request immediately [COMPATIBILITY]"
  274. help
  275. Save a network roundtrip by sending a real auth request
  276. immediately after sending a query for the available methods.
  277. This is not yet enabled by default since it could
  278. cause problems with non-compliant servers.
  279. Default: disabled.
  280. config DROPBEAR_USE_PASSWORD_ENV
  281. bool "Use env password"
  282. default y
  283. help
  284. Allow specifying the password for dbclient via the DROPBEAR_PASSWORD environment variable.
  285. Default: enabled.
  286. config DROPBEAR_CLI_ASKPASS_HELPER
  287. bool "Support askpass helper"
  288. help
  289. Allow the use of a helper program for the ssh client.
  290. The helper program should be specified in the SSH_ASKPASS environment variable,
  291. and dbclient should be run with DISPLAY set and no tty.
  292. The program should return the password on standard output.
  293. Default: disabled.
  294. config DROPBEAR_CLI_AGENTFWD
  295. bool "Authentication agent forwarding [SECURITY]"
  296. default y
  297. help
  298. Enables support for authentication agent forwarding.
  299. Client only: see DROPBEAR_SVR_AGENTFWD for server.
  300. This allows the use of local client keys to run a second ssh client
  301. to connect from the server to another server, without the need to install
  302. the keys on the first server too.
  303. Common example: ssh to a server and use git on that server to push to
  304. github using local ssh keys, not the keys installed on the server.
  305. Default: enabled.
  306. SECURITY NOTES:
  307. SSH agent forwarding might cause security issues (locally and on the server).
  308. Hovewer, it's enabled by default for compatibility with previous OpenWrt/Dropbear releases.
  309. config DROPBEAR_CLI_LOCALTCPFWD
  310. bool "Local port forwarding (-L)"
  311. default y
  312. help
  313. Support local port forwarding.
  314. Client listens and forwards connections to server.
  315. Client only; see DROPBEAR_SVR_LOCALTCPFWD for server.
  316. Default: enabled.
  317. config DROPBEAR_CLI_REMOTETCPFWD
  318. bool "Remote port forwarding (-R)"
  319. default y
  320. help
  321. Support remote port forwarding.
  322. Server listens and forwards connections to client.
  323. Client only; see DROPBEAR_SRV_REMOTETCPFWD for server.
  324. Default: enabled.
  325. config DROPBEAR_CLI_PROXYCMD
  326. bool "Proxy command (-J)"
  327. default y
  328. help
  329. Support "-J <proxycommand>" to run the connection through a pipe
  330. to a program rather the normal TCP connection.
  331. Default: enabled.
  332. config DROPBEAR_CLI_NETCAT
  333. bool "Netcat-alike forwarding (-B)"
  334. help
  335. Support "-B <endhost:endport>" Netcat-alike forwarding.
  336. Default: disabled.
  337. comment "Multi-hop support is unavailable: enable both DROPBEAR_CLI_NETCAT and DROPBEAR_CLI_PROXYCMD"
  338. depends on !DROPBEAR_CLI_NETCAT || !DROPBEAR_CLI_PROXYCMD
  339. config DROPBEAR_CLI_MULTIHOP
  340. bool "Multi-hop support"
  341. default y
  342. depends on DROPBEAR_CLI_NETCAT && DROPBEAR_CLI_PROXYCMD
  343. help
  344. Support "[user@]host[/port][,[user@]host/port],...]" connections.
  345. This option is required to support multi-hop connections in Dropbear client as well as DROPBEAR_CLI_PROXYCMD.
  346. Default: enabled.
  347. endif
  348. ## </CLIENT>
  349. ## <RESOURCE LIMITS>
  350. menu "Resource limits"
  351. config DROPBEAR_KEX_REKEY_TIMEOUT
  352. int "Rekey limit (seconds)"
  353. range 600 604800
  354. default 28800
  355. help
  356. Specifies the maximum amount of time before the session key is renegotiated.
  357. Note: it's not possible to configure this value in run-time.
  358. Possible values: 600 (10 minutes) to 604800 (7 days)
  359. Default: 28800 (8 hours)
  360. config DROPBEAR_KEX_REKEY_DATA
  361. int "Rekey limit (bytes)"
  362. range 65536 2147418112
  363. default 1073741824
  364. help
  365. Specifies the maximum amount of data that may be transmitted or received
  366. before the session key is renegotiated.
  367. Note: it's not possible to configure this value in run-time.
  368. Possible values: 65536 (64 KiB) to 2147418112 (2 GiB - 64 KiB)
  369. Default: 1073741824 (1 GiB)
  370. config DROPBEAR_AUTH_TIMEOUT
  371. int "Unauthenticated timeout (seconds)"
  372. range 30 3600
  373. default 300
  374. help
  375. Close connections to clients which haven't authenticated after specified timeout.
  376. Note: it's not possible to configure this value in run-time.
  377. Possible values: 30 to 3600 (1 hour)
  378. Default: 300 (5 minutes)
  379. config DROPBEAR_MAX_AUTH_TRIES
  380. int "Max. failed authentications"
  381. range 1 80
  382. default 10
  383. help
  384. Default maximum number of failed authentication tries (server option).
  385. This can be changed at run-time with the -T argument.
  386. Possible values: 1 to 80 (from src/sysoptions.h)
  387. Default: 10
  388. config DROPBEAR_UNAUTH_CLOSE_DELAY
  389. int "Delay closing unauth. connections (seconds)"
  390. range 0 3600
  391. default 0
  392. help
  393. Delay introduced before closing an unauthenticated session.
  394. Can be set to, say 30 seconds, to reduce the speed of password brute forcing.
  395. There is a risk of denial of service by setting this.
  396. Note: it's not possible to configure this value in run-time.
  397. Possible values: 0 to 3600 (1 hour)
  398. Default: 0 (disabled)
  399. config DROPBEAR_MAX_UNAUTH_PER_IP
  400. int "Max. unauthenticated connections per IP"
  401. range 1 1024
  402. default 5
  403. help
  404. Specify the number of clients allowed to be connected but not yet authenticated.
  405. After this limit, connections are rejected.
  406. This setting is per IP, to prevent DoS attacks.
  407. Note: it's not possible to configure this value in run-time.
  408. Possible values: 1 to 1024
  409. Default: 5
  410. config DROPBEAR_MAX_UNAUTH_CLIENTS
  411. int "Max. unauthenticated connections (total)"
  412. range 1 1024
  413. default 30
  414. help
  415. Specify the number of clients allowed to be connected but not yet authenticated.
  416. After this limit, connections are rejected.
  417. This setting is the global number, to prevent memory exhaustion
  418. when attacks come from different IPs.
  419. Note: it's not possible to configure this value in run-time.
  420. Possible values: 1 to 1024
  421. Default: 30
  422. config DROPBEAR_DEFAULT_RECV_WINDOW
  423. int "Default TCP receive window size (bytes)"
  424. range 256 10485760
  425. default 32768 if LOW_MEMORY_FOOTPRINT
  426. default 262144
  427. help
  428. TCP connections require acknowledgement of received data.
  429. Window size is the maximum number of bytes that can be sent
  430. on a connection before having to wait for an ACK packet.
  431. This amount of memory is allocated as a per-connection receive buffer.
  432. Increasing this value can make a significant difference to network performance
  433. when SSH is used for large data transfers (SCP, SFTP, tunnels)
  434. and the CPU can handle the encryption at network speed.
  435. This can be changed at run-time with the -W argument.
  436. Possible values: 256 to 10485760 (10MiB, from src/sysoptions.h)
  437. Default: 32768 (32 KiB) for devices with very low memory
  438. and 262144 (256 KiB) otherwise.
  439. config DROPBEAR_DEFAULT_KEEPALIVE
  440. int "Default KeepAlive interval (seconds)"
  441. range 0 604800
  442. default 0
  443. help
  444. Ensure that data is transmitted every KeepAlive seconds.
  445. Applies to both server and client.
  446. This can be changed at run-time with the -K argument.
  447. Possible values: 0 to 604800 (7 days)
  448. Default: 0 (disabled)
  449. config DROPBEAR_DEFAULT_KEEPALIVE_LIMIT
  450. int "Default KeepAlive limit"
  451. range 1 30
  452. default 3
  453. help
  454. If this many KEEPALIVES are sent with no packets received from the other side, disconnect.
  455. Applies to both server and client.
  456. Note: it's not possible to configure this value in run-time.
  457. Possible values: 1 to 30
  458. Default: 3
  459. config DROPBEAR_DEFAULT_IDLE_TIMEOUT
  460. int "Default idle timeout (seconds)"
  461. range 0 604800
  462. default 0
  463. help
  464. If no traffic is sent/received in IDLE_TIMEOUT seconds, disconnect.
  465. Applies to both server and client.
  466. Note: values below 30 seconds are not recommended.
  467. This can be changed at run-time with the -I argument.
  468. Possible values: 0 to 604800 (7 days)
  469. Default: 0 (disabled).
  470. endmenu
  471. ## </RESOURCE LIMITS>
  472. ## <ENCRYPTION>
  473. menu "Encryption options"
  474. comment "Symmetric-key ciphers:"
  475. config DROPBEAR_3DES
  476. bool "3DES [WEAK]"
  477. depends on DROPBEAR_LEGACY_COMPAT
  478. help
  479. This enables the following authenticated encryption cipher:
  480. * 3des-ctr - CTR mode
  481. * 3des-cbc - CBC mode
  482. Some very old SSH implementations might only support 3DES.
  483. Keeping this cipher enables a downgrade attack on the connection, if the client allows it.
  484. Default: disabled.
  485. config DROPBEAR_AES128
  486. bool "AES128"
  487. default y
  488. help
  489. This enables the following authenticated encryption cipher:
  490. * [email protected] - GCM mode
  491. * aes128-ctr - CTR mode
  492. * aes128-cbc - CBC mode
  493. Enables AES with 128 bit key size.
  494. AES is very secure, but slow. It is preferred on systems with AES hardware acceleration.
  495. Including both AES keysize variants (128 and 256) will result in a minimal size increase.
  496. Default: enabled.
  497. config DROPBEAR_AES256
  498. bool "AES256"
  499. default y
  500. help
  501. This enables the following authenticated encryption cipher:
  502. * [email protected] - GCM mode
  503. * aes256-ctr - CTR mode
  504. * aes256-cbc - CBC mode
  505. Enables AES with 256 bit key size.
  506. AES is very secure, but slow. It is preferred on systems with AES hardware acceleration.
  507. Including both AES keysize variants (128 and 256) will result in a minimal size increase.
  508. Default: enabled.
  509. config DROPBEAR_CHACHA20POLY1305
  510. bool "ChaCha20-Poly1305"
  511. default y
  512. help
  513. This enables the following authenticated encryption cipher:
  514. * [email protected]
  515. ChaCha20 is a symmetric-key stream cipher.
  516. Poli1305 is hash function used for authentication.
  517. ChaCha20-Poly1305 provides both encryption and authentication
  518. without any additional cipher modes or MACs.
  519. These algorithms are generally faster than AES on CPUs without dedicated AES instructions.
  520. Default: enabled.
  521. comment "WARNING! At least one cipher must be selected."
  522. depends on !DROPBEAR_3DES && !DROPBEAR_AES128 && !DROPBEAR_AES256 && !DROPBEAR_CHACHA20POLY1305
  523. ## <CIPHER MODE>
  524. if DROPBEAR_3DES || DROPBEAR_AES128 || DROPBEAR_AES256
  525. comment "Cipher modes:"
  526. config DROPBEAR_ENABLE_CTR_MODE
  527. bool "CTR, Counter mode"
  528. default y
  529. help
  530. This enables the following authenticated encryption cipher:
  531. * 3des-ctr - 3DES
  532. * aes128-ctr - AES128
  533. * aes256-ctr - AES256
  534. Default: enabled.
  535. config DROPBEAR_ENABLE_CBC_MODE
  536. bool "CBC, Cipher Block Chaining mode [WEAK]"
  537. help
  538. This enables the following authenticated encryption cipher:
  539. * 3des-cbc - 3DES
  540. * aes128-cbc - AES128
  541. * aes256-cbc - AES256
  542. This mode is susceptible to ciphertext stealing and padding attacks.
  543. Default: disabled.
  544. config DROPBEAR_ENABLE_GCM_MODE
  545. bool "GCM, Galois-Counter mode [WEAK]"
  546. help
  547. This enables the following authenticated encryption cipher:
  548. * [email protected] - AES128
  549. * [email protected] - AES256
  550. The authentication part of the GCM can be attacked by ciphertext forgery.
  551. Default: disabled.
  552. comment "WARNING! Block ciphers require at least one cipher mode to be selected."
  553. depends on !DROPBEAR_ENABLE_CTR_MODE && !DROPBEAR_ENABLE_CBC_MODE && !DROPBEAR_ENABLE_GCM_MODE
  554. endif
  555. ## </CIPHER MODE>
  556. ## <MAC>
  557. if DROPBEAR_3DES || DROPBEAR_AES128 || DROPBEAR_AES256
  558. comment "Message authentication codes (MAC):"
  559. config DROPBEAR_SHA1_96_HMAC
  560. bool "SHA1-96-HMAC [WEAK]"
  561. depends on DROPBEAR_LEGACY_COMPAT
  562. help
  563. This enables the following message authentication code:
  564. * hmac-sha1-96
  565. Enables SHA1 with hash length truncated to 96 bit.
  566. Very old implementations may need it.
  567. Default: disabled.
  568. config DROPBEAR_SHA1_HMAC
  569. bool "SHA1-HMAC [WEAK]"
  570. depends on DROPBEAR_LEGACY_COMPAT
  571. help
  572. This enables the following message authentication code:
  573. * hmac-sha1
  574. SHA1 generates 160 bit hashes. They are considered weak when used for signing (sha1-rsa keys).
  575. Very old implementations may need it.
  576. Default: disabled.
  577. config DROPBEAR_SHA2_256_HMAC
  578. bool "SHA256-HMAC"
  579. default y
  580. help
  581. This enables the following message authentication code:
  582. * hmac-sha2-256
  583. SHA2 with 256 bit hash length.
  584. Default: enabled.
  585. config DROPBEAR_SHA2_512_HMAC
  586. bool "SHA512-HMAC"
  587. help
  588. This enables the following message authentication code:
  589. * hmac-sha2-512
  590. SHA2 with 512 bit hash length is slower than SHA256 with little added benefits,
  591. as SHA256 is sufficiently strong.
  592. Default: disabled.
  593. comment "WARNING! Ciphers without authentication require at least one MAC to be enabled."
  594. depends on !DROPBEAR_SHA1_96_HMAC && !DROPBEAR_SHA1_HMAC && !DROPBEAR_SHA2_256_HMAC && !DROPBEAR_SHA2_512_HMAC
  595. endif
  596. ## </MAC>
  597. comment "Asymmetric-key ciphers:"
  598. config DROPBEAR_DSS
  599. bool "DSS [WEAK]"
  600. depends on DROPBEAR_LEGACY_COMPAT
  601. help
  602. This enables the following public key algorithm:
  603. * ssh-dss
  604. DSS uses 1024 bit private keys (too small) and SHA1 signing (weak).
  605. Default: disabled.
  606. config DROPBEAR_RSA_SHA1
  607. bool "RSA-SHA1 [WEAK]"
  608. depends on DROPBEAR_LEGACY_COMPAT
  609. help
  610. This enables the following public key algorithm:
  611. * ssh-rsa
  612. SHA1 support is required to communicate with some older implementations.
  613. It will be removed in future due to SHA1 insecurity.
  614. Default: disabled.
  615. config DROPBEAR_RSA
  616. bool "RSA-SHA256"
  617. default y
  618. help
  619. This enables the following public key algorithm:
  620. * rsa-sha2-256
  621. RSA-SHA256 uses SHA2 256 bit hashes for authentication.
  622. Default: enabled.
  623. config DROPBEAR_DEFAULT_RSA_SIZE
  624. int "Default RSA key size"
  625. range 1024 8192
  626. default 2048
  627. depends on DROPBEAR_RSA_SHA1 || DROPBEAR_RSA
  628. help
  629. Sets the default RSA key size, for example, when auto-generating server keys.
  630. Possible values: 1024, 2048, 4096, 8192.
  631. Default: 2048.
  632. config DROPBEAR_ECDSA
  633. bool "ECDSA"
  634. help
  635. This enables the following public key algorithm:
  636. * ecdsa-sha2-nistp256 - 256-bit elliptic curve
  637. * ecdsa-sha2-nistp384 - 384-bit elliptic curve
  638. * ecdsa-sha2-nistp521 - 521-bit elliptic curve
  639. Along with FIDO/U2F also enables the following public key algorithm:
  640. * [email protected] - 256-bit elliptic curve
  641. ECDSA significantly faster than RSA or DSS, but slower than Ed25519.
  642. Default: disabled.
  643. config DROPBEAR_ED25519
  644. bool "Ed25519"
  645. default y if !SMALL_FLASH
  646. help
  647. This enables the following public key algorithm:
  648. * ssh-ed25519
  649. Along with FIDO/U2F also enables the following public key algorithm:
  650. * [email protected]
  651. Ed25519 uses Curve25519 and SHA512 and is faster than RSA and ECDSA.
  652. Default: enabled, except devices with very small flash.
  653. comment "WARNING! At least one asymmetric-key algorithm must be enabled."
  654. depends on !DROPBEAR_DSS && !DROPBEAR_RSA && !DROPBEAR_ECDSA && !DROPBEAR_ED25519
  655. ## <KEX ALGORITHM>
  656. comment "Key exchange algorithms"
  657. config DROPBEAR_DH_GROUP1
  658. bool "DH group1: SHA1, 1024 bit [WEAK]"
  659. depends on DROPBEAR_LEGACY_COMPAT
  660. help
  661. This enables the following key exchange algorithm:
  662. * diffie-hellman-group1-sha1
  663. Diffie-Hellman group1 is too small for security, though is necessary for
  664. compatibility with some very old implementations such as Dropbear < v0.53.
  665. Default: disabled.
  666. config DROPBEAR_DH_GROUP1_CLIENTONLY
  667. bool "DH group1 only for Dropbear client"
  668. default y
  669. depends on DROPBEAR_DBCLIENT && DROPBEAR_DH_GROUP1
  670. help
  671. When enabled, Diffie-Hellman group1 will only be allowed by Dropbear client,
  672. not by the server, due to concerns over its strength.
  673. If disabled, DH group1 is allowed by Dropbear server too.
  674. Default: enabled.
  675. config DROPBEAR_DH_GROUP14_SHA1
  676. bool "DH group14: SHA1, 2048 bit [WEAK]"
  677. depends on DROPBEAR_LEGACY_COMPAT
  678. help
  679. This enables the following key exchange algorithm:
  680. * diffie-hellman-group14-sha1
  681. Diffie-Hellman group14 is supported by most implementations.
  682. This variant uses weaker SHA1 hashes.
  683. Default: disabled.
  684. config DROPBEAR_DH_GROUP14_SHA256
  685. bool "DH group14: SHA2-256, 2048 bit"
  686. default y
  687. help
  688. This enables the following key exchange algorithm:
  689. * diffie-hellman-group14-sha256
  690. Diffie-Hellman group14 is supported by most implementations.
  691. Default: enabled.
  692. config DROPBEAR_DH_GROUP16
  693. bool "DH group16: SHA2-512, 4096 bit"
  694. help
  695. This enables the following key exchange algorithm:
  696. * diffie-hellman-group16-sha512
  697. Diffie-Hellman group16 provides a greater strength level
  698. but it is slower and increases binary size.
  699. Default: disabled.
  700. config DROPBEAR_ECDH
  701. bool "ECDH"
  702. help
  703. This enables the following key exchange algorithm:
  704. * ecdh-sha2-nistp256 - 256-bit elliptic curve
  705. * ecdh-sha2-nistp384 - 384-bit elliptic curve
  706. * ecdh-sha2-nistp521 - 521-bit elliptic curve
  707. ECDH is faster than non-elliptic-curve methods.
  708. Default: disabled.
  709. config DROPBEAR_CURVE25519
  710. bool "Curve25519"
  711. default y
  712. help
  713. This enables the following key exchange algorithm:
  714. * curve25519-sha256
  715. Curve25519 is faster than non-elliptic-curve methods.
  716. Default: enabled.
  717. config DROPBEAR_MLKEM768
  718. bool "mlkem768 [POST-QUANTUM]"
  719. help
  720. This enables the following key exchange algorithm:
  721. * mlkem768x25519-sha256
  722. Post-quantum KEM can avoid harvest-now-decrypt-later style attacks.
  723. Default: enabled, except devices with very small flash.
  724. config DROPBEAR_SNTRUP761
  725. bool "sntrup761 [POST-QUANTUM]"
  726. default y if !SMALL_FLASH
  727. help
  728. This enables the following key exchange algorithm:
  729. * sntrup761x25519-sha512
  730. Post-quantum KEM can avoid harvest-now-decrypt-later style attacks.
  731. Default: enabled, except devices with very small flash.
  732. comment "WARNING! At least one key exchange algorithm must be enabled."
  733. depends on !DROPBEAR_DH_GROUP1 && !DROPBEAR_DH_GROUP14_SHA1 && ! DROPBEAR_DH_GROUP14_SHA256 && !DROPBEAR_DH_GROUP16 && !DROPBEAR_ECDH && !DROPBEAR_CURVE25519 && !DROPBEAR_MLKEM768 && !DROPBEAR_SNTRUP761
  734. ## </KEX ALGORITHM>
  735. ## <ELLIPTIC CURVE>
  736. if DROPBEAR_ECDH || DROPBEAR_ECDSA
  737. comment "Elliptic curves:"
  738. config DROPBEAR_ECC_256
  739. bool "256-bit curve"
  740. default y
  741. help
  742. This enables the following key exchange algorithm:
  743. * ecdh-sha2-nistp256
  744. This enables the following public key algorithm:
  745. * ecdsa-sha2-nistp256
  746. Along with FIDO/U2F also enables the following public key algorithm:
  747. * [email protected]
  748. Default: enabled.
  749. config DROPBEAR_ECC_384
  750. bool "384-bit curve"
  751. help
  752. This enables the following key exchange algorithm:
  753. * ecdh-sha2-nistp384
  754. This enables the following public key algorithm:
  755. * ecdsa-sha2-nistp384
  756. Default: disabled.
  757. config DROPBEAR_ECC_521
  758. bool "521-bit curve"
  759. help
  760. This enables the following key exchange algorithm:
  761. * ecdh-sha2-nistp521
  762. This enables the following public key algorithm:
  763. * ecdsa-sha2-nistp521
  764. Default: disabled.
  765. comment "WARNING! At least one elliptic curve must be enabled."
  766. depends on !DROPBEAR_ECC_256 && !DROPBEAR_ECC_384 && !DROPBEAR_ECC_521
  767. endif
  768. ## </ELLIPTIC CURVE>
  769. ## <U2F>
  770. comment "FIDO/U2F security keys are not supported - enable DROPBEAR_ECDSA and/or DROPBEAR_ED25519"
  771. depends on !DROPBEAR_ECDSA && !DROPBEAR_ED25519
  772. config DROPBEAR_SK_KEYS
  773. bool "FIDO/U2F security keys"
  774. default y if !SMALL_FLASH
  775. depends on DROPBEAR_ECDSA || DROPBEAR_ED25519
  776. help
  777. Allows Dropbear server to validate U2F security keys.
  778. The corresponding DROPBEAR_SK_ECDSA and/or DROPBEAR_SK_ED25519 also needs to be set.
  779. Dropbear client does not support U2F.
  780. Default: enabled, except devices with very small flash.
  781. if DROPBEAR_SK_KEYS
  782. comment "FIDO/U2F with ECDSA is not supported - enable DROPBEAR_ECC_256"
  783. depends on DROPBEAR_ECDSA && !DROPBEAR_ECC_256
  784. config DROPBEAR_SK_ECDSA
  785. bool "FIDO/U2F with ECDSA"
  786. default y
  787. depends on DROPBEAR_ECDSA && DROPBEAR_ECC_256
  788. help
  789. This enables the following public key algorithm:
  790. * [email protected]
  791. Default: enabled.
  792. config DROPBEAR_SK_ED25519
  793. bool "FIDO/U2F with Ed25519"
  794. default y
  795. depends on DROPBEAR_ED25519
  796. help
  797. This enables the following public key algorithm:
  798. * [email protected]
  799. Default: enabled.
  800. comment "WARNING! At least one U2F algorithm must be enabled."
  801. depends on !DROPBEAR_SK_ECDSA && !DROPBEAR_SK_ED25519
  802. endif
  803. ## </U2F>
  804. endmenu
  805. ## </ENCRYPTION>
  806. ## TODO: following options should be removed in 2027
  807. ## <LEGACY OPTIONS>
  808. config DROPBEAR_ECC
  809. bool
  810. imply DROPBEAR_ECDH
  811. imply DROPBEAR_ECDSA
  812. imply DROPBEAR_ECC_256
  813. config DROPBEAR_ECC_FULL
  814. bool
  815. imply DROPBEAR_ECDH
  816. imply DROPBEAR_ECDSA
  817. imply DROPBEAR_ECC_256
  818. imply DROPBEAR_ECC_384
  819. imply DROPBEAR_ECC_521
  820. config DROPBEAR_ECDSA_SK
  821. bool
  822. imply DROPBEAR_SK_KEYS
  823. imply DROPBEAR_SK_ECDSA
  824. imply DROPBEAR_ECC_256
  825. config DROPBEAR_ED25519_SK
  826. bool
  827. imply DROPBEAR_SK_KEYS
  828. imply DROPBEAR_SK_ED25519
  829. config DROPBEAR_ASKPASS
  830. bool
  831. depends on DROPBEAR_DBCLIENT
  832. imply DROPBEAR_CLI_ASKPASS_HELPER
  833. config DROPBEAR_DBCLIENT_AGENTFORWARD
  834. bool
  835. depends on DROPBEAR_DBCLIENT
  836. imply DROPBEAR_CLI_AGENTFWD
  837. config DROPBEAR_AGENTFORWARD
  838. bool
  839. imply DROPBEAR_SVR_AGENTFWD
  840. ## it's not possible to negate selection via Kconfig [at least] of following options:
  841. ## - DROPBEAR_AES128
  842. ## - DROPBEAR_AES256
  843. ## - DROPBEAR_ENABLE_CTR_MODE
  844. ## - DROPBEAR_RSA
  845. ## - DROPBEAR_RSA_SHA1
  846. config DROPBEAR_MODERN_ONLY
  847. bool
  848. imply DROPBEAR_ED25519
  849. imply DROPBEAR_CURVE25519
  850. imply DROPBEAR_CHACHA20POLY1305
  851. ## </LEGACY OPTIONS>
  852. endif # PACKAGE_dropbear