From e025ccc2f0bfaacc9a18d32334a2aa4617b3acc1 Mon Sep 17 00:00:00 2001 From: Jacob Nevins Date: Sat, 29 Feb 2020 09:59:12 +0000 Subject: [PATCH] Add official kex name "curve25519-sha256". As a simple alias for "curve25519-sha256@libssh.org". This name is now standardised in RFC8731 (and, since 7751657811, we have the extra validation mandated by the RFC compared to the libssh spec); also it's been in OpenSSH at least for ages (since 7.4, 2016-12, 0493766d56). --- sshecc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sshecc.c b/sshecc.c index 8ba2629e..7725013f 100644 --- a/sshecc.c +++ b/sshecc.c @@ -1483,6 +1483,11 @@ static const struct eckex_extra kex_extra_curve25519 = { ssh_ecdhkex_m_getkey, }; const ssh_kex ssh_ec_kex_curve25519 = { + "curve25519-sha256", NULL, KEXTYPE_ECDH, + &ssh_sha256, &kex_extra_curve25519, +}; +/* Pre-RFC alias */ +const ssh_kex ssh_ec_kex_curve25519_libssh = { "curve25519-sha256@libssh.org", NULL, KEXTYPE_ECDH, &ssh_sha256, &kex_extra_curve25519, }; @@ -1525,6 +1530,7 @@ const ssh_kex ssh_ec_kex_nistp521 = { static const ssh_kex *const ec_kex_list[] = { &ssh_ec_kex_curve25519, + &ssh_ec_kex_curve25519_libssh, &ssh_ec_kex_nistp256, &ssh_ec_kex_nistp384, &ssh_ec_kex_nistp521,