]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
stubs for ML-KEM KEX functions
authorDamien Miller <djm@mindrot.org>
Mon, 9 Sep 2024 11:50:14 +0000 (21:50 +1000)
committerDamien Miller <djm@mindrot.org>
Mon, 9 Sep 2024 11:50:14 +0000 (21:50 +1000)
used for C89 compilers

kexmlkem768x25519.c

index fa062dd7d2c02ab144b2e4b574c868fd08b01ee4..18730ff8a0d6a182eaba1d3bb6bd7127cc4cc0b6 100644 (file)
@@ -25,8 +25,6 @@
 
 #include "includes.h"
 
-#ifdef USE_MLKEM768X25519
-
 #include <sys/types.h>
 
 #include <stdio.h>
@@ -42,6 +40,8 @@
 #include "ssherr.h"
 #include "log.h"
 
+#ifdef USE_MLKEM768X25519
+
 #include "libcrux_mlkem768_sha3.h"
 
 int
@@ -254,4 +254,25 @@ kex_kem_mlkem768x25519_dec(struct kex *kex,
        sshbuf_free(buf);
        return r;
 }
+#else /* USE_MLKEM768X25519 */
+int
+kex_kem_mlkem768x25519_keypair(struct kex *kex)
+{
+       return SSH_ERR_SIGN_ALG_UNSUPPORTED;
+}
+
+int
+kex_kem_mlkem768x25519_enc(struct kex *kex,
+   const struct sshbuf *client_blob, struct sshbuf **server_blobp,
+   struct sshbuf **shared_secretp)
+{
+       return SSH_ERR_SIGN_ALG_UNSUPPORTED;
+}
+
+int
+kex_kem_mlkem768x25519_dec(struct kex *kex,
+    const struct sshbuf *server_blob, struct sshbuf **shared_secretp)
+{
+       return SSH_ERR_SIGN_ALG_UNSUPPORTED;
+}
 #endif /* USE_MLKEM768X25519 */