As it is very likely that weak DSA and ECDSA keys are created on
embedded systems (entropy problems), I suggest replacing DSA with
Ed25519, a elliptic curve signature scheme which was designed with
those problems in mind. Having not enough entropy is not that
critical with Ed25519 as it was with DSA or ECDSA.

Besides being more secure than DSA, its performance is better too.

More info on Ed25519: http://ed25519.cr.yp.to

Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com>
---
 generic/etc/rc.once.d/openssh | 8 ++++----
 generic/etc/ssh/sshd_config   | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/generic/etc/rc.once.d/openssh b/generic/etc/rc.once.d/openssh
index 83e6e37..0a63433 100644
--- a/generic/etc/rc.once.d/openssh
+++ b/generic/etc/rc.once.d/openssh
@@ -3,12 +3,12 @@
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 
 OPENSSH_RSAKEY_DEFAULT="/etc/ssh/ssh_host_rsa_key"
-OPENSSH_DSAKEY_DEFAULT="/etc/ssh/ssh_host_dsa_key"
+OPENSSH_ED25519KEY_DEFAULT="/etc/ssh/ssh_host_ed25519_key"
 
 test -n "$OPENSSH_RSAKEY" || \
        OPENSSH_RSAKEY=$OPENSSH_RSAKEY_DEFAULT
-test -n "$OPENSSH_DSAKEY" || \
-       OPENSSH_DSAKEY=$OPENSSH_DSAKEY_DEFAULT
+test -n "$OPENSSH_ED25519KEY" || \
+       OPENSSH_ED25519KEY=$OPENSSH_ED25519KEY_DEFAULT
 
 gen_key() {
 
@@ -29,5 +29,5 @@ gen_key() {
 }
 
 gen_key rsa "$OPENSSH_RSAKEY"
-gen_key dsa "$OPENSSH_DSAKEY"
+gen_key ed25519 "$OPENSSH_ED25519KEY"
 
diff --git a/generic/etc/ssh/sshd_config b/generic/etc/ssh/sshd_config
index 7cd7897..f529fc4 100644
--- a/generic/etc/ssh/sshd_config
+++ b/generic/etc/ssh/sshd_config
@@ -20,7 +20,7 @@ Protocol 2
 #HostKey /etc/ssh/ssh_host_key
 # HostKeys for protocol version 2
 HostKey /etc/ssh/ssh_host_rsa_key
-HostKey /etc/ssh/ssh_host_dsa_key
+HostKey /etc/ssh/ssh_host_ed25519_key
 
 # Lifetime and size of ephemeral version 1 server key
 #KeyRegenerationInterval 1h
-- 
2.4.2


-- 
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to