Making this optional was basically for testing purposes, but might be interesting for users who want to squeeze out the last few bytes. The option is enabled by dropbear by default, so now it's possible to disable it in ptxdist.
Signed-off-by: Alexander Dahl <[email protected]> --- rules/dropbear.in | 10 ++++++++++ rules/dropbear.make | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/rules/dropbear.in b/rules/dropbear.in index bbeb25f89..375d4c57c 100644 --- a/rules/dropbear.in +++ b/rules/dropbear.in @@ -169,6 +169,16 @@ config DROPBEAR_AES256 algorithm that may be used by U.S. Government organizations (and others) to protect sensitive information. +config DROPBEAR_CHACHA20POLY1305 + bool + prompt "Chacha20-Poly1305" + default y + help + Enable Chacha20-Poly1305 authenticated encryption mode. + This is generally faster than AES256 on CPU w/o dedicated AES + instructions, having the same key size. + Recommended. + config DROPBEAR_CBC_CIPHERS bool prompt "CBC mode ciphers" diff --git a/rules/dropbear.make b/rules/dropbear.make index a5ff02c9e..7653cf3e5 100644 --- a/rules/dropbear.make +++ b/rules/dropbear.make @@ -127,6 +127,14 @@ else @echo "#define DROPBEAR_AES256 0" >> $(DROPBEAR_LOCALOPTIONS) endif +ifdef PTXCONF_DROPBEAR_CHACHA20POLY1305 + @echo "ptxdist: enabling chacha20-poly1305" + @echo "#define DROPBEAR_CHACHA20POLY1305 1" >> $(DROPBEAR_LOCALOPTIONS) +else + @echo "ptxdist: disabling chacha20-poly1305" + @echo "#define DROPBEAR_CHACHA20POLY1305 0" >> $(DROPBEAR_LOCALOPTIONS) +endif + # ciphers ifdef PTXCONF_DROPBEAR_CBC_CIPHERS @echo "ptxdist: enabling cbc ciphers" -- 2.30.2
