Config.in 31 KB

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