]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
support sntrup761x25519-sha512 alias
authorDamien Miller <djm@mindrot.org>
Mon, 11 Aug 2025 06:02:03 +0000 (16:02 +1000)
committerDamien Miller <djm@mindrot.org>
Mon, 11 Aug 2025 06:02:03 +0000 (16:02 +1000)
OpenSSH 9.2 supports the sntrup761x25519-sha512@openssh.com
key agreement algorithm. As part of standardisation, this algorithm
has been assigned the name sntrup761x25519-sha512.

This commit enables the existing algorithm under this new name.

kex.c
kex.h
myproposal.h

diff --git a/kex.c b/kex.c
index 8cdefcf7cbb9ada913290213862521980d0c8662..cbc6ae7244b0143580dce3f06bd99c8eb453d3dd 100644 (file)
--- a/kex.c
+++ b/kex.c
@@ -111,6 +111,8 @@ static const struct kexalg kexalgs[] = {
        { KEX_CURVE25519_SHA256, KEX_C25519_SHA256, 0, SSH_DIGEST_SHA256 },
        { KEX_CURVE25519_SHA256_OLD, KEX_C25519_SHA256, 0, SSH_DIGEST_SHA256 },
 #ifdef USE_SNTRUP761X25519
+       { KEX_SNTRUP761X25519_SHA512_IANA, KEX_KEM_SNTRUP761X25519_SHA512, 0,
+           SSH_DIGEST_SHA512 },
        { KEX_SNTRUP761X25519_SHA512, KEX_KEM_SNTRUP761X25519_SHA512, 0,
            SSH_DIGEST_SHA512 },
 #endif
diff --git a/kex.h b/kex.h
index c35329501871a3a446c202691aed72aef76910b6..5282f2825c4266c753f17a186d3e64b535cdd3e9 100644 (file)
--- a/kex.h
+++ b/kex.h
@@ -63,6 +63,7 @@
 #define        KEX_CURVE25519_SHA256           "curve25519-sha256"
 #define        KEX_CURVE25519_SHA256_OLD       "curve25519-sha256@libssh.org"
 #define        KEX_SNTRUP761X25519_SHA512      "sntrup761x25519-sha512@openssh.com"
+#define        KEX_SNTRUP761X25519_SHA512_IANA "sntrup761x25519-sha512"
 
 #define COMP_NONE      0
 /* pre-auth compression (COMP_ZLIB) is only supported in the client */
index ee6e9f7415261c9e7a9d6ad64a2eccf26ec1d45a..0528cd783fa2cda9a076a55f948c2ddb637f4587 100644 (file)
@@ -25,6 +25,7 @@
  */
 
 #define KEX_SERVER_KEX \
+       "sntrup761x25519-sha512," \
        "sntrup761x25519-sha512@openssh.com," \
        "curve25519-sha256," \
        "curve25519-sha256@libssh.org," \